Home Assignment (Lockdown Period) IAP-2034: Utpal Sarma
Home Assignment (Lockdown Period) IAP-2034: Utpal Sarma
Home Assignment (Lockdown Period) IAP-2034: Utpal Sarma
IAP-2034
1. Specify the register contents and the flag status as the following instructions are
executed. Specify also the output at PORTO.
A B S Z CY
Initial content 00 FF 0 1 0
MVI A, F2H
MVI B,7AH
ADD B
OUT PORTO
2. Specify the register contents and the flag status as the following instructions are
executed.
A B S Z CY
Initial content 00 FF 0 1 0
SUB A
MOV B, A
DCR B
INR B
SUI 01H
HLT
3. Specify the register contents and the flag status as the following instructions are
executed.
A B S Z CY
Initial content 00 FF 0 1 0
XRA A
MVI B, 4AH
SUI 4FH
ANA B
HLT
4. Write an ALP(8085) to load the bit pattern 91H in register B and 87H in register
C. Mask all the bits except D0 from registers B and C. If D0 is at logic 1 in both
registers, turn on the light connected to the D0 position of output port 01H;
otherwise, turn off the light.
Utpal Sarma
Page 1 of 5
Home Assignment (Lockdown Period)
IAP-2034
5. What is the output at PORT 1 when the following instructions are executed?
MVIA, 8FH
ADI 72H
JC DSPLAY
OUT PORT1
HLT
DSPLAY: XRA A
OUT PORT1
HLT
6. In the following program, explain the range of the bytes that will be displayed at
PORT2.
MVI A, BYTE1
MOV B, A
SUI 50H
JC DELETE
MOV A, B
SUI 80H
JC DSPLAY
DELETE: XRA A
OUT PORT1
HLT
DSPLAY: MOV A,B
OUT PORT2
HLT
7. Write instructions to load two unsigned numbers in register B and register C,
respectively. Subtract (C) from (B). If the result is in 2's complement, convert the
result in absolute magnitude and display it at PORT1; otherwise, display the
positive result. Execute the program with the following sets of data.
8. Data bytes are stored in memory locations from 8050H to 805FH. To insert an
additional five bytes of data, it is necessary to shift the data string by five memory
locations. Write a program to store the data string from 8055H to 8064H. Use any
sixteen bytes of data to verify your program.
Utpal Sarma
Page 2 of 5
Home Assignment (Lockdown Period)
IAP-2034
Utpal Sarma
Page 3 of 5
Home Assignment (Lockdown Period)
IAP-2034
Utpal Sarma
Page 4 of 5
Home Assignment (Lockdown Period)
IAP-2034
a. MVI A,17H
LOOP: ORAA
RAL
JNC LOOP
b. MVIA,17H
LOOP: RAL
ORA A
JNC LOOP
c. LXI B, 1000H
LOOP: DCX B
NOP
JNZ LOOP
16. Write an 8085 ALP to convert a two-digit packed BCD to Binary.
17. Write an 8085 ALP to convert an 8-bit binary to packed BCD.
18. Write an 8085 ALP to convert an 8-bit binary number to ASCII hex code.
Utpal Sarma
Page 5 of 5