Post Reply 
HP-41 Byte Table
12-27-2018, 09:11 PM (This post was last modified: 12-27-2018 09:19 PM by JurgenRo.)
Post: #5
RE: HP-41 Byte Table
(12-27-2018 09:05 PM)JurgenRo Wrote:  
(12-27-2018 08:31 PM)Thomas Okken Wrote:  The HP-41C/CV/CX and 42S store the offset from a GTO or XEQ instruction to its target LBL in the GTO / XEQ instruction. When the GTO or XEQ is first entered into a program, the offset is initially set to zero, meaning "unknown"; when the instruction is executed for the first time, a label search is performed, just like on older programmable HPs, and when the label is found, the difference between its address and the address of the GTO or XEQ is stored in said GTO or XEQ. Any subsequent time the instruction is executed, it can find the label instantly by adding the stored offset to the current instruction's address.

In order to store these offsets, GTO and XEQ need to take up some more space than other instructions with parameters. In the case of GTO 00 through GTO 14, one byte is added, giving an 8-bit offset, and thus a limited range, in exchange for taking up little memory. GTO 15-99, A-J, a-e, and all local XEQ instructions, have one and a half extra bytes, giving a 12-bit offset, enough even for the largest programs. Those twelve extra bits are stored by using four bits in the opcode byte, and and additional byte used entirely for the offset. The four bits in the opcode byte are why you end up with 16 local GTO opcodes and 16 local XEQ opcodes.

Hi Thomas, Sylvain! Thanks for your inputs. But I'm aware of the compilation process you explained. But this does not explain why there are for example 16 identical "XEQ --" in the Byte-Table, namely E0, E1, E2, E3, ..., EE, EF. Each of those functions have identical properties, each of which will carry the same jump distance after compilation. Actually, my question is: is there a difference between an XEQ coded by, say, E0 02 AD and E7 02 AD (note that both carry the identical jump distance information just the occurence in byte table row E differs). Thanks again!

... especially, I'm thinking of constructing those by synthetic means. By SP, as far as I understand SP, I would have the choice to construct the XEQ by 16 means: E0, E1, ...., EE, EF. So, the question arises: which one of those 16 should I construct? ;-)Or is there no difference between those at all? And, aditionally, by which rules does the processor chose on of those "XEG--" ... I hope you understand my point Undecided
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-41 Byte Table - JurgenRo - 12-27-2018, 07:54 PM
RE: HP-41 Byte Table - Thomas Okken - 12-27-2018, 08:31 PM
RE: HP-41 Byte Table - JurgenRo - 12-27-2018, 09:05 PM
RE: HP-41 Byte Table - JurgenRo - 12-27-2018 09:11 PM
RE: HP-41 Byte Table - Sylvain Cote - 12-28-2018, 04:43 PM
RE: HP-41 Byte Table - JurgenRo - 12-28-2018, 08:34 PM
RE: HP-41 Byte Table - Sylvain Cote - 12-27-2018, 09:02 PM
RE: HP-41 Byte Table - JurgenRo - 12-27-2018, 10:46 PM
RE: HP-41 Byte Table - Thomas Okken - 12-27-2018, 09:18 PM
RE: HP-41 Byte Table - JurgenRo - 12-27-2018, 09:22 PM
RE: HP-41 Byte Table - hth - 12-28-2018, 05:14 PM
RE: HP-41 Byte Table - JurgenRo - 12-28-2018, 08:44 PM
RE: HP-41 Byte Table - Sylvain Cote - 12-28-2018, 09:17 PM
RE: HP-41 Byte Table - Thomas Okken - 12-28-2018, 11:44 PM
RE: HP-41 Byte Table - JurgenRo - 12-28-2018, 11:57 PM



User(s) browsing this thread: