Week 2.3 Data Transfer Instructions - Store 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
S
T
O
R
E
I
N
S
T
R
U
C
T
I
O
N
S
Syntax STA 16 Bit address – 3 byte STORE A REG DIRECT
STA 4000
Register Contents Before execution
Register Contents After execution
4000 7E 55
A
4000 55 55
A
Status of Flag Register
Flags are not affected
No change in Flag contents
Des – Memory
Src – A reg
3. STAX B
Register Contents Before execution
Syntax STAX B/D reg.pair – 1 byte STORE A REG INDIRECT
Status of Flag Register
Flags are not affected
No change in Flag contents
3
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
des –
content of
address in
B/D reg
pair
Src – A reg
A
B
2C XX
40 00
F
C
4000 9E
Register Contents After execution
A
B
2C XX
40 00
F
C
4000 2C
4. SHLD 4000
Register Contents Before execution
Syntax SHLD 16 Bit address – 3 byte STORE HL REG DIRECT
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 – H
& L
Des
Address
+1-H
Address
- L
Register Contents After execution
H 5F 9E
4000 XX
4001 XX
L
H 5F 9E
4000 9E
4001 5F
L
STORES 16 BIT DATA
5. SPHL
Register Contents Before execution
Register Contents After execution
Syntax SPHL none – 1 byte COPY HL REGISTERS TO STACK
Status of Flag
register
Flags are not
affected
No change in Flag
contents
5
A certified Moodle Course on Principles of 8085 Microprocessor
Hint
Src is HL
Des is
SP
45 00
SP XXXX
H L
45 00
SP 4500
H L
Stores directly in to Stack
Pointer (SP)
6. 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
6
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
7. SOLUTION - TASK 1
Before execution
After execution
No changes in flag register
7
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
8. SOLUTION - TASK 2
Before execution
After execution
No changes in flag register
8
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
9. SOLUTION - TASK 3
Before execution
After execution
No changes in flag register
9
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
10. SOLUTION - TASK 4
Before execution
After execution
No changes in flag register
10
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