Instruction
set
·
Instruction
is a binary pattern entered through an input device in memory to command the
microprocessor to perform that specific function.
·
8
bit microprocessor can have
·
8085
uses 246 combinations & which represent 74 instructions.
These 74 different
instructions are known as instruction set
They are categorized
into 5 different groups
·
Data
transfer instruction
·
Arithmetic
instructions
·
Logical
instructions
·
Branch
operations
·
Machine
control instructions
Each instruction
has two parts:
- Opcode – operation to be performed
- Operands – data to be operated
Notations
used:
- M –
Memory location pointed by HL register pair
- R –
8-bit register
- Rs -
Source register
- Rd –
Destination register
Data
transfer Instructions
1. MOV Rd , Rs E.g. MOV B , A
Copy data from source register in to
destination register
2. MVI R ,
8-bit E.g. MVI B,
4FH
Load 8-bit data into a register
3. LXI Rp, 16-bit E.g. LXI B ,2050H
Load 16-bit number in a register pair
4. OUT 8-bit E.g. OUT 01H
Write
data from accumulator to an output port.
5. IN 8-bit E.g. IN 07H
Read data byte from port address and
store it in accumulator
6.LDA 16-bit E.g. LDA 2050H
Copy data byte into A from memory
specified by 16-bit adrees.
7. STA 16-bit E.g.
STA 2070H
Copy the data byte from A into memory
specified by 16- bit address.
8. LDAX Rp E.g. LDAX B
Copy the data byte into A from memory
specified by the address in register
pair
9.STAX Rp E.g. STAX D
Copy the data byte from A into the memory
specified by address in register pair
10.MOV R, M E.g. MOV B,M
Copy the data byte into register from the memory
specified by the address in HL register
pair
11. MOV M, R E.g. MOV M,C
Copy the data byte from the register
into the memory specified by the address in HL
register pair
Arithmetical
instructions
1. ADD R E.g.
ADD B
Add the content of specified register
to the content of accumulator &
result stored in accumulator
2. ADI 8-bit E.g. ADI
37H
Add 8-bit data to the content of A
3. ADD M E.g.
ADD M
Add content of memory to content of A.
Memory location specified in HL register
pair
4. ADC R E.g.
ADC B
Add the content of specified register
to the content of accumulator with
carry& result stored in accumulator
5. ACI 8-bit E.g.
ACI 37H
Add 8-bit data to the content of A
6. ADC M E.g.
ADC M
Add content of memory to content of A
with carry. Memory location specified in HL register pair
7.SUB R E.g.
SUB B
Subtract the content of specified
register to the content of Accumulator & result stored in accumulator
8. SUI 8-bit E.g.
SUI 37H
Subtract 8-bit data to the content of A
9. SUB M E.g.
SUB M
Subtract content of memory to content
of A. Memory location specified in HL register pair
10. SBB R E.g.
SBB B
Subtract the content of specified
register to the content of accumulator with borrow& result stored in
accumulator
11. SBI 8-bit E.g. SUI
37H
Subtract 8-bit data to the content of A
with borrow
12. SBB M E.g.
SBB M
Subtract content of memory to content
of A with borrow. Memory location
specified in
HL register pair
13 INR R E.g.
INR D
Increment the content of register
14. INR M E.g.
INR M
Increment the content memory, which is
specified in HL register pair
15. DCR R E.g.
DCR D
Decrement the content of register
16. DCR M E.g.
DCR M
Decrement the content memory, which is
specified in HL register pair
17.INX RP E.g.
INX B
Increment the content of register pair
18. DCX RP E.g. DC
B
Decrement the content of register pair
19. DAD Rp E.g. DAD
B
Add content of register pair to
content of HL register pair & result
stored in HL
Logical
instructions
1.ANA R E.g.
ANA B
Logically AND the content of register
with content of A
2. ANI 8-bit E.g. ANI
74H
Logically AND 8-bit data with content of
A
3. ANA M E.g.
ANA M
Logically AND content of memory with
content of A. Memory location specified in
HL register pair
4. ORA R E.g.
ORA B
Logically OR the content of register
with content of A
5. ORI 8-bit E.g. ORI
74H
Logically OR 8-bit data with content of
A
6. ORA M E.g.
ORA M
Logically OR content of memory with
content of A. Memory location specified
in HL register pair
7. XRA R E.g.
XRA B
Exclusive-OR the content of register
with content of A
8. XRI 8-bit E.g. XRI
74H
Exclusive-OR 8-bit data with content
of A
9. XRA M E.g. XRA
M
Exclusive-OR content of memory with
content of A. Memory location
specified in
HL register pair
10.CMP R E.g.
CMP B
Compare the content of register with the
content of A
11. CPI 8-bit E.g. CPI
34H
Compare the 8-bit data with the content
of A
Branch
Instructions
1.JMP 16-bit
address E.g. JMP
2050H
Change program sequence to the
specified memory
2. JZ 16-bit
address E.g. JZ
2050H
Change program sequence to specified
memory location, If the zero flag is
set.
3. JNZ 16-bit
address E.g. JNZ
2050H
Change program sequence to specified
memory location, If the zero flag is
reset.
4.JC 16-bit
address E.g.
JZ 2050H
Change program sequence to specified memory location, If the carry flag is set.
5. JNC 16-bit
address E.g. JNC
2050H
Change program sequence to specified
memory location, If the carry flag is
reset.
6.CALL 16-bit
address E.g. CALL
2040H
Change the program sequence to the location
of subroutine.
7. RET E.g.
RET
Returning to the main program after completing
subroutine program
Machine
Control Instructions
1.HLT
Stop processing and wait
2. NOP
Do not perform any operation
This comment has been removed by the author.
ReplyDelete