 |
Back to:
JUMP instruction
Coding:
(MOD - modifier: determines the condition and type of the branch;
symbol "." shows, that this digit can have any value; OP1 - operand
with jump address)
The values of modifier are the following:
0 - return from subroutine
1 - unconditional jump
2 - jump, if N = 0 (result >= 0)
3 - jump, if N = 1 (result < 0)
4 - jump, if Z = 0 (result <> 0)
5 - jump, if Z = 1 (result = 0)
6 - jump, if N = 1 or Z = 1 (result <= 0)
7 - jump, if N = 0 and Z = 0 (result > 0)
9 - subroutine call
Description:
This instruction executes a jump to the command with specified address.
Examples:
5C0D 0030 |
jump to address 30, when the result of the previous operation is zero;
otherwise this command will be ignored |
1C03 |
this inctruction will get value from R3 and execute an uncoditional jump to
this address |
9C0D 4010 |
ROM subroutine, which begins 4010 at will be called |
Back to:
Coding:
(MOD - modifier: determines the condition and type of the branch; offset - the value,
which adds to PC; may be positive (branch "forward") and negative (branch "back") )
The values of modifier are the same, as for JUMP instruction.
Description:
This instruction executes a branch to the command, which address is a sum of the
current program counter value and offset. For example, if branch instruction with offset
18 has address 0040, the current PC value will be 0042 (PC points at the next command) and next
instruction address will be calculated as 0042+18=005A.
Examples:
4D02 |
branch to address PC+2, when the result of the previous operation
is not zero |
1DFC |
an uncoditional branch to PC-4 |
Back to:
|