ISZ
Detailed Description
The index register specified by REG is incremented by one. If the result is 0000, program execution continues with the next sequential instruction. If the result does not equal 0000 the 8 bits specified by ADDR replace the lowest 8 bits of the program counter. The highest 4 bits of the program counter are unchanged. Therefore, program execution continues at the specified address on the same page of memory in which the ISZ instruction is located.
The carry bit is not affected
NOTE:
If ISZ is located on words 254 and 255 of a ROM page, when ISZ
is executed and the result is not zero, program control is transferred
to the 8-bit address located on the next page in sequence and not
on the same page where ISZ is located.
.. rubric:: Example program
/ Example program
org ram
fim 0p
lp xch 2
isz 0 lp
end
The FIM instruction loads registers 0 and 1 with O. The XCH is then executed. Program execution continues until the ISZ is reached. Register 0 is incremented to contain 1, and since this result is non-zero, program control is transferred back to location labelled “lp”. This process continues until register 0 = 1111. Then the ISZ increments register 0 producing a result of OOOO, and execution continues with the instruction at after the ISZ (which is the END).