|Re: MCODE: The significance of a "3" in nybble 3 in register "b"|
Message #2 Posted by JoseL on 21 Jan 2008, 10:29 a.m.,
in response to message #1 by Geir Isene
A register in the HP41 memory contains 7 bytes, numbered like this: 6-5-4-3-2-1-0.
The .END. is always located in the bytes 2-1-0 of the last register in User Program Memory.
On the other hand, the Address Pointer (within b register) is: pqrs, where qrs is the register number and p the byte number, within this register qrs, of the last instruccion executed. So, the next instrucción to execute will be byte (p-1) of register qrs.
You Write: "Why put a "3" in there to execute the .END. ?"
The .END. is located in the memory register pointed by nibbles 2-1-0 of c register (qrs). And whitin this register (qrs), in bytes numbers 2-1-0. So, the address pointer should be 3qrs, which is a byte preceding the position of the .END., which is the next instruction to be executed.