Microprocessor 8085 programming (Memory Location) || Microprocessor || Bcis Notes

Microprocessor 8085 programming (Memory Location) || Microprocessor || Bcis Notes

Microprocessor 8085 programming (Memory Location)

1. Sixteen bytes of data are stored in a memory location at 1050H to 105FH. Replace each data byte by FF.

LXI H, 1050H
MVI C, 10H
L1: MVI M, FFH
INX H
DCR C
JNZ L1
HLT

2. Add two numbers located at 3030H and 4040H. Display sum on Port 1. If the carry is generated, display it on Port 2. Store sum on 5050H.

LDA 3030H
MOV B, A
LDA 4040H
ADD B
STA 5050H
OUT PORT 1
JNC L1
MVI A, 01H
OUT PORT 2
L1: HLT

3. Write an Assembly Language Program that retrieves data located at 2050H and it displays if it is even and stores FFH on that location if it is odd.

LDA 2050H
ANI 01H
JNZ L1
LDA 2050H
OUT PORT 1
HLT

L1:  MVI A, FFH
STA 2050H
HLT

4. Sixteen data are stored in a memory location at 1050H to 105FH. Transfer the entire block of data to a new location starting at 1070H.

LXI H, 1050H
MVI C, 10H
LXI D, 1070H
L1: MOV A, M
STAX D
INX H
INX D
DCR C
JNZ L1
HLT

You may also like Introduction and History of Microprocessors

Be the first to comment

Leave a Reply

Your email address will not be published.


*