REVIEW ON INSTRUCTION SET BASED ON FUNCTIONS
DATA TRANSFER | ARITHMETIC | LOGICAL |
MOV | ADD | CMP , CPI |
MVI | ADI | CMA |
LXI | ADC | CMC |
LDA | ACI | STC |
STA | DAD, DAA | RAR |
LDAX | SUB | RAL |
STAX | SUI | RRC |
LHLD | SBB | RLC |
SHLD | SBI | ANA , ANI |
XCHG | INR, DCR | ORA ,ORI |
INX, DCX | XRA , XRI |
Task | Opcode | Operand | Byte(s) | Flags | Addressing Mode |
Jump to 16-bit address | JMP | 16-bit address | 03 | None | Direct |
Task | Opcode | Operand | Byte(s) | Flags | Addressing Mode |
Jump on Carry i.e CY=1 | JC | 16-bit address | 03 | None | Direct |
Jump on No Carry i.e CY=0 | JNC | 16-bit address | 03 | None | Direct |
Jump on Even Parity i.e P=1 | JPE | 16-bit address | 03 | None | Direct |
Jump on Odd Parity i.e P=0 | JPO | 16-bit address | 03 | None | Direct |
Jump on Zero i.e Z=1 | JZ | 16-bit address | 03 | None | Direct |
Jump on No Zero i.e Z=0 | JNZ | 16-bit address | 03 | None | Direct |
Jump on Minus i.e S=1 | JM | 16-bit address | 03 | None | Direct |
Jump on Positive i.e S=0 | JP | 16-bit address | 03 | None | Direct |
Task | Opcode | Operand | Byte(s) | Flags | Addressing Mode |
Call a subroutine | CALL | 16-bit address | 03 | None | Direct |
Task | Opcode | Operand | Byte(s) | Flags | Addressing Mode |
Call on Carry i.e CY=1 | CC | 16-bit address | 03 | None | Direct |
Call on No Carry i.e CY=0 | CNC | 16-bit address | 03 | None | Direct |
Call on Even Parity i.e P=1 | CPE | 16-bit address | 03 | None | Direct |
Call on Odd Parity i.e P=0 | CPO | 16-bit address | 03 | None | Direct |
Call on Zero i.e Z=1 | CZ | 16-bit address | 03 | None | Direct |
Call on No Zero i.e Z=0 | CNZ | 16-bit address | 03 | None | Direct |
Call on Minus i.e S=1 | CM | 16-bit address | 03 | None | Direct |
Call on Positive i.e S=0 | CP | 16-bit address | 03 | None | Direct |
The branching instructions are the most powerful instruction because
Jump Instructions- Unconditional Jump
- Conditional Jump
Call Instructions- Unconditional
- Conditional
Return Instructions - Unconditional
- Conditional
- Unconditional Jump
- Conditional Jump
- Unconditional
- Conditional
- Unconditional
- Conditional
Jump Instructions
Unconditional Jump
JMP: Jump Unconditionally To Specified Memory Location
Description: It is a 3-byte instruction which transfers the program
sequence to the memory location specified by the 1
6-bit address in the operand without checking any condition.
Example:
To instruct the microprocessor to go to the memory
location F009H
Conditional Jump
Instruction: JMP F009H
Call Instructions
Unconditional Call
CALL: Unconditionally Call To The Subroutine
Description: The program sequence is transferred to the address
specified by the operand. Before the transfer, address
of the next instruction to CALL( the contents of the
program counter) is pushed on the stack
Instruction: CALL 2050HCall Instructions
Example:
To instruct the microprocessor to call a subroutine located at 2050H
Conditional Call
Task | Opcode | Operand | Byte(s) | Flags | Addressing Mode |
Return from subroutine | RET | 01 | None | Implied/ Implicit |
Call Instructions
Unconditional Ret
RET : Return From Subroutine Unconditionally
Description: The program sequence is transferred from the subroutine to the calling program. The two bytes from the top of the stack are copied into the program counter and the program execution begins at the new address.
Note: This instruction is used in conjunction with the CALL or conditional call instructions.
Call Instructions
Conditional Ret
Task
Opcode
Operand
Byte(s)
Flags
Addressing Mode
Return on Carry i.e CY=1
RC
01
None
Implied/ Implicit
Return with No Carry i.e CY=0
RNC
01
None
Implied/ Implicit
Return on Parity i.e P=1
RPE
01
None
Implied/ Implicit
Return on Parity i.e P=0
RPO
01
None
Implied/ Implicit
Return on Zero i.e Z=1
RZ
01
None
Implied/ Implicit
Return on No Zero i.e Z=0
RNZ
01
None
Implied/ Implicit
Return on Minus i.e S=1
RM
01
None
Implied/ Implicit
Return on Positive i.e S=0
RP
01
None
Implied/ Implicit
Task
Opcode
Operand
Byte(s)
Flags
Addressing Mode
Return on Carry i.e CY=1
RC
01
None
Implied/ Implicit
Return with No Carry i.e CY=0
RNC
01
None
Implied/ Implicit
Return on Parity i.e P=1
RPE
01
None
Implied/ Implicit
Return on Parity i.e P=0
RPO
01
None
Implied/ Implicit
Return on Zero i.e Z=1
RZ
01
None
Implied/ Implicit
Return on No Zero i.e Z=0
RNZ
01
None
Implied/ Implicit
Return on Minus i.e S=1
RM
01
None
Implied/ Implicit
Return on Positive i.e S=0
RP
01
None
Implied/ Implicit
0 Comments