SlideShare a Scribd company logo
1 of 121
Instruction Set
of 8085
Instruction Set of 8085
 An instruction is a binary pattern designed inside a
microprocessor to perform a specific function.
 The entire group of instructions that a
microprocessor supports is called Instruction
Set.
 8085 has 246 instructions.
 Each instruction is represented by an 8-bit binary
value.
 These 8-bits of binary value is called Op-Code or
Instruction Byte.
Classification of Instruction Set
 DataTransfer Instruction
 Arithmetic Instructions
 Logical Instructions
 Branching Instructions
 Control Instructions
1.DataTransfer Instructions
 These instructions move data between
registers, or between memory and
registers.
 These instructions copy data from source
to destination(without changing the
original data ).
Opcode Operand
MOV Rd, Rs
M, Rs
Rd, M
 This instruction copies the contents of the source
register into the destination register. (contents of the
source register are not altered)
 If one of the operands is a memory location, its location
is specified by the contents of the HL registers.
 Example: MOV B, C or MOV B, M
MOV-Copy from source to destination
A 20 B 20
A F
B 30 C
D E
H 20 L 50
A 20 B
BEFORE EXECUTION AFTER EXECUTION
MOV B,A
A F
B 30 C
D E
H 20 L 50
A F
B C
D E
H 20 L 50
A F
B C 40
D E
H 20 L 50
MOV M,B
MOV C,M
40 40
30
Opcode Operand
MVI Rd, Data
M, Data
 The 8-bit data is stored in the destination register or
memory.
 If the operand is a memory location, its location is
specified by the contents of the H-L registers.
 Example: MVI B, 60H or MVI M, 40H
MVI-Move immediate 8-bit
A F
B C
D E
H L
A F
B 60 C
D E
H L
AFTER EXECUTION
BEFORE EXECUTION
MVI B,60H
40
HL=2050
2051H
204FH 204F
2051H
MVI M,40H
BEFORE EXECUTION AFTER EXECUTION
HL=2050
LDA-Load accumulator
Opcode Operand
LDA 16-bit address
 The contents of a memory location, specified by a 16-
bit address in the operand, are copied to the
accumulator.
 The contents of the source are not altered.
 Example: LDA 2000H
A
30
A 30
30
AFTER EXECUTION
BEFORE EXECUTION
LDA
2000H
2000H 2000H
Opcode Operand
LDAX B/D Register Pair
 The contents of the designated register pair point to a memory
location.
 This instruction copies the contents of that memory location into
the accumulator.
 The contents of either the register pair or the memory location are
not altered.
 Example: LDAX D
LDAX-Load accumulator indirect
A F
B C
D 20 E 30
A 80 F
B C
D 20 E 30
80 80
AFTER EXECUTION
BEFORE EXECUTION
LDAX D
2030H
2030H
Opcode Operand
LXI Reg. pair, 16-bit data
 This instruction loads 16-bit data in the register pair.
 Example: LXI H, 2030 H
LXI-Load register pair immediate
A F
B C
H L
A 80 F
B C
H 90 L 30
30
90
50
AFTER EXECUTION
BEFORE EXECUTION
LXI H,
2030
2030H
9030H
2031H
M=50
Opcode Operand
LHLD 16-bit address
 This instruction copies the contents of memory
location pointed out by 16-bit address into register L.
 It copies the contents of next memory location into
register H.
 Example: LHLD 2030 H
LHLD-Load H and L registers direct
A F
B C
H L
A 80 F
B C
H 85 L 00
00
85
60
AFTER EXECUTION
BEFORE EXECUTION
LHLD
2030
2030H 8500H
M=60
Opcode Operand
STA 16-bit address
 The contents of accumulator are copied into the
memory location specified by the operand.
 Example: STA 2000H
STA-Store accumulator direct
A 50 A
50
50
AFTER EXECUTION
BEFORE EXECUTION
STA
2000H
2000H 2000H
Opcode Operand
STAX Reg. pair
 The contents of accumulator are copied into the
memory location specified by the contents of the
register pair.
 Example: STAX B
STAX-Store accumulator indirect
collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
B 85 C 00
A=1AH
BEFORE EXECUTION AFTER EXECUTION
STAX B
1A
8500H
Opcode Operand
SHLD 16-bit address
 The contents of register L are stored into memory
location specified by the 16-bit address.
 The contents of register H are stored into the next
memory location.
 Example: SHLD 2550H
SHLD-Store H and L registers direct
D E
H 70 L 80
BEFORE EXECUTION AFTER EXECUTION
SHLD
8500
80
70
8500H
8501H
Opcode Operand
XCHG None
 The contents of register H are exchanged with the
contents of register D.
 The contents of register L are exchanged with the
contents of register E.
 Example: XCHG
XCHG-Exchange H and L with D and E
D 20 E 40
H 70 L 80
D 70 E 80
H 20 L 40
BEFORE EXECUTION AFTER EXECUTION
XCHG
Opcode Operand
SPHL None
 This instruction loads the contents of H-L pair into SP.
 Example: SPHL
SPHL-Copy H and L registers to the
stack pointer
H 25 L 00
SP
BEFORE EXECUTION
AFTER EXECUTION
SPHL
SP 2500
H 25 L 00
Opcode Operand
XTHL None
 The contents of L register are exchanged with the
location pointed out by the contents of the SP.
 The contents of H register are exchanged with the next
location (SP + 1).
 Example: XTHL
XTHL-Exchange H and L with top of
stack
H 30 L 40
SP 2700
BEFORE EXECUTION
50
60
H
60
L
50
SP 2700
40
30
AFTER EXECUTION
XTHL
2700H
2701H
2702H
2700H
2701H
2702H
L=SP
H=(SP+1)
Opcode Operand Description
PCHL None Load program counter with H-
L contents
 The contents of registers H and L are copied into the
program counter (PC).
 The contents of H are placed as the high-order byte
and the contents of L as the low-order byte.
 Example: PCHL
Opcode Operand
PUSH Reg. pair
 The contents of register pair are copied onto stack.
 SP is decremented and the contents of high-order
registers (B, D, H,A) are copied into stack.
 SP is again decremented and the contents of low-order
registers (C, E, L, Flags) are copied into stack.
 Example: PUSH B
PUSH-Push register pair onto stack
PUSH H
Opcode Operand
POP Reg. pair
 The contents of top of stack are copied into register pair.
 The contents of location pointed out by SP are copied to the
low-order register (C, E, L, Flags).
 SP is incremented and the contents of location are
copied to the high-order register (B, D, H,A).
 Example: POP H
POP- Pop stack to register pair
POP H
Opcode Operand
IN 8-bit port address
 The contents of I/O port are copied into accumulator.
 Example: IN 8C H
IN- Copy data to accumulator from a
port with 8-bit address
10 A
10 A 10
BEFORE EXECUTION
AFTER EXECUTION
IN 80H
PORT
80H
PORT
80H
Opcode Operand
OUT 8-bit port address
 The contents of accumulator are copied into the I/O
port.
 Example: OUT 78H
OUT- Copy data from accumulator to a
port with 8-bit address
10 A 40
40 A 40
BEFORE EXECUTION
AFTER EXECUTION
OUT 50H
PORT
50H
PORT
50H
2.Arithmetic Instructions
 These instructions perform the
operations like:
◦ Addition
◦ Subtract
◦ Increment
◦ Decrement
Addition
 Any 8-bit number, or the contents of register, or
the contents of memory location can be added to
the contents of accumulator.
 The result (sum) is stored in the accumulator.
 No two other 8-bit registers can be added
directly.
 Example: The contents of register B cannot be
added directly to the contents of register C.
Opcode Operand Description
ADD R
M
Add register or memory to
accumulator
 The contents of register or memory are added to the
contents of accumulator.
 The result is stored in accumulator.
 If the operand is memory location, its address is specified by
H-L pair.
 Example: ADD B or ADD M
