Data transfer group: These instruction which are used to transfer a data from one register to another or register to memory or vice versa. E.g. MOV, MVI, LDA etc.
a) MOV Rd, Rs
- 1 byte instruction
- It copies data from source register too destination register
- Rd and Rs may be A,B,C,D,E,H,L
- E.g. MOV A,B;(A<-B)
b) MVI R, 8-bit data(move immediate instruction)
- 2 byte instruction
- Loads the 8-bit of data into the specified register
- R may be A, B, C, D…….etc.
- E.g. MVI C,20H;C<-20H
c) MOV M,R(move to memory from register)
- Moves the content of the specified register to memory
- Here the memory is the location specified by the content of HL pair register
- E.g. MOV M, A;([HL]<-A)
d) MOV R, M
- 1 byte instruction
- Moves the content of the specified memory to register
e) MVI M,8-bit data(move 8-bit data immediate to memory)
- 2 bytes data instruction
- Loads the 8-bit data on the memory location where address is specified by HL pair register.
- E.g. MVI H, 32H
MVI L, 00H
MVI M, 20H
f) LXI Rp, 16-bit data(load register pair immediate)
- 3 bytes instruction
- Loads the 16-bits data immediately to the pair register
- Rp may be B,D,H
- E.g. LXI B, 2000H
- Here, 1st byte=LXI B(op-code)
2nd byte=20H (upper byte operand)
3rd byte= (lower byte operand)
g) LDA 16-bits address (load accumulators direct)
- 3 bytes instruction
- Loads the accumulator with the content of memory location whose address is specified by 16-bit
- E.g. LDA 5000H;A<-[5000H]
h) STA 16 bit address(store accumulator content)
- 3 bytes instruction
- Stores the content f accumulator to the specified memory location
- E.g. STA 5000H;[5000H]<-A
i) LDAX Rp (load accumulator indirect)
- 1 byte instruction
- Loads an accumulator from the memory location indirectly specified by pair register.
- E.g. MVI B, 20H;B<-20H
MVI C, 40H;C<-40H
LDAX B;A<-[2040H]
j) STAX Rp (here accumulator content indirectly)
- 1 Byte instruction
- Stores accumulator content to the memory location indirectly specified by pair register
- E.g. MVI D, 30H; D<-30H
MVI E, 00H; E<-00H
STAX D;[3000H]<-A
k) IN 8 bit address
- 1 byte instruction
- Reads data from the input port specified by the second byte and loads into accumulator
- E.g. IN 40H; A<-[40H]
l) OUT 8 bit address
- 2 byte instruction
- Copies the content of accumulator to the output port specified in the 2nd byte.
- e.g. OUT 40H,[40H]<-A
m) LHLD 16 bit address(load HL register directly)
- 3 bytes instruction
- Loads the content of memory location to L register next higher address content into H register
- E.g. LXI H,9500H; H<-95H,L<-00H
MVI M,3AH;[HL][9500H]<-3A
MVI M,20H;L<-01H
MVI M,20H;[HL][9500H]<-20H
LHLD 9500H;
n) SHLD 16 bit address(store HL register directly)
- 3 bytes instruction
- Stores content of L register into specified location and content of H register into next higher memory location.
- E.g. LXI H, 9500H; H<-95H,L<-00H
SHLD 8000H
o) XCHG(exchange)
- 1 byte instruction exchange DE pair register with HL pair register.
- E.g. LXI H, 9500H;
LXI D, 1080H;
XCHG; H<-10H, D<-95H, L<-80H, E<-00H
a) MOV Rd, Rs
- 1 byte instruction
- It copies data from source register too destination register
- Rd and Rs may be A,B,C,D,E,H,L
- E.g. MOV A,B;(A<-B)
b) MVI R, 8-bit data(move immediate instruction)
- 2 byte instruction
- Loads the 8-bit of data into the specified register
- R may be A, B, C, D…….etc.
- E.g. MVI C,20H;C<-20H
c) MOV M,R(move to memory from register)
- Moves the content of the specified register to memory
- Here the memory is the location specified by the content of HL pair register
- E.g. MOV M, A;([HL]<-A)
d) MOV R, M
- 1 byte instruction
- Moves the content of the specified memory to register
e) MVI M,8-bit data(move 8-bit data immediate to memory)
- 2 bytes data instruction
- Loads the 8-bit data on the memory location where address is specified by HL pair register.
- E.g. MVI H, 32H
MVI L, 00H
MVI M, 20H
f) LXI Rp, 16-bit data(load register pair immediate)
- 3 bytes instruction
- Loads the 16-bits data immediately to the pair register
- Rp may be B,D,H
- E.g. LXI B, 2000H
- Here, 1st byte=LXI B(op-code)
2nd byte=20H (upper byte operand)
3rd byte= (lower byte operand)
g) LDA 16-bits address (load accumulators direct)
- 3 bytes instruction
- Loads the accumulator with the content of memory location whose address is specified by 16-bit
- E.g. LDA 5000H;A<-[5000H]
h) STA 16 bit address(store accumulator content)
- 3 bytes instruction
- Stores the content f accumulator to the specified memory location
- E.g. STA 5000H;[5000H]<-A
i) LDAX Rp (load accumulator indirect)
- 1 byte instruction
- Loads an accumulator from the memory location indirectly specified by pair register.
- E.g. MVI B, 20H;B<-20H
MVI C, 40H;C<-40H
LDAX B;A<-[2040H]
j) STAX Rp (here accumulator content indirectly)
- 1 Byte instruction
- Stores accumulator content to the memory location indirectly specified by pair register
- E.g. MVI D, 30H; D<-30H
MVI E, 00H; E<-00H
STAX D;[3000H]<-A
k) IN 8 bit address
- 1 byte instruction
- Reads data from the input port specified by the second byte and loads into accumulator
- E.g. IN 40H; A<-[40H]
l) OUT 8 bit address
- 2 byte instruction
- Copies the content of accumulator to the output port specified in the 2nd byte.
- e.g. OUT 40H,[40H]<-A
m) LHLD 16 bit address(load HL register directly)
- 3 bytes instruction
- Loads the content of memory location to L register next higher address content into H register
- E.g. LXI H,9500H; H<-95H,L<-00H
MVI M,3AH;[HL][9500H]<-3A
MVI M,20H;L<-01H
MVI M,20H;[HL][9500H]<-20H
LHLD 9500H;
n) SHLD 16 bit address(store HL register directly)
- 3 bytes instruction
- Stores content of L register into specified location and content of H register into next higher memory location.
- E.g. LXI H, 9500H; H<-95H,L<-00H
SHLD 8000H
o) XCHG(exchange)
- 1 byte instruction exchange DE pair register with HL pair register.
- E.g. LXI H, 9500H;
LXI D, 1080H;
XCHG; H<-10H, D<-95H, L<-80H, E<-00H
No comments:
Post a Comment