There are 2 types of Jump in 8051: Unconditional and Conditional
Unconditional Jump:
The unconditional jump is a jump in which control is transferred unconditionally to the target location.
Conditional Jump:
The conditional jump is a jump in which control is transferred to the target location only if a specified condition is met. All conditional jumps are short jump.
Unconditional Jump:
The unconditional jump is a jump in which control is transferred unconditionally to the target location.
| Mnemonic | Description |
|---|---|
| AJMP addr11 | Absolute Jump transfers program execution to the indicated address, which is formed at run-time |
| LJMP addr16 | Long Jump causes an unconditional branch to the indicated address |
| SJMP rel (addr8) | Short Jump unconditionally to the address (relative) indicated |
| JMP @A+DPTR | Jump indirect relative to the DPTR |
Conditional Jump:
The conditional jump is a jump in which control is transferred to the target location only if a specified condition is met. All conditional jumps are short jump.
| Mnemonic | Description |
|---|---|
| JZ relative address | Jump if Accumulator is Zero |
| JNZ relative address | Jump if Accumulator is Not Zero |
| CJNE A, direct, relative address | Compare direct byte to Acc and Jump if Not Equal |
| CJNE A, #data, relative address | Compare immediate to Acc and Jump if Not Equal |
| CJNE Rn, #data, relative address | Compare immediate to register and Jump if Not Equal |
| CJNE @Ri,#data, relative address | Compare immediate to indirect and Jump if Not Equal |
| DJNZ Rn, relative address | Decrement register and Jump if Not Zero |
| DJNZ direct, relative address | Decrement direct byte and Jump if Not Zero |
| JC relative address | Jump if Carry is set |
| JNC relative address | Jump if Carry not set |
| JB bit address, relative address | Jump if Bit set |
| JNB bit address, relative address | Jump if Bit Not set |
| JBC bit address, relative address | Jump if Bit is set and Clear bit |
Related topics:
8051 Long Jump | 8051 Absolute Jump | 8051 Short Jump | 8051 Indirect Jump | 8051 Jump if Accumulator Zero | 8051 Jump if Accumulator Not Zero | 8051 Compare and Jump if Not Equal | 8051 Decrement and Jump if Not Zero | 8051 Jump if Carry is Set | 8051 Jump if Carry is Not Set | 8051 Jump if Bit Set | 8051 Jump if Bit Not Set | 8051 Jump if Bit is Set and Clear Bit
List of topics: 8051
No comments:
Post a Comment