JIN
Detailed Description
Program execution is transferred to the instruction at location ADDR, which may be anywhere in memory. (If the JUN is located in ROM, ADDR is a ROM address; if located in program RAM, ADDR is a program RAM address).
The carry bit is not affected.
Example program
/ Example program
org 0x3e4
fim 0p 21
jin 0p
end
The FIM instruction loads register 0 with the value 1 and register 1 with the value 5. The JIN instruction then causes a jump to location 0x315.
Note:
If the JIN instruction is located in the last location of a page in memory, the highest 4 bits of the program counter are incremented by one, causing control to be transferred to the corresponding location on the next page. If the above example, the JIN had been located at address 255 decimal (0x0FF) then control would have been transferred to address 0x115, not 0x015.
This is dangerous programming practice, and should be avoided whenever possible.