ADD
B C
05
D E
H L
B C 05
D E
H L
AFTER EXECUTION
BEFORE EXECUTION
B C
D E
H 20 L 50
B C
D E
H 20 L 50
AFTER EXECUTION
BEFORE EXECUTION
A 09
A
04
ADD C
A=A+C
ADD M
A=A+M
10
10
2050 2050
A 04 A 14
04+05=09
04+10=14
Opcode Operand Description
ADC R
M
Add register or memory to
accumulator with carry
 The contents of register or memory and Carry Flag (CY) are added to the
contents of accumulator.
 The result is stored in accumulator.
 If the operand is memory location, its address is specified by H-L pair.
 All flags are modified to reflect the result of the addition.
 Example: ADC B or ADC M
ADC
B C
05
D E
H L
A 50
B C 20
D E
H L
A 56
AFTER EXECUTION
BEFORE EXECUTION
ADC C
A=A+C+CY
CY
01
CY 1
A 06 A 37
H 20 L 50
H 20 L 50
ADC M
A=A+M+CY
AFTER EXECUTION
BEFORE EXECUTION
30 30
2050H 2050H
06+1+30=37
50+05+01=56
Opcode Operand Description
ADI 8-bit data Add immediate to accumulator
 The 8-bit data is added to the contents of accumulator.
 The result is stored in accumulator.
 All flags are modified to reflect the result of the
addition.
 Example: ADI 45 H
ADI
A 03
AFTER EXECUTION
BEFORE EXECUTION
ADI 05H
A=A+DATA(8)
A 08
03+05=08
collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
Opcode Operand Description
ACI 8-bit data Add immediate to
accumulator with carry
 The 8-bit data and the Carry Flag (CY) are added to
the contents of accumulator.
 The result is stored in accumulator.
 All flags are modified to reflect the result of the
addition.
 Example: ACI 45 H
ACI
CY 1
A 05
AFTER EXECUTION
BEFORE EXECUTION
ACI 20H
A=A+DATA
(8)+CY
A 26
05+20+1=26
Opcode Operand Description
DAD Reg. pair Add register pair to H-L pair
 The 16-bit contents of the register pair are added to
the contents of H-L pair.
 The result is stored in H-L pair.
 If the result is larger than 16 bits, then CY is set.
 No other flags are changed.
 Example: DAD B or DAD D
DAD
D 12 E 34
H 23 L 45
D 12 E 34
H 35 L 79
BEFORE EXECUTION AFTER EXECUTION
DAD D
DAD D HL=HL+DE
DAD B HL=HL+BC
1234
2345 +
-------
3579
Subtraction
 Any 8-bit number, or the contents of register, or
the contents of memory location can be
subtracted from the contents of accumulator.
 The result is stored in the accumulator.
 Subtraction is performed in 2’s complement form.
 If the result is negative, it is stored in 2’s
complement form.
 No two other 8-bit registers can be subtracted
directly.
collected by C.Gokul AP/EEE,VCET
Opcode Operand Description
SUB R
M
Subtract register or memory
from accumulator
 The contents of the register or memory location are
subtracted from the contents of the accumulator.
 The result is stored in accumulator.
 If the operand is memory location, its address is specified by
H-L pair.
 All flags are modified to reflect the result of subtraction.
 Example: SUB B or SUB M
SUB
B C
04
D E
H L
B C 04
D E
H L
AFTER EXECUTION
BEFORE EXECUTION
B C
D E
H 20 L 50
B C
D E
H 20 L 50
AFTER EXECUTION
BEFORE EXECUTION
A 05
A
09
SUB C
A=A-C
SUB M
A=A-M
10
10
2050 2050
A 14 A 04
09-04=05
14-10=04
Opcode Operand Description
SBB R
M
Subtract register or memory
from accumulator with borrow
 The contents of the register or memory location and Borrow Flag (i.e. CY)
are subtracted from the contents of the accumulator.
 The result is stored in accumulator.
 If the operand is memory location, its address is specified by H-L pair.
 All flags are modified to reflect the result of subtraction.
 Example: SBB B or SBB M
SBB
B C
05
D E
H L
A 08
B C 05
D E
H L
A 02
AFTER EXECUTION
BEFORE EXECUTION
SBB C
A=A-C-CY
CY
01
CY 1
A 06 A 03
H 20 L 50
H 20 L 50
SBB M
A=A-M-CY
AFTER EXECUTION
BEFORE EXECUTION
02 02
2050H 2050H
08-05-01=02
06-02-1=03
Opcode Operand Description
SUI 8-bit data Subtract immediate from
accumulator
 The 8-bit data is subtracted from the contents of the
accumulator.
 The result is stored in accumulator.
 All flags are modified to reflect the result of subtraction.
 Example: SUI 05H
SUI
A 08
AFTER EXECUTION
BEFORE EXECUTION
SUI 05H
A=A-DATA(8)
A 03
08-05=03
Opcode Operand Description
SBI 8-bit data Subtract immediate from
accumulator with borrow
 The 8-bit data and the Borrow Flag (i.e. CY) is subtracted
from the contents of the accumulator.
 The result is stored in accumulator.
 All flags are modified to reflect the result of subtraction.
 Example: SBI 45 H
SBI
collected by C.Gokul AP/EEE,VCET
CY 1
A 25
AFTER EXECUTION
BEFORE EXECUTION
SBI 20H
A=A-DATA
(8)-CY
A 04
25-20-01=04
Increment / Decrement
 The 8-bit contents of a register or a
memory location can be incremented or
decremented by 1.
 The 16-bit contents of a register pair can
be incremented or decremented by 1.
 Increment or decrement can be
performed on any register or a memory
location.
Opcode Operand Description
INR R
M
Increment register or
memory by 1
 The contents of register or memory location are incremented
by 1.
 The result is stored in the same place.
 If the operand is a memory location, its address is specified by
the contents of H-L pair.
 Example: INR B or INR M
INR
B 10 C
D E
H L
A
B 11 C
D E
H L
A
AFTER EXECUTION
BEFORE EXECUTION
H
20
L
50
H
20
L
50
10 11
2050H 2050H
AFTER EXECUTION
BEFORE EXECUTION
INR M
M=M+1
B 10 C
D E
H L
A
BEFORE EXECUTION
INR B
R=R+1
10+1=11
10+1=11
Opcode Operand Description
INX R Increment register pair by 1
 The contents of register pair are incremented by 1.
 The result is stored in the same place.
 Example: INX H or INX B or INX D
INX
B C
D E
H 10 L 20
B C
D E
H 10 L 21
AFTER EXECUTION
BEFORE EXECUTION
SP
SP
INX H
RP=RP+1
1020+1=1021
Opcode Operand Description
DCR R
M
Decrement register or
memory by 1
 The contents of register or memory location are decremented
by 1.
 The result is stored in the same place.
 If the operand is a memory location, its address is specified by
the contents of H-L pair.
 Example: DCR B or DCR M
DCR
B C
D E 19
H L
A
AFTER EXECUTION
B C
D E 20
H L
A
BEFORE EXECUTION
DCR E
R=R-1
H
20
L
50
H
20
L
50
21 20
2050H
AFTER EXECUTION
BEFORE EXECUTION
DCR M
M=M-1
2050H
21-1=20
20-1=19
Opcode Operand Description
DCX R Decrement register pair by 1
 The contents of register pair are decremented by 1.
 The result is stored in the same place.
 Example: DCX H or DCX B or DCX D
DCX
B C
D E
H 10 L 21
B C
D E
H 10 L 20
AFTER EXECUTION
BEFORE EXECUTION
SP
SP
DCX H
RP=RP-1
3.Logical Instructions
 These instructions perform logical operations on
data stored in registers, memory and status flags.
 The logical operations are:
◦ AND
◦ OR
◦ XOR
◦ Rotate
◦ Compare
◦ Complement
AND, OR, XOR
 Any 8-bit data, or the contents of register,
or memory location can logically have
◦ AND operation
◦ OR operation
◦ XOR operation
with the contents of accumulator.
 The result is stored in accumulator.
