How many times will the following loop be executed ? LXI B, 0007 H LOP : DCX B MOV A, B ORA C JNZ LOP
07
LXI B, 0007 H loads the register pair BC with 0007 H (B = 00 H, C = 07 H).
DCX B decrements the 16-bit pair BC, but DCX does not affect any flag. So the program tests for zero by copying B into the accumulator (MOV A, B) and OR-ing it with C (ORA C); the Z flag is set only when both B and C are 00 H, i.e. BC = 0000 H.
JNZ LOP repeats the loop while BC ≠ 0. After successive passes BC takes the values 0006, 0005, 0004, 0003, 0002, 0001, 0000 H.
The loop body therefore runs \(7\) times; after the 7th DCX, BC = 0000 H, Z = 1 and the jump is not taken.
Hence, the answer is 07.
Match the following 8085 instructions with the flags :
| List – I | List – II | ||
| a. | XCHG | i. | only carry flag is affected. |
| b. | SUB | ii. | no flags are affected. |
| c. | STC | iii. | all flags other than carry flag are affected. |
| d. | DCR | iv. | all flags are affected. |
Codes :
a b c d
Specify the contents of the accumulator and the status of the S, Z and CY flags when 8085 microprocessor performs addition of 87 H and 79 H.
One of the main features that distinguish microprocessor from micro-computers is
What will be the output at PORT1 if the following program is executed ?
MVI B, 82H
MOV A, B
MOV C, A
MVI D, 37H
OUT PORT1
HLT
Which of the following 8085 microprocessor hardware interrupt has the lowest priority ?
In 8085 microprocessor, the digit 5 indicates that the microprocessor needs
In 8085, which of the following performs : load register pair immediate operation ?
The RST 7 instruction in 8085 microprocessor is equivalent to :
8085 microprocessor has _____ hardware interrupts.
Which of the following in 8085 microprocessor performs
HL = HL + DE ?
The magnetic vector potential of an electromagnetic system is given by $ \vec{A}=(y \cos ax) \vec{a_x} + (y+e^x) \vec{a_z}$. The magnitude of the magnetic flux density at the origin is