LBL and END handling on the PX41CX and in PX41CX_Interface.xls - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: LBL and END handling on the PX41CX and in PX41CX_Interface.xls (/thread-22684.html) |
LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-12-2024 07:45 AM Hello @agarza and @Pierre I created a little test program mostly consisting of LBL statements and dumped it from my PX41CX. The program decodes on dm41.swissmicros like this: Code:
Code: STACK = 0 0 0 0 0 I now have two Problems:
I already analysed the the Visual Basic and noted a few bugs in the handling of LBL and END which I corrected in my own decoder (line 414 .. 424). Why analysing I noticed that both LBL and END start with hex C followed by various status flags – which may or may not be hex 0 — which makes decoding them almost heuristic. This is pretty error prone. So I wonder if Receive has a problem in that area as well. What I find especially interesting is the „0=compiled or 1=not compiled“ flag for the END command which I found in the hp41cx-prog-handbook.pdf. Does anybody know what precisely is compiled. Regards Martin Something strange with register handling as well - krischik - 11-12-2024 03:54 PM I have another problematic one. If you load this test program and pack with GTO.. the program disappears.
Code: PX41 PS: I'm a computer scientist with focus test engineering. I do strange stuff programers hate me for.
RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - Sylvain Cote - 11-12-2024 04:33 PM (11-12-2024 07:45 AM)krischik Wrote: What I find especially interesting is the „0=compiled or 1=not compiled“ flag for the END command which I found in the hp41cx-prog-handbook.pdf. Does anybody know what precisely is compiled.The compiled bit was supposed to reflect that all GTO/XEQ offset within a program has been calculated and stored into their respective GTO/XEQ. In reality, AFAIK the END compile bit is always set to 0, even when none/some/all GTO/XEQ offset has been calculated and stored within them. edit: I just tested the above statement with the ZENROM RAMED function and I can confirm the (reality) behavior on a 41CLv5. RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-12-2024 05:02 PM (11-12-2024 04:33 PM)Sylvain Cote Wrote:(11-12-2024 07:45 AM)krischik Wrote: What I find especially interesting is the „0=compiled or 1=not compiled“ flag for the END command which I found in the hp41cx-prog-handbook.pdf. Does anybody know what precisely is compiled.The compiled bit was supposed to reflect that all GTO/XEQ offset within a program has been calculated and stored into their respective GTO/XEQ. That is what I suspected. Thanks for confirming. In PX41CX_Interface.xls Pierre relies on those values to be 0 which of course doesn't work in all conditions. And since I copied his code I ran into all sorts of trouble.
Martin
Regards RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - Pierre - 11-13-2024 03:48 PM (11-12-2024 07:45 AM)krischik Wrote: it won't decode properly with with PX41CX_Interface.xls Thanks Martin! I have not detected a single problem in this strange program. My interface did not decode LBL 99 properly! which I will correct! (For the END END ... what is its use?) (11-12-2024 07:45 AM)krischik Wrote: I'm a computer scientist with focus test engineering. I do strange stuff programers hate me for. I have never hated program testers who help me progress. I only hate those who hit a screen with a hammer and then complain that the screen does not work! (That is why in France the instructions for electronic devices often include the following: "do not throw violently on the ground") (11-12-2024 07:45 AM)krischik Wrote: I created a little test program mostly consisting of LBL statements Having been responsible for development and "standards and methods" for several years, I would have immediately fired a programmer who wrote such a program ! Best regards Pierre RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-15-2024 02:55 PM (11-13-2024 03:48 PM)Pierre Wrote:(11-12-2024 07:45 AM)krischik Wrote: it won't decode properly with with PX41CX_Interface.xlsI have not detected a single problem in this strange program. My PX-41CX has problems loading them again. But that is of course not your problem. In your code I detected the following two problems:
Code: PX41 Code: PX41 RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-15-2024 05:30 PM Found another one:
Code:
Line 40 .. 44 should look like this
Code:
That should be easy to fix ?.
Code: RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - Pierre - 11-15-2024 07:57 PM (11-15-2024 05:30 PM)krischik Wrote: In your code I detected the following problems... Hi Martin, Thanks for your three cases! Corrections made, tests in progress... soon available! For the first case, a small problem that I had to work around: between 08 and 4b000000000000 it is not a space but an invisible character (ascii=160) (Due to the copy from forum???) For the third case... Code:
Thanks for these cases that allow me to improve my tool. By email it would have been simpler and faster (with possible attachments) Best regards Pierre RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-21-2024 05:00 PM (11-15-2024 07:57 PM)Pierre Wrote: By email it would have been simpler and faster (with possible attachments) While I would prefer a proper bug tracker. With me bugs per E-Mail often get overlooked if I don't fix them right away.
Anyway, I noticed two bugs in the „Valid Keys“ part of the „Data“ sheet. The Bugs are in the ENTER row and the last row. I have the correct map here: Code: --- Interestingly the SwissMicros website has a bug here as well. hp41cx-prog-handbook.pdf has the correct mappings. Now, lets see how to send an E-Mail. RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - Pierre - 11-23-2024 04:54 PM (11-21-2024 05:00 PM)krischik Wrote: Interestingly the SwissMicros website has a bug here as well. I probably inherited bugs from the SwissMicros tool since I empirically started from their coding/decoding to build my code tables. And I corrected them case by case based on my interface tests between DM41X and PX-41CX and thanks to the various reports made by users. I will of course correct quickly the two bugs in the „Valid Keys“. RE: LBL and END handling on the PX41CX and in PX41CX_Interface.xls - krischik - 11-23-2024 06:06 PM (11-23-2024 04:54 PM)Pierre Wrote: I probably inherited bugs from the SwissMicros tool since I empirically started from their coding/decoding to build my code tables. I found the original code SwissMicros uses: https://sourceforge.net/projects/hp41uc/. However, it is written in C and uses a state machine. Very hard to read. I much prefer reading your Visual Basic code. Martin |