Opcode Operand Description
ANA R
M
Logical AND register or
memory with accumulator
 The contents of the accumulator are logically ANDed with the contents of
register or memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by the contents
of H-L pair.
 S, Z, P are modified to reflect the result of the operation.
 CY is reset and AC is set.
 Example: ANA B or ANA M.
collected by C.Gokul AP/EEE,VCET
B 10 C
D E
H L
A
B 0F C
D E
H L
A 0A
AFTER EXECUTION
ANA B
A=A and R
B 0F C
D E
H L
A AA
BEFORE EXECUTION
CY AC CY 0 AC 1
AFTER EXECUTION
BEFORE EXECUTION
CY AC CY 0 AC 1
A 11
A 55
H 20 L 50 H 20 L 50
B3 B3
2050H
ANA M
A=A and M
2050H
1010 1010=AAH
0000 1111=0FH
0000 1010=0AH
0101 0101=55H
1011 0011=B3H
0001 0001=11H
Opcode Operand Description
ANI 8-bit data Logical AND immediate with
accumulator
 The contents of the accumulator are logically ANDed with the
8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
 CY is reset,AC is set.
 Example: ANI 86H.
CY AC
A B3
AFTER EXECUTION
BEFORE EXECUTION
CY
0
AC 1
A 33
ANI 3FH
A=A and DATA(8)
1011 0011=B3H
0011 1111=3FH
0011 0011=33H
Opcode Operand Description
ORA R
M
Logical OR register or memory with
accumulator
 The contents of the accumulator are logically ORed with the contents of the
register or memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by the contents of H-L
pair.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
 Example: ORA B or ORA M.
AFTER EXECUTION
BEFORE EXECUTION
CY AC
ORA B
A=A or R
1010 1010=AAH
0001 0010=12H
1011 1010=BAH
B 12 C
D E
H L
A AA
B 12 C
D E
H L
A BA
CY 0 AC 0
AFTER EXECUTION
BEFORE EXECUTION
CY AC
ORA M
A=A or M
0101 0101=55H
1011 0011=B3H
1111 0111=F7H
H 20 L 50
A 55 A F7
CY
0
AC 0
H 20 L 50
B3 B3
2050H 2050H
Opcode Operand Description
ORI 8-bit data Logical OR immediate with
accumulator
 The contents of the accumulator are logically ORed with the
8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
 Example: ORI 86H.
CY AC
A B3
AFTER EXECUTION
BEFORE EXECUTION
CY
0
AC
0
A BB
ORI 08H
A=A or DATA(8)
1011 0011=B3H
0000 1000=08H
1011 1011=BBH
Opcode Operand Description
XRA R
M
Logical XOR register or
memory with accumulator
 The contents of the accumulator are XORed with the contents of
the register or memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by the
contents of H-L pair.
 S, Z, P are modified to reflect the result of the operation.
 CY and AC are reset.
 Example: XRA B or XRA M.
B 10 C
D E
H L
A
B C 2D
D E
H L
A 87
AFTER EXECUTION
XRA C
A=A xor R
B C 2D
D E
H L
A AA
BEFORE EXECUTION
CY AC CY 0 AC 0
1010 1010=AAH
0010 1101=2DH
1000 0111=87H
H 20 L 50
A 55
AFTER EXECUTION
XRA M
A=A xor M
BEFORE EXECUTION
CY AC CY 0 AC 0
0101 0101=55H
1011 0011=B3H
1110 0110=E6H
H 20 L 50
A E6
B3 B3
2050H 2050H
Opcode Operand Description
XRI 8-bit data XOR immediate with
accumulator
 The contents of the accumulator are XORed with the
8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
 Example: XRI 86H.
CY AC
A B3
AFTER EXECUTION
BEFORE EXECUTION
CY
0
AC
0
A 8A
XRI 39H
A=A xor DATA(8)
1011 0011=B3H
0011 1001=39H
1000 1010=8AH
Compare
 Any 8-bit data, or the contents of register,
or memory location can be compares for:
◦ Equality
◦ Greater Than
◦ Less Than
with the contents of accumulator.
 The result is reflected in status flags.
Opcode Operand Description
CMP R
M
Compare register or
memory with accumulator
 The contents of the operand (register or memory) are
compared with the contents of the accumulator.
 Both contents are preserved .
B 10 C
D E
H L
A
B C
D 20 E
H L
A 10
AFTER EXECUTION
CMP D
A-R
B C
D 20 E
H L
A 10
BEFORE EXECUTION
CY Z CY 01 Z 0
AFTER EXECUTION
BEFORE EXECUTION
CY Z CY 0
ZF 1
A B8
A B8
H 20 L 50 H 20 L 50
B8 B8
2050H
CMP M
A-M
2050H
A>R: CY=0
A=R: ZF=1
A<R: CY=1
A>M: CY=0
A=M: ZF=1
A<M: CY=1
10<20:CY=01
B8=B8 :ZF=01
Opcode Operand Description
CPI 8-bit data Compare immediate with
accumulator
 The 8-bit data is compared with the contents of
accumulator.
 The values being compared remain unchanged.
CY Z
A BA
AFTER EXECUTION
BEFORE EXECUTION
CY
0
AC
0
A BA
CPI 30H
A-DATA
A>DATA: CY=0
A=DATA: ZF=1
A<DATA: CY=1
BA>30 : CY=00
Rotate
 Each bit in the accumulator can be shifted
either left or right to the next position.
Opcode Operand Description
RLC None Rotate accumulator left
 Each binary bit of the accumulator is rotated left by one
position.
 Bit D7 is placed in the position of D0 as well as in the Carry
flag.
 CY is modified according to bit D7.
 S, Z, P,AC are not affected.
 Example: RLC.
B7 B6 B5 B4 B3 B2 B1 B0
CY
B6 B5 B4 B3 B2 B1 B0 B7
B7
AFTER EXECUTION
BEFORE EXECUTION
Opcode Operand Description
RRC None Rotate accumulator right
 Each binary bit of the accumulator is rotated right by one
position.
 Bit D0 is placed in the position of D7 as well as in the Carry
flag.
 CY is modified according to bit D0.
 S, Z, P,AC are not affected.
 Example: RRC.
B7 B6 B5 B4 B3 B2 B1 B0 CY
B0 B7 B6 B5 B4 B3 B2 B1 B0
AFTER EXECUTION
BEFORE EXECUTION
collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
Opcode Operand Description
RAL None Rotate accumulator left
through carry
 Each binary bit of the accumulator is rotated left by one
position through the Carry flag.
 Bit D7 is placed in the Carry flag, and the Carry flag is placed
in the least significant position D0.
 CY is modified according to bit D7.
 S, Z, P,AC are not affected.
 Example: RAL.
B7 B6 B5 B4 B3 B2 B1 B0
CY
B6 B5 B4 B3 B2 B1 B0 CY
B7
AFTER EXECUTION
BEFORE EXECUTION
Opcode Operand Description
RAR None Rotate accumulator right
through carry
 Each binary bit of the accumulator is rotated right by one
position through the Carry flag.
 Bit D0 is placed in the Carry flag, and the Carry flag is placed
in the most significant position D7.
 CY is modified according to bit D0.
 S, Z, P,AC are not affected.
 Example: RAR.
B7 B6 B5 B4 B3 B2 B1 B0 CY
CY B7 B6 B5 B4 B3 B2 B1 B0
AFTER EXECUTION
BEFORE EXECUTION
Complement
 The contents of accumulator can be
complemented.
 Each 0 is replaced by 1 and each 1 is
replaced by 0.
Opcode Operand Description
CMA None Complement accumulator
 The contents of the accumulator are complemented.
 No flags are affected.
 Example: CMA. A=A’
A 00 A FF
BEFORE EXECUTION AFTER EXECUTION
Opcode Operand Description
CMC None Complement carry
 The Carry flag is complemented.
 No other flags are affected.
 Example: CMC => c=c’
BEFORE EXECUTION
AFTER EXECUTION
C 00 C FF
Opcode Operand Description
STC None Set carry
 The Carry flag is set to 1.
 No other flags are affected.
 Example: STC CF=1
S-set (1) C-clear (0)
4.Branching Instructions
 The branch group instructions
allows the microprocessor to change
the sequence of program either
conditionally or under certain test
conditions.The group includes,
 (1) Jump instructions,
 (2) Call and Return instructions,
 (3) Restart instructions,
Opcode Operand Description
JMP 16-bit
address
Jump unconditionally
 The program sequence is transferred to the memory
location specified by the 16-bit address given in the
operand.
 Example: JMP 2034 H.
Opcode Operand Description
Jx 16-bit
address
Jump conditionally
 The program sequence is transferred to the memory
location specified by the 16-bit address given in the
operand based on the specified flag of the PSW.
 Example: JZ 2034 H.
Jump Conditionally
Opcode Description Status Flags
JC Jump if Carry CY = 1
JNC Jump if No Carry CY = 0
JZ Jump if Zero Z = 1
JNZ Jump if No Zero Z = 0
JPE Jump if Parity Even P = 1
JPO Jump if Parity Odd P = 0
A-Above , B-Below , C-Carry , Z-Zero , P-Parity
Opcode Operand Description
CALL 16-bit
address
Call unconditionally
 The program sequence is transferred to the memory
location specified by the 16-bit address given in the
operand.
 Before the transfer, the address of the next instruction after
CALL (the contents of the program counter) is pushed onto
the stack.
 Example: CALL 2034 H.
Call Conditionally
Opcode Description Status Flags
CC Call if Carry CY = 1
CNC Call if No Carry CY = 0
CP Call if Positive S = 0
CM Call if Minus S = 1
CZ Call if Zero Z = 1
CNZ Call if No Zero Z = 0
CPE Call if Parity Even P = 1
CPO Call if Parity Odd P = 0
Opcode Operand Description
RET None Return unconditionally
 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 program execution begins at
the new address.
 Example: RET.
Return Conditionally
Opcode Description Status Flags
RC Return if Carry CY = 1
RNC Return if No Carry CY = 0
RP Return if Positive S = 0
RM Return if Minus S = 1
RZ Return if Zero Z = 1
RNZ Return if No Zero Z = 0
RPE Return if Parity Even P = 1
RPO Return if Parity Odd P = 0
Opcode Operand Description
RST 0 – 7 Restart (Software Interrupts)
 The RST instruction jumps the control to one of eight
memory locations depending upon the number.
 These are used as software instructions in a program to
transfer program execution to one of the eight
locations.
 Example: RST 1 or RST 2 ….
Instruction Code Vector Address
RST 0 0*8=0000H
RST 1 1*8=0008H
RST 2 2*8=0010H
RST 3 3*8=0018H
RST 4 4*8=0020H
RST 5 5*8=0028H
RST 6 6*8=0030H
RST 7 7*8=0038H
5. Control Instructions
 The control instructions control the
operation of microprocessor.
collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
Opcode Operand Description
NOP None No operation
 No operation is performed.
 The instruction is fetched and decoded but no
operation is executed.
 Example: NOP
Opcode Operand Description
HLT None Halt
 The CPU finishes executing the current instruction
and halts any further execution.
 An interrupt or reset is necessary to exit from the halt
state.
 Example: HLT
Opcode Operand Description
DI None Disable interrupt
 The interrupt enable flip-flop is reset and all the
interrupts except the TRAP are disabled.
 No flags are affected.
 Example: DI
Opcode Operand Description
EI None Enable interrupt
 The interrupt enable flip-flop is set and all interrupts
are enabled.
 No flags are affected.
 This instruction is necessary to re-enable the
interrupts (except TRAP).
 Example: EI
Opcode Operand Description
RIM None Read Interrupt Mask
 This is a multipurpose instruction used to read the
status of interrupts 7.5, 6.5, 5.5 and read serial data
input bit.
 The instruction loads eight bits in the accumulator
with the following interpretations.
 Example: RIM
RIM Instruction
Opcode Operand Description
SIM None Set Interrupt Mask
 This is a multipurpose instruction and used to
implement the 8085 interrupts 7.5, 6.5, 5.5, and serial
data output.
 The instruction interprets the accumulator contents as
follows.
 Example: SIM
SIM Instruction
Thank
You

More Related Content

What's hot

8085 arithmetic instructions
8085 arithmetic instructions8085 arithmetic instructions
8085 arithmetic instructionsprashant1271
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)Ravi Anand
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
Instruction set of 8085 microprocessor
Instruction set of 8085 microprocessorInstruction set of 8085 microprocessor
Instruction set of 8085 microprocessorRahul Sahu
 
Instructionset8085
Instructionset8085Instructionset8085
Instructionset8085Fawad Pathan
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessorhepzijustin
 
8085 data transfer instruction set
8085 data transfer instruction set8085 data transfer instruction set
8085 data transfer instruction setprashant1271
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)AmitPaliwal20
 
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction setSaumitra Rukmangad
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3Neelam Kapoor
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction setjemimajerome
 

What's hot (19)

8085 arithmetic instructions
8085 arithmetic instructions8085 arithmetic instructions
8085 arithmetic instructions
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
Instruction set of 8085 microprocessor
Instruction set of 8085 microprocessorInstruction set of 8085 microprocessor
Instruction set of 8085 microprocessor
 
Instructionset8085
Instructionset8085Instructionset8085
Instructionset8085
 
Arithmetic and logical instructions
Arithmetic and logical instructionsArithmetic and logical instructions
Arithmetic and logical instructions
 
8085 is details
8085 is details8085 is details
8085 is details
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessor
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
8085 data transfer instruction set
8085 data transfer instruction set8085 data transfer instruction set
8085 data transfer instruction set
 
Instruction set
Instruction setInstruction set
Instruction set
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)
 
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil KawareInstruction set of 8085 Microprocessor By Er. Swapnil Kaware
Instruction set of 8085 Microprocessor By Er. Swapnil Kaware
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3
 
8085 alp programs
8085 alp programs8085 alp programs
8085 alp programs
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 

Similar to 8085 Microprocessor Instruction Set Guide

instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptssuserb448e2
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRTHEE CAVE
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptxISMT College
 
microp-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :Pmicrop-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :PJathin Kanumuri
 
microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2Jathin Kanumuri
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set classshiji v r
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONSRamaPrabha24
 
8085 instruction set.pptx
8085 instruction set.pptx8085 instruction set.pptx
8085 instruction set.pptxAchintKaur27
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086Vijay Kumar
 
03 addr mode &amp; instructions
03 addr mode &amp; instructions03 addr mode &amp; instructions
03 addr mode &amp; instructionsShubhamBakshi14
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085techbed
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086sravanithonta79
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdfHimanshuPant41
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085vishalgohel12195
 

Similar to 8085 Microprocessor Instruction Set Guide (20)

UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).ppt
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
8085 instructions details
8085 instructions details8085 instructions details
8085 instructions details
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIR
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx
 
8085 Instructions.pdf
8085 Instructions.pdf8085 Instructions.pdf
8085 Instructions.pdf
 
microp-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :Pmicrop-8085 74 instructions for mct-A :P
microp-8085 74 instructions for mct-A :P
 
microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2microp-8085 74 instructions for mct-A :P-2
microp-8085 74 instructions for mct-A :P-2
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set class
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS
 
Microprocessor 11el01
Microprocessor 11el01Microprocessor 11el01
Microprocessor 11el01
 
8085 instruction set.pptx
8085 instruction set.pptx8085 instruction set.pptx
8085 instruction set.pptx
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
03 addr mode &amp; instructions
03 addr mode &amp; instructions03 addr mode &amp; instructions
03 addr mode &amp; instructions
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
Unit 2 Instruction set.pdf
Unit 2 Instruction set.pdfUnit 2 Instruction set.pdf
Unit 2 Instruction set.pdf
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085
 

More from JLoknathDora

Post-Fertilization and Formation & Development of Seed and Fruit.pdf
Post-Fertilization and Formation & Development of Seed and Fruit.pdfPost-Fertilization and Formation & Development of Seed and Fruit.pdf
Post-Fertilization and Formation & Development of Seed and Fruit.pdfJLoknathDora
 
Air, Water and Forensic Chemistry
Air, Water and Forensic ChemistryAir, Water and Forensic Chemistry
Air, Water and Forensic ChemistryJLoknathDora
 
Take care yourself
Take care yourselfTake care yourself
Take care yourselfJLoknathDora
 
Our nature, our responsibility
Our nature, our responsibilityOur nature, our responsibility
Our nature, our responsibilityJLoknathDora
 
DIET, HEALTH AND CARE
DIET, HEALTH AND CAREDIET, HEALTH AND CARE
DIET, HEALTH AND CAREJLoknathDora
 
Chemistry of atoms and molecules of our body
Chemistry of atoms and molecules of our bodyChemistry of atoms and molecules of our body
Chemistry of atoms and molecules of our bodyJLoknathDora
 
Microprocessor instructions
Microprocessor instructionsMicroprocessor instructions
Microprocessor instructionsJLoknathDora
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentalsJLoknathDora
 
Information and communication technology
Information and communication  technologyInformation and communication  technology
Information and communication technologyJLoknathDora
 
Final statistical treatment data
Final statistical treatment dataFinal statistical treatment data
Final statistical treatment dataJLoknathDora
 
Instrumental methods ii and basics of electrochemistry
Instrumental methods ii and basics of electrochemistryInstrumental methods ii and basics of electrochemistry
Instrumental methods ii and basics of electrochemistryJLoknathDora
 
Separation techniques in analytical chemistry
Separation techniques in analytical chemistrySeparation techniques in analytical chemistry
Separation techniques in analytical chemistryJLoknathDora
 
Presentation on Economic Development
Presentation on Economic DevelopmentPresentation on Economic Development
Presentation on Economic DevelopmentJLoknathDora
 

More from JLoknathDora (18)

Post-Fertilization and Formation & Development of Seed and Fruit.pdf
Post-Fertilization and Formation & Development of Seed and Fruit.pdfPost-Fertilization and Formation & Development of Seed and Fruit.pdf
Post-Fertilization and Formation & Development of Seed and Fruit.pdf
 
Air, Water and Forensic Chemistry
Air, Water and Forensic ChemistryAir, Water and Forensic Chemistry
Air, Water and Forensic Chemistry
 
Take care yourself
Take care yourselfTake care yourself
Take care yourself
 
Life in polymers
Life in polymersLife in polymers
Life in polymers
 
Our nature, our responsibility
Our nature, our responsibilityOur nature, our responsibility
Our nature, our responsibility
 
DIET, HEALTH AND CARE
DIET, HEALTH AND CAREDIET, HEALTH AND CARE
DIET, HEALTH AND CARE
 
Chemistry of atoms and molecules of our body
Chemistry of atoms and molecules of our bodyChemistry of atoms and molecules of our body
Chemistry of atoms and molecules of our body
 
Magnetism notes
Magnetism notesMagnetism notes
Magnetism notes
 
Electricity
Electricity Electricity
Electricity
 
Microprocessor instructions
Microprocessor instructionsMicroprocessor instructions
Microprocessor instructions
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentals
 
Glycolysis
GlycolysisGlycolysis
Glycolysis
 
Information and communication technology
Information and communication  technologyInformation and communication  technology
Information and communication technology
 
Final statistical treatment data
Final statistical treatment dataFinal statistical treatment data
Final statistical treatment data
 
Instrumental methods ii and basics of electrochemistry
Instrumental methods ii and basics of electrochemistryInstrumental methods ii and basics of electrochemistry
Instrumental methods ii and basics of electrochemistry
 
Separation techniques in analytical chemistry
Separation techniques in analytical chemistrySeparation techniques in analytical chemistry
Separation techniques in analytical chemistry
 
Life in Lockdown
Life in LockdownLife in Lockdown
Life in Lockdown
 
Presentation on Economic Development
Presentation on Economic DevelopmentPresentation on Economic Development
Presentation on Economic Development
 

Recently uploaded

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

8085 Microprocessor Instruction Set Guide

  • 2. Instruction Set of 8085  An instruction is a binary pattern designed inside a microprocessor to perform a specific function.  The entire group of instructions that a microprocessor supports is called Instruction Set.  8085 has 246 instructions.  Each instruction is represented by an 8-bit binary value.  These 8-bits of binary value is called Op-Code or Instruction Byte.
  • 3. Classification of Instruction Set  DataTransfer Instruction  Arithmetic Instructions  Logical Instructions  Branching Instructions  Control Instructions
  • 4. 1.DataTransfer Instructions  These instructions move data between registers, or between memory and registers.  These instructions copy data from source to destination(without changing the original data ).
  • 5. Opcode Operand MOV Rd, Rs M, Rs Rd, M  This instruction copies the contents of the source register into the destination register. (contents of the source register are not altered)  If one of the operands is a memory location, its location is specified by the contents of the HL registers.  Example: MOV B, C or MOV B, M MOV-Copy from source to destination
  • 6. A 20 B 20 A F B 30 C D E H 20 L 50 A 20 B BEFORE EXECUTION AFTER EXECUTION MOV B,A A F B 30 C D E H 20 L 50 A F B C D E H 20 L 50 A F B C 40 D E H 20 L 50 MOV M,B MOV C,M 40 40 30
  • 7. Opcode Operand MVI Rd, Data M, Data  The 8-bit data is stored in the destination register or memory.  If the operand is a memory location, its location is specified by the contents of the H-L registers.  Example: MVI B, 60H or MVI M, 40H MVI-Move immediate 8-bit
  • 8. A F B C D E H L A F B 60 C D E H L AFTER EXECUTION BEFORE EXECUTION MVI B,60H 40 HL=2050 2051H 204FH 204F 2051H MVI M,40H BEFORE EXECUTION AFTER EXECUTION HL=2050
  • 9. LDA-Load accumulator Opcode Operand LDA 16-bit address  The contents of a memory location, specified by a 16- bit address in the operand, are copied to the accumulator.  The contents of the source are not altered.  Example: LDA 2000H
  • 10. A 30 A 30 30 AFTER EXECUTION BEFORE EXECUTION LDA 2000H 2000H 2000H
  • 11. Opcode Operand LDAX B/D Register Pair  The contents of the designated register pair point to a memory location.  This instruction copies the contents of that memory location into the accumulator.  The contents of either the register pair or the memory location are not altered.  Example: LDAX D LDAX-Load accumulator indirect
  • 12. A F B C D 20 E 30 A 80 F B C D 20 E 30 80 80 AFTER EXECUTION BEFORE EXECUTION LDAX D 2030H 2030H
  • 13. Opcode Operand LXI Reg. pair, 16-bit data  This instruction loads 16-bit data in the register pair.  Example: LXI H, 2030 H LXI-Load register pair immediate
  • 14. A F B C H L A 80 F B C H 90 L 30 30 90 50 AFTER EXECUTION BEFORE EXECUTION LXI H, 2030 2030H 9030H 2031H M=50
  • 15. Opcode Operand LHLD 16-bit address  This instruction copies the contents of memory location pointed out by 16-bit address into register L.  It copies the contents of next memory location into register H.  Example: LHLD 2030 H LHLD-Load H and L registers direct
  • 16. A F B C H L A 80 F B C H 85 L 00 00 85 60 AFTER EXECUTION BEFORE EXECUTION LHLD 2030 2030H 8500H M=60
  • 17. Opcode Operand STA 16-bit address  The contents of accumulator are copied into the memory location specified by the operand.  Example: STA 2000H STA-Store accumulator direct
  • 18. A 50 A 50 50 AFTER EXECUTION BEFORE EXECUTION STA 2000H 2000H 2000H
  • 19. Opcode Operand STAX Reg. pair  The contents of accumulator are copied into the memory location specified by the contents of the register pair.  Example: STAX B STAX-Store accumulator indirect collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
  • 20. B 85 C 00 A=1AH BEFORE EXECUTION AFTER EXECUTION STAX B 1A 8500H
  • 21. Opcode Operand SHLD 16-bit address  The contents of register L are stored into memory location specified by the 16-bit address.  The contents of register H are stored into the next memory location.  Example: SHLD 2550H SHLD-Store H and L registers direct
  • 22. D E H 70 L 80 BEFORE EXECUTION AFTER EXECUTION SHLD 8500 80 70 8500H 8501H
  • 23. Opcode Operand XCHG None  The contents of register H are exchanged with the contents of register D.  The contents of register L are exchanged with the contents of register E.  Example: XCHG XCHG-Exchange H and L with D and E
  • 24. D 20 E 40 H 70 L 80 D 70 E 80 H 20 L 40 BEFORE EXECUTION AFTER EXECUTION XCHG
  • 25. Opcode Operand SPHL None  This instruction loads the contents of H-L pair into SP.  Example: SPHL SPHL-Copy H and L registers to the stack pointer
  • 26. H 25 L 00 SP BEFORE EXECUTION AFTER EXECUTION SPHL SP 2500 H 25 L 00
  • 27. Opcode Operand XTHL None  The contents of L register are exchanged with the location pointed out by the contents of the SP.  The contents of H register are exchanged with the next location (SP + 1).  Example: XTHL XTHL-Exchange H and L with top of stack
  • 28. H 30 L 40 SP 2700 BEFORE EXECUTION 50 60 H 60 L 50 SP 2700 40 30 AFTER EXECUTION XTHL 2700H 2701H 2702H 2700H 2701H 2702H L=SP H=(SP+1)
  • 29. Opcode Operand Description PCHL None Load program counter with H- L contents  The contents of registers H and L are copied into the program counter (PC).  The contents of H are placed as the high-order byte and the contents of L as the low-order byte.  Example: PCHL
  • 30. Opcode Operand PUSH Reg. pair  The contents of register pair are copied onto stack.  SP is decremented and the contents of high-order registers (B, D, H,A) are copied into stack.  SP is again decremented and the contents of low-order registers (C, E, L, Flags) are copied into stack.  Example: PUSH B PUSH-Push register pair onto stack
  • 32. Opcode Operand POP Reg. pair  The contents of top of stack are copied into register pair.  The contents of location pointed out by SP are copied to the low-order register (C, E, L, Flags).  SP is incremented and the contents of location are copied to the high-order register (B, D, H,A).  Example: POP H POP- Pop stack to register pair
  • 33. POP H
  • 34. Opcode Operand IN 8-bit port address  The contents of I/O port are copied into accumulator.  Example: IN 8C H IN- Copy data to accumulator from a port with 8-bit address
  • 35. 10 A 10 A 10 BEFORE EXECUTION AFTER EXECUTION IN 80H PORT 80H PORT 80H
  • 36. Opcode Operand OUT 8-bit port address  The contents of accumulator are copied into the I/O port.  Example: OUT 78H OUT- Copy data from accumulator to a port with 8-bit address
  • 37. 10 A 40 40 A 40 BEFORE EXECUTION AFTER EXECUTION OUT 50H PORT 50H PORT 50H
  • 38. 2.Arithmetic Instructions  These instructions perform the operations like: ◦ Addition ◦ Subtract ◦ Increment ◦ Decrement
  • 39. Addition  Any 8-bit number, or the contents of register, or the contents of memory location can be added to the contents of accumulator.  The result (sum) is stored in the accumulator.  No two other 8-bit registers can be added directly.  Example: The contents of register B cannot be added directly to the contents of register C.
  • 40. Opcode Operand Description ADD R M Add register or memory to accumulator  The contents of register or memory are added to the contents of accumulator.  The result is stored in accumulator.  If the operand is memory location, its address is specified by H-L pair.  Example: ADD B or ADD M ADD
  • 41. B C 05 D E H L B C 05 D E H L AFTER EXECUTION BEFORE EXECUTION B C D E H 20 L 50 B C D E H 20 L 50 AFTER EXECUTION BEFORE EXECUTION A 09 A 04 ADD C A=A+C ADD M A=A+M 10 10 2050 2050 A 04 A 14 04+05=09 04+10=14
  • 42. Opcode Operand Description ADC R M Add register or memory to accumulator with carry  The contents of register or memory and Carry Flag (CY) are added to the contents of accumulator.  The result is stored in accumulator.  If the operand is memory location, its address is specified by H-L pair.  All flags are modified to reflect the result of the addition.  Example: ADC B or ADC M ADC
  • 43. B C 05 D E H L A 50 B C 20 D E H L A 56 AFTER EXECUTION BEFORE EXECUTION ADC C A=A+C+CY CY 01 CY 1 A 06 A 37 H 20 L 50 H 20 L 50 ADC M A=A+M+CY AFTER EXECUTION BEFORE EXECUTION 30 30 2050H 2050H 06+1+30=37 50+05+01=56
  • 44. Opcode Operand Description ADI 8-bit data Add immediate to accumulator  The 8-bit data is added to the contents of accumulator.  The result is stored in accumulator.  All flags are modified to reflect the result of the addition.  Example: ADI 45 H ADI
  • 45. A 03 AFTER EXECUTION BEFORE EXECUTION ADI 05H A=A+DATA(8) A 08 03+05=08 collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
  • 46. Opcode Operand Description ACI 8-bit data Add immediate to accumulator with carry  The 8-bit data and the Carry Flag (CY) are added to the contents of accumulator.  The result is stored in accumulator.  All flags are modified to reflect the result of the addition.  Example: ACI 45 H ACI
  • 47. CY 1 A 05 AFTER EXECUTION BEFORE EXECUTION ACI 20H A=A+DATA (8)+CY A 26 05+20+1=26
  • 48. Opcode Operand Description DAD Reg. pair Add register pair to H-L pair  The 16-bit contents of the register pair are added to the contents of H-L pair.  The result is stored in H-L pair.  If the result is larger than 16 bits, then CY is set.  No other flags are changed.  Example: DAD B or DAD D DAD
  • 49. D 12 E 34 H 23 L 45 D 12 E 34 H 35 L 79 BEFORE EXECUTION AFTER EXECUTION DAD D DAD D HL=HL+DE DAD B HL=HL+BC 1234 2345 + ------- 3579
  • 50. Subtraction  Any 8-bit number, or the contents of register, or the contents of memory location can be subtracted from the contents of accumulator.  The result is stored in the accumulator.  Subtraction is performed in 2’s complement form.  If the result is negative, it is stored in 2’s complement form.  No two other 8-bit registers can be subtracted directly. collected by C.Gokul AP/EEE,VCET
  • 51. Opcode Operand Description SUB R M Subtract register or memory from accumulator  The contents of the register or memory location are subtracted from the contents of the accumulator.  The result is stored in accumulator.  If the operand is memory location, its address is specified by H-L pair.  All flags are modified to reflect the result of subtraction.  Example: SUB B or SUB M SUB
  • 52. B C 04 D E H L B C 04 D E H L AFTER EXECUTION BEFORE EXECUTION B C D E H 20 L 50 B C D E H 20 L 50 AFTER EXECUTION BEFORE EXECUTION A 05 A 09 SUB C A=A-C SUB M A=A-M 10 10 2050 2050 A 14 A 04 09-04=05 14-10=04
  • 53. Opcode Operand Description SBB R M Subtract register or memory from accumulator with borrow  The contents of the register or memory location and Borrow Flag (i.e. CY) are subtracted from the contents of the accumulator.  The result is stored in accumulator.  If the operand is memory location, its address is specified by H-L pair.  All flags are modified to reflect the result of subtraction.  Example: SBB B or SBB M SBB
  • 54. B C 05 D E H L A 08 B C 05 D E H L A 02 AFTER EXECUTION BEFORE EXECUTION SBB C A=A-C-CY CY 01 CY 1 A 06 A 03 H 20 L 50 H 20 L 50 SBB M A=A-M-CY AFTER EXECUTION BEFORE EXECUTION 02 02 2050H 2050H 08-05-01=02 06-02-1=03
  • 55. Opcode Operand Description SUI 8-bit data Subtract immediate from accumulator  The 8-bit data is subtracted from the contents of the accumulator.  The result is stored in accumulator.  All flags are modified to reflect the result of subtraction.  Example: SUI 05H SUI
  • 56. A 08 AFTER EXECUTION BEFORE EXECUTION SUI 05H A=A-DATA(8) A 03 08-05=03
  • 57. Opcode Operand Description SBI 8-bit data Subtract immediate from accumulator with borrow  The 8-bit data and the Borrow Flag (i.e. CY) is subtracted from the contents of the accumulator.  The result is stored in accumulator.  All flags are modified to reflect the result of subtraction.  Example: SBI 45 H SBI collected by C.Gokul AP/EEE,VCET
  • 58. CY 1 A 25 AFTER EXECUTION BEFORE EXECUTION SBI 20H A=A-DATA (8)-CY A 04 25-20-01=04
  • 59. Increment / Decrement  The 8-bit contents of a register or a memory location can be incremented or decremented by 1.  The 16-bit contents of a register pair can be incremented or decremented by 1.  Increment or decrement can be performed on any register or a memory location.
  • 60. Opcode Operand Description INR R M Increment register or memory by 1  The contents of register or memory location are incremented by 1.  The result is stored in the same place.  If the operand is a memory location, its address is specified by the contents of H-L pair.  Example: INR B or INR M INR
  • 61. B 10 C D E H L A B 11 C D E H L A AFTER EXECUTION BEFORE EXECUTION H 20 L 50 H 20 L 50 10 11 2050H 2050H AFTER EXECUTION BEFORE EXECUTION INR M M=M+1 B 10 C D E H L A BEFORE EXECUTION INR B R=R+1 10+1=11 10+1=11
  • 62. Opcode Operand Description INX R Increment register pair by 1  The contents of register pair are incremented by 1.  The result is stored in the same place.  Example: INX H or INX B or INX D INX
  • 63. B C D E H 10 L 20 B C D E H 10 L 21 AFTER EXECUTION BEFORE EXECUTION SP SP INX H RP=RP+1 1020+1=1021
  • 64. Opcode Operand Description DCR R M Decrement register or memory by 1  The contents of register or memory location are decremented by 1.  The result is stored in the same place.  If the operand is a memory location, its address is specified by the contents of H-L pair.  Example: DCR B or DCR M DCR
  • 65. B C D E 19 H L A AFTER EXECUTION B C D E 20 H L A BEFORE EXECUTION DCR E R=R-1 H 20 L 50 H 20 L 50 21 20 2050H AFTER EXECUTION BEFORE EXECUTION DCR M M=M-1 2050H 21-1=20 20-1=19
  • 66. Opcode Operand Description DCX R Decrement register pair by 1  The contents of register pair are decremented by 1.  The result is stored in the same place.  Example: DCX H or DCX B or DCX D DCX
  • 67. B C D E H 10 L 21 B C D E H 10 L 20 AFTER EXECUTION BEFORE EXECUTION SP SP DCX H RP=RP-1
  • 68. 3.Logical Instructions  These instructions perform logical operations on data stored in registers, memory and status flags.  The logical operations are: ◦ AND ◦ OR ◦ XOR ◦ Rotate ◦ Compare ◦ Complement
  • 69. AND, OR, XOR  Any 8-bit data, or the contents of register, or memory location can logically have ◦ AND operation ◦ OR operation ◦ XOR operation with the contents of accumulator.  The result is stored in accumulator.
  • 70. Opcode Operand Description ANA R M Logical AND register or memory with accumulator  The contents of the accumulator are logically ANDed with the contents of register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result of the operation.  CY is reset and AC is set.  Example: ANA B or ANA M. collected by C.Gokul AP/EEE,VCET
  • 71. B 10 C D E H L A B 0F C D E H L A 0A AFTER EXECUTION ANA B A=A and R B 0F C D E H L A AA BEFORE EXECUTION CY AC CY 0 AC 1 AFTER EXECUTION BEFORE EXECUTION CY AC CY 0 AC 1 A 11 A 55 H 20 L 50 H 20 L 50 B3 B3 2050H ANA M A=A and M 2050H 1010 1010=AAH 0000 1111=0FH 0000 1010=0AH 0101 0101=55H 1011 0011=B3H 0001 0001=11H
  • 72. Opcode Operand Description ANI 8-bit data Logical AND immediate with accumulator  The contents of the accumulator are logically ANDed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result.  CY is reset,AC is set.  Example: ANI 86H.
  • 73. CY AC A B3 AFTER EXECUTION BEFORE EXECUTION CY 0 AC 1 A 33 ANI 3FH A=A and DATA(8) 1011 0011=B3H 0011 1111=3FH 0011 0011=33H
  • 74. Opcode Operand Description ORA R M Logical OR register or memory with accumulator  The contents of the accumulator are logically ORed with the contents of the register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result.  CY and AC are reset.  Example: ORA B or ORA M.
  • 75. AFTER EXECUTION BEFORE EXECUTION CY AC ORA B A=A or R 1010 1010=AAH 0001 0010=12H 1011 1010=BAH B 12 C D E H L A AA B 12 C D E H L A BA CY 0 AC 0
  • 76. AFTER EXECUTION BEFORE EXECUTION CY AC ORA M A=A or M 0101 0101=55H 1011 0011=B3H 1111 0111=F7H H 20 L 50 A 55 A F7 CY 0 AC 0 H 20 L 50 B3 B3 2050H 2050H
  • 77. Opcode Operand Description ORI 8-bit data Logical OR immediate with accumulator  The contents of the accumulator are logically ORed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result.  CY and AC are reset.  Example: ORI 86H.
  • 78. CY AC A B3 AFTER EXECUTION BEFORE EXECUTION CY 0 AC 0 A BB ORI 08H A=A or DATA(8) 1011 0011=B3H 0000 1000=08H 1011 1011=BBH
  • 79. Opcode Operand Description XRA R M Logical XOR register or memory with accumulator  The contents of the accumulator are XORed with the contents of the register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result of the operation.  CY and AC are reset.  Example: XRA B or XRA M.
  • 80. B 10 C D E H L A B C 2D D E H L A 87 AFTER EXECUTION XRA C A=A xor R B C 2D D E H L A AA BEFORE EXECUTION CY AC CY 0 AC 0 1010 1010=AAH 0010 1101=2DH 1000 0111=87H
  • 81. H 20 L 50 A 55 AFTER EXECUTION XRA M A=A xor M BEFORE EXECUTION CY AC CY 0 AC 0 0101 0101=55H 1011 0011=B3H 1110 0110=E6H H 20 L 50 A E6 B3 B3 2050H 2050H
  • 82. Opcode Operand Description XRI 8-bit data XOR immediate with accumulator  The contents of the accumulator are XORed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result.  CY and AC are reset.  Example: XRI 86H.
  • 83. CY AC A B3 AFTER EXECUTION BEFORE EXECUTION CY 0 AC 0 A 8A XRI 39H A=A xor DATA(8) 1011 0011=B3H 0011 1001=39H 1000 1010=8AH
  • 84. Compare  Any 8-bit data, or the contents of register, or memory location can be compares for: ◦ Equality ◦ Greater Than ◦ Less Than with the contents of accumulator.  The result is reflected in status flags.
  • 85. Opcode Operand Description CMP R M Compare register or memory with accumulator  The contents of the operand (register or memory) are compared with the contents of the accumulator.  Both contents are preserved .
  • 86. B 10 C D E H L A B C D 20 E H L A 10 AFTER EXECUTION CMP D A-R B C D 20 E H L A 10 BEFORE EXECUTION CY Z CY 01 Z 0 AFTER EXECUTION BEFORE EXECUTION CY Z CY 0 ZF 1 A B8 A B8 H 20 L 50 H 20 L 50 B8 B8 2050H CMP M A-M 2050H A>R: CY=0 A=R: ZF=1 A<R: CY=1 A>M: CY=0 A=M: ZF=1 A<M: CY=1 10<20:CY=01 B8=B8 :ZF=01
  • 87. Opcode Operand Description CPI 8-bit data Compare immediate with accumulator  The 8-bit data is compared with the contents of accumulator.  The values being compared remain unchanged.
  • 88. CY Z A BA AFTER EXECUTION BEFORE EXECUTION CY 0 AC 0 A BA CPI 30H A-DATA A>DATA: CY=0 A=DATA: ZF=1 A<DATA: CY=1 BA>30 : CY=00
  • 89. Rotate  Each bit in the accumulator can be shifted either left or right to the next position.
  • 90. Opcode Operand Description RLC None Rotate accumulator left  Each binary bit of the accumulator is rotated left by one position.  Bit D7 is placed in the position of D0 as well as in the Carry flag.  CY is modified according to bit D7.  S, Z, P,AC are not affected.  Example: RLC.
  • 91. B7 B6 B5 B4 B3 B2 B1 B0 CY B6 B5 B4 B3 B2 B1 B0 B7 B7 AFTER EXECUTION BEFORE EXECUTION
  • 92. Opcode Operand Description RRC None Rotate accumulator right  Each binary bit of the accumulator is rotated right by one position.  Bit D0 is placed in the position of D7 as well as in the Carry flag.  CY is modified according to bit D0.  S, Z, P,AC are not affected.  Example: RRC.
  • 93. B7 B6 B5 B4 B3 B2 B1 B0 CY B0 B7 B6 B5 B4 B3 B2 B1 B0 AFTER EXECUTION BEFORE EXECUTION collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
  • 94. Opcode Operand Description RAL None Rotate accumulator left through carry  Each binary bit of the accumulator is rotated left by one position through the Carry flag.  Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0.  CY is modified according to bit D7.  S, Z, P,AC are not affected.  Example: RAL.
  • 95. B7 B6 B5 B4 B3 B2 B1 B0 CY B6 B5 B4 B3 B2 B1 B0 CY B7 AFTER EXECUTION BEFORE EXECUTION
  • 96. Opcode Operand Description RAR None Rotate accumulator right through carry  Each binary bit of the accumulator is rotated right by one position through the Carry flag.  Bit D0 is placed in the Carry flag, and the Carry flag is placed in the most significant position D7.  CY is modified according to bit D0.  S, Z, P,AC are not affected.  Example: RAR.
  • 97. B7 B6 B5 B4 B3 B2 B1 B0 CY CY B7 B6 B5 B4 B3 B2 B1 B0 AFTER EXECUTION BEFORE EXECUTION
  • 98. Complement  The contents of accumulator can be complemented.  Each 0 is replaced by 1 and each 1 is replaced by 0.
  • 99. Opcode Operand Description CMA None Complement accumulator  The contents of the accumulator are complemented.  No flags are affected.  Example: CMA. A=A’ A 00 A FF BEFORE EXECUTION AFTER EXECUTION
  • 100. Opcode Operand Description CMC None Complement carry  The Carry flag is complemented.  No other flags are affected.  Example: CMC => c=c’ BEFORE EXECUTION AFTER EXECUTION C 00 C FF
  • 101. Opcode Operand Description STC None Set carry  The Carry flag is set to 1.  No other flags are affected.  Example: STC CF=1 S-set (1) C-clear (0)
  • 102. 4.Branching Instructions  The branch group instructions allows the microprocessor to change the sequence of program either conditionally or under certain test conditions.The group includes,  (1) Jump instructions,  (2) Call and Return instructions,  (3) Restart instructions,
  • 103. Opcode Operand Description JMP 16-bit address Jump unconditionally  The program sequence is transferred to the memory location specified by the 16-bit address given in the operand.  Example: JMP 2034 H.
  • 104. Opcode Operand Description Jx 16-bit address Jump conditionally  The program sequence is transferred to the memory location specified by the 16-bit address given in the operand based on the specified flag of the PSW.  Example: JZ 2034 H.
  • 105. Jump Conditionally Opcode Description Status Flags JC Jump if Carry CY = 1 JNC Jump if No Carry CY = 0 JZ Jump if Zero Z = 1 JNZ Jump if No Zero Z = 0 JPE Jump if Parity Even P = 1 JPO Jump if Parity Odd P = 0 A-Above , B-Below , C-Carry , Z-Zero , P-Parity
  • 106. Opcode Operand Description CALL 16-bit address Call unconditionally  The program sequence is transferred to the memory location specified by the 16-bit address given in the operand.  Before the transfer, the address of the next instruction after CALL (the contents of the program counter) is pushed onto the stack.  Example: CALL 2034 H.
  • 107. Call Conditionally Opcode Description Status Flags CC Call if Carry CY = 1 CNC Call if No Carry CY = 0 CP Call if Positive S = 0 CM Call if Minus S = 1 CZ Call if Zero Z = 1 CNZ Call if No Zero Z = 0 CPE Call if Parity Even P = 1 CPO Call if Parity Odd P = 0
  • 108. Opcode Operand Description RET None Return unconditionally  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 program execution begins at the new address.  Example: RET.
  • 109. Return Conditionally Opcode Description Status Flags RC Return if Carry CY = 1 RNC Return if No Carry CY = 0 RP Return if Positive S = 0 RM Return if Minus S = 1 RZ Return if Zero Z = 1 RNZ Return if No Zero Z = 0 RPE Return if Parity Even P = 1 RPO Return if Parity Odd P = 0
  • 110. Opcode Operand Description RST 0 – 7 Restart (Software Interrupts)  The RST instruction jumps the control to one of eight memory locations depending upon the number.  These are used as software instructions in a program to transfer program execution to one of the eight locations.  Example: RST 1 or RST 2 ….
  • 111. Instruction Code Vector Address RST 0 0*8=0000H RST 1 1*8=0008H RST 2 2*8=0010H RST 3 3*8=0018H RST 4 4*8=0020H RST 5 5*8=0028H RST 6 6*8=0030H RST 7 7*8=0038H
  • 112. 5. Control Instructions  The control instructions control the operation of microprocessor. collected by C.Gokul AP/EEE , Velalar college of Engineering and Technology, Erode
  • 113. Opcode Operand Description NOP None No operation  No operation is performed.  The instruction is fetched and decoded but no operation is executed.  Example: NOP
  • 114. Opcode Operand Description HLT None Halt  The CPU finishes executing the current instruction and halts any further execution.  An interrupt or reset is necessary to exit from the halt state.  Example: HLT
  • 115. Opcode Operand Description DI None Disable interrupt  The interrupt enable flip-flop is reset and all the interrupts except the TRAP are disabled.  No flags are affected.  Example: DI
  • 116. Opcode Operand Description EI None Enable interrupt  The interrupt enable flip-flop is set and all interrupts are enabled.  No flags are affected.  This instruction is necessary to re-enable the interrupts (except TRAP).  Example: EI
  • 117. Opcode Operand Description RIM None Read Interrupt Mask  This is a multipurpose instruction used to read the status of interrupts 7.5, 6.5, 5.5 and read serial data input bit.  The instruction loads eight bits in the accumulator with the following interpretations.  Example: RIM
  • 119. Opcode Operand Description SIM None Set Interrupt Mask  This is a multipurpose instruction and used to implement the 8085 interrupts 7.5, 6.5, 5.5, and serial data output.  The instruction interprets the accumulator contents as follows.  Example: SIM