Post Reply 
42S local label caching
11-16-2019, 11:22 PM (This post was last modified: 11-16-2019 11:27 PM by Sylvain Cote.)
Post: #15
RE: 42S local label caching
Same program as before but with a 2 bytes label and a 3 bytes goto

FOCAL program
Code:
LBL "ABC"
5
LBL 15
"AAAAAAAAAAAAA"
AVIEW
TONE ST X
DSE ST X
GTO 15
END

42S Memory dump
Code:
     0123456789ABCDEF
53DF    0C004F0014243
53E0 45100FCF0DF14141
53E1 4141414141414141
53E2 41414E7F93F79370
53E3 D61F00C5090

Reorganisation
Code:
42S Memory Dump (reversed)    :  42S Memory Dump (rearranged)
----------------------------  :  -----------------------------------------
0C004F00142434                :  C0 00 F4 00 41 42 43
5100                          :  15 00
FCF0                          :  CF 0F
DF14141414141414141414141414  :  FD 41 41 41 41 41 41 41 41 41 41 41 41 41
E7                            :  7E
F93F                          :  9F F3
7937                          :  97 73
0D61F0                        :  D0 16 0F
0C5090                        :  C0 05 09

Manual decoding
Code:
42S Memory Dump                            :  41C Memory Dump                            :  FOCAL program   
-----------------------------------------  :  -----------------------------------------  :  ----------------
C0 00 F4 00 41 42 43                       :  C6 00 F4 00 41 42 43                       :  LBL "ABC"
15 00                                      :  15                                         :  5
CF 0F                                      :  CF 0F                                      :  LBL 15
FD 41 41 41 41 41 41 41 41 41 41 41 41 41  :  FD 41 41 41 41 41 41 41 41 41 41 41 41 41  :  "AAAAAAAAAAAAA"
7E                                         :  7E                                         :  AVIEW
9F F3                                      :  9F F3                                      :  TONE ST X
97 73                                      :  97 73                                      :  DSE ST X
D0 16 0F                                   :  D2 03 8F                                   :  GTO 15
C0 05 09                                   :  C8 04 09                                   :  END

As before, there are small differences between the HP-42S and HP-41C like the global label and the end but what I am investigating here is the long form goto.

The HP-41C 3 bytes GTO format is 1101 BBBR RRRR RRRR DLLL LLLL and the value is D2038F or 1101 0010 0000 0011 1000 1111 with the distance translated to 1 byte and 3 registers or 22 bytes between the GTO 15 and the LBL 15

The HP-42S 3 bytes GTO format is 1101 BBBB BBBB BBBB DLLL LLLL and the value is D0160F or 1101 0000 0001 0110 0000 1111 with the distance translated to 22 bytes between the GTO 15 and the LBL 15

Again, the initial question about the long form goto has also been answered! Smile

Sylvain
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
42S local label caching - Dave Britten - 11-11-2019, 05:54 PM
RE: 42S local label caching - Sylvain Cote - 11-11-2019, 06:18 PM
RE: 42S local label caching - Dave Britten - 11-11-2019, 06:56 PM
RE: 42S local label caching - Sylvain Cote - 11-13-2019, 02:00 PM
RE: 42S local label caching - Sylvain Cote - 11-13-2019, 02:06 PM
RE: 42S local label caching - Andres - 11-11-2019, 07:06 PM
RE: 42S local label caching - Dave Britten - 11-11-2019, 07:28 PM
RE: 42S local label caching - Sylvain Cote - 11-14-2019, 04:00 AM
RE: 42S local label caching - Joe Horn - 11-14-2019, 10:54 PM
RE: 42S local label caching - Sylvain Cote - 11-15-2019, 05:42 PM
RE: 42S local label caching - Joe Horn - 11-15-2019, 09:48 PM
RE: 42S local label caching - Sylvain Cote - 11-16-2019, 03:25 PM
RE: 42S local label caching - Werner - 11-16-2019, 04:50 PM
RE: 42S local label caching - Sylvain Cote - 11-16-2019, 11:33 PM
RE: 42S local label caching - Sylvain Cote - 11-16-2019 11:22 PM
RE: 42S local label caching - Joe Horn - 11-17-2019, 12:50 PM
RE: 42S local label caching - Werner - 11-17-2019, 09:37 AM
RE: 42S local label caching - J-F Garnier - 11-17-2019, 09:51 AM
RE: 42S local label caching - Werner - 11-17-2019, 07:03 PM



User(s) browsing this thread: 1 Guest(s)