JMP addr:
- This instruction loads the program counter with the address given in the instruction.
- Then the program execution continues from this location.
- No flags are affected.
- It is a three byte instruction.
- Immediate addressing mode is used since the operand is given in the instruction itself.
Example:
JMP 5600H ; This instruction will load PC with 5600H and processor will fetch next instruction from 5600H.
JMP C240H ; This instruction will load PC with C240H and processor will fetch next instruction from C240H.
Jcond addr:
- If the condition is true or satisfied, then this instruction causes a jump to an address given in the instruction.
- If the condition is false or not satisfied, then this instruction just check and proceed further to execute the next instruction after it.
- If condition is true, PC = addr and if condition is false, PC = PC + 3.
- No flags are affected. Flags are only checked.
- It is a three byte instruction.
- Immediate addressing mode is used since the operand is given in the instruction itself.
NOTE: There is no jump on AC (Auxiliary Carry) flag.
Example:
JZ C200H ; This instruction will cause a jump to an address C200H and program counter will load with C200H if Z = 1. But if Z = 0 then the next instruction will be executed.
JP 4320H ; This instruction will cause a jump to an address 4320H and program counter will load with 4320H if S = 0. But if S = 1 then the next instruction will be executed.
Comments
Post a Comment