JIN

Name

Jump Indirect

Function

Jump to an address within this page of ROM.

Syntax

JIN(Rp)

Assembled

Binary

0011RPp1

Decimal

49, then incrementing by 2 until 63 (1st word)

Hexadecimal

0x31, then incrementing by 2 until 0x3F (1st word)

Symbolic

../../_images/jin-sym.png

Execution

1 words 8-bit code and an execution time of 10.3 \({\mu}\) sec

Side-effects

Not Applicable

Implemented

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.

../../_images/jin.png

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.