Week 2.2 Data Transfer Instructions - Load Instructions
1. PRINCIPLES OF 8085 MICROPROCESSOR
Dr.S.Barani
School of Electrical and Electronics Engineering
Sathyabama Institute of Science and Technology
Week 2 – Instruction sets
A certified Moodle Course on
2. DATA TRANSFER INSTRUCTIONS
2
A certified Moodle Course on Principles of 8085 Microprocessor
L
O
A
D
I
N
S
T
R
U
C
T
I
O
N
S
Syntax LDA 16 Bit address – 3 byte
LDA 4000
Register Contents Before execution
Register Contents After execution
H L
40 00 4000 7E XX
A
H L
40 00 4000 7E 7E
A
Status of Flag
Register
Flags are not
affected
No change in Flag
contents
Src – Memory
Des – A reg
3. LDAX B
Register Contents Before execution
Syntax LDAX B/D reg.pair – 1 byte
Status of Flag Register
Flags are not affected
No change in Flag contents
3
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
Src –
content of
address in
B/D reg
pair
Des – A
reg
A
B
XX XX
40 00
F
C
4000 9E Register Contents After execution
A
B
9E XX
40 00
F
C
4. LHLD 4000
Register Contents Before execution
Syntax LHLD 16 Bit address – 3 byte
Status of Flag Register
Flags are not affected
No change in Flag contents
4
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
Src –
address
Address+1
Des
Address+1
-H
Address -
L
Register Contents After execution
H XX XX
4000 9E
4001 5F
L
H 5F 9E
4000 9E
4001 5F
L
LOADS 16 BIT DATA
5. LXI B, 4232
Register Contents Before execution
Register Contents After execution
Syntax LXI reg.pair , 16 bit data – 3 byte LOAD REG.PAIR IMMEDIATE
Status of Flag
Dregister
Flags are not
affected
No change in Flag
contents
5
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
Src is 16 bit
data i.e
directly
passing the
value
Des is
Reg. pair
XX XX
B C
42 32
B C
LOADS 16 bit address directly
in to Stack Pointer (SP)
6. PCHL
Register Contents Before execution
Register Contents After execution
Syntax PCHL none – 1 byte LOAD PC WITH HL
Status of Flag
Dregister
Flags are not
affected
No change in Flag
contents
6
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
Src HL
Reg. Pair
Des
Prog.
Counter
PC
45 00
PC XXXX
H L
45 00
PC 4500
H L
LOADS 16 bit address directly
in to Program Counter (PC)
7. TRY - OUT
TASK 1
Execute the
instruction LXI
SP,4000 and update
the contents of SP
registers and status of
Flag register.
Before execution
Assume the value of
SP as xxxx
TASK 2
Execute the instruction
LDAX D and update
the contents of A
register and status of
Flag register.
Before execution
The content of D - 50
The content of E – 00
Content of 5000 – 6D
TASK 3
Execute the instruction
LDA 4500 and update
the contents of
registers and status of
Flag register.
Before execution
The content of A - 3D
The content of 4500 -
75
7
A certified Moodle Course on Principles of 8085 Microprocessor
TASK 4
Execute the instruction
LHLD 4500 and
update the contents of
registers and status of
Flag register.
Before execution
The content of 4500 –
43
The content of 4500 -
76
8. SOLUTION - TASK 1
Before execution
After execution
No changes in flag register
8
A certified Moodle Course on Principles of 8085 Microprocessor
SP XXXX
TASK 1
Execute the instruction
LXI SP,4000 and
update the contents of
SP registers and status
of Flag register.
Before execution
Assume the value of SP
as xxxx
SP 4000
9. SOLUTION - TASK 2
Before execution
After execution
No changes in flag register
9
A certified Moodle Course on Principles of 8085 Microprocessor
D E A
50 00 XX
50 00 6D
D E A
5000 6D
5000 6D
TASK 2
Execute the
instruction LDAX D
and update the
contents of A register
and status of Flag
register.
Before execution
The content of D - 50
The content of E – 00
Content of 5000 – 6D
10. SOLUTION - TASK 3
Before execution
After execution
No changes in flag register
10
A certified Moodle Course on Principles of 8085 Microprocessor
A
3D
75
A
TASK 3
Execute the
instruction LDA 4500
and update the
contents of registers
and status of Flag
register.
Before execution
The content of A -
3D
The content of 4500 -
75
4500 75
4500 75
11. SOLUTION - TASK 4
Before execution
After execution
No changes in flag register
11
A certified Moodle Course on Principles of 8085 Microprocessor
H L
XX XX
4500 43
4501 76
TASK 4
Execute the instruction
LHLD 4500 and update
the contents of registers
and status of Flag
register.
Before execution
The content of 4500 – 43
The content of 4501 - 76
H L
76 43
4500 43
4501 76