42S local label caching
|
11-16-2019, 03:25 PM
(This post was last modified: 11-16-2019 10:57 PM by Sylvain Cote.)
Post: #13
|
|||
|
|||
RE: 42S local label caching
(11-15-2019 09:48 PM)Joe Horn Wrote: I *was* sure when I wrote it, but that was 31 years ago, soon after which my 42S was stolen and I haven't had one since.Really sorry for your loss. (11-15-2019 09:48 PM)Joe Horn Wrote: Those who own a real 42S will be able to use its built-in (unsupported) hex memory viewer/editor to explore the internal structure of GTO's, XEQ's, and LBL's.ok, ok, got the hint ... First I entered this short FOCAL (FTCAL?) program in my HP-42S Code: LBL "ABC" Then I fired the debugger and scanned the memory for the AAAA's, then went to the start of the program, so here is the dump: Code: 0123456789ABCDEF Then I manually reversed the nibbles and reorganized things by their meaning Code: 42S Memory Dump (reversed) : 42S Memory Dump (rearranged) Then I entered the same program in my HP-41C and with the RAMED function of the ZENROM I dumped the memory. After that I mapped the two dump with the program code Code: 42S Memory Dump : 41C Memory Dump : FOCAL program There are small differences between the HP-42S and HP-41C like the global label and the end but what I was investigating here was the short form goto. The 41C 2 bytes GTO format is 1011 LLLL DBBB RRRR and the value is B193 or 1011 0001 1001 0033 with the distance translated to 1 byte and 3 registers or 22 bytes between the GTO 00 and the LBL 00 The 42S 2 bytes GTO format is 1011 LLLL DBBB BBBB and the value is B116 or 1011 0001 1001 0110 with the distance translated to 22 bytes between the GTO 00 and the LBL 00 So the initial question about the short form goto has been answered! Sylvain |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)