Program Branch Group in 8051
Here are the program branch groups in 8051 as mentioned below. These mnemonics will describe the program branch of the 8051 microprocessor with their Lengths, Execution Time in terms of the machine cycle, Number of Opcodes, etc.
Instruction | Operation | Description |
---|---|---|
ACALL addr11 | Absolute Call | Calls a subroutine located at the specified 11-bit address. The address range is 2KB (from 0000H to 07FFH). |
LCALL addr16 | Long Call | Calls a subroutine located at the specified 16-bit address. The address range is 64KB (from 0000H to FFFFH). |
RET | Return | Returns from a subroutine to the instruction following the last call. |
AJMP addr11 | Absolute Jump | Jumps to a specified 11-bit address. The address range is 2KB. |
LJMP addr16 | Long Jump | Jumps to a specified 16-bit address. The address range is 64KB. |
SJMP rel | Short Jump | Jumps to a specified relative address (within -128 to +127 bytes from the current PC). |
JMP @A+DPTR | Jump Indirect | Jumps to the address formed by adding the accumulator (A) and the data pointer (DPTR). |
JZ rel | Jump if Accumulator is Zero | Jumps to a specified relative address if the accumulator (A) is zero. |
JNZ rel | Jump if Accumulator is Not Zero | Jumps to a specified relative address if the accumulator (A) is not zero. |
JC rel | Jump if Carry Flag is Set | Jumps to a specified relative address if the carry flag (C) is set. |
JNC rel | Jump if Carry Flag is Not Set | Jumps to a specified relative address if the carry flag (C) is not set. |
JB bit, rel | Jump if Direct Bit is Set | Jumps to a specified relative address if the specified bit is set. |
JNB bit, rel | Jump if Direct Bit is Not Set | Jumps to a specified relative address if the specified bit is not set. |
JBC bit, rel | Jump if Direct Bit is Set and Clear Bit | Jumps to a specified relative address if the specified bit is set, then clears the bit. |
Program Branch Group in 8051
The 8051 microcontroller has 17 instructions under the Logical Group present in it. On the other side, 46 opcodes do not affect the flag bits. The instructions present in the 8051 microcontrollers use the 11-bit and 16-bit addresses to run the operations. In this article, we will discuss the program branch group in 8051.
Table of Content
- Program Branch Group in 8051
- Advantages
- Disadvantages
- Applications