🎓 BookMCQ
← Back to 7. Interrupt Instructions of 8085

📝 Data Transfer Schemes in 8085 Microprocessor (9 MCQs)

Three Fundamental Methods of Data Transfer

An 8085-based system uses three principal methods to transfer data between the processor, memory and external devices: programmed I/O, interrupt-driven I/O and direct memory access. These schemes differ in how the transfer is initiated and how much processor involvement is required. Their selection depends on transfer speed, hardware complexity, device requirements and the amount of data being exchanged.

CPU-Controlled and Interrupt-Controlled Transfer Mechanisms

In programmed I/O, the processor repeatedly checks a device's status and transfers information using IN or OUT. Interrupt-driven I/O allows a peripheral to request processor attention when it is ready. DMA uses an external controller to transfer data directly between memory and an I/O device without requiring the CPU to execute an instruction for every byte.

Sequence of Operations in Different Transfer Schemes

Programmed I/O begins with status checking followed by an instruction-based transfer. Interrupt-driven I/O begins when the device raises an interrupt request, after which the processor executes a service routine. In DMA, an external controller requests bus ownership through HOLD, receives acknowledgement through HLDA and performs the required memory transfers.

Example of Selecting a Transfer Scheme

Consider a keyboard connected to an 8085 system. Programmed I/O repeatedly checks whether a key is available. Interrupt-driven I/O allows the keyboard to signal the processor when a key is pressed. For transferring a large block of data from a storage device into RAM, DMA reduces repeated CPU involvement.

Transfer Efficiency and Hardware Requirements

Programmed I/O is straightforward but consumes processor time during status polling. Interrupt-driven I/O improves processor utilization because the CPU can execute other instructions while waiting for a device request. DMA is suitable for high-volume transfers, although it requires additional control hardware and temporary access to the system buses.

Misconceptions About Data Transfer Methods

'DMA requires the CPU to execute every data-transfer instruction' is incorrect because the DMA controller performs the transfers. 'Interrupt-driven I/O continuously checks device status' confuses interrupts with polling. 'Programmed I/O never uses the accumulator' is incorrect because IN and OUT transfer data through A.

Comparison of Data Transfer Schemes in Examinations

Be prepared to compare processor involvement, device initiation, transfer speed and hardware requirements. Identify polling, interrupt requests and HOLD/HLDA handshaking. Questions may describe a practical device and ask which transfer scheme is appropriate, or require tracing the sequence of events and distinguishing CPU-controlled transfers from DMA operations.

Data Transfer and Bus-Control Terminology

  • Programmed I/O - Transfers controlled by processor instructions.
  • Interrupt-Driven I/O - Uses device interrupt requests.
  • DMA - Transfers data without per-byte CPU handling.
  • Polling - Repeatedly checks device status.
  • HOLD - Requests control of system buses.
  • HLDA - Acknowledges the bus request.
2
Easy
5
Medium
2
Hard

📝 All Data Transfer Schemes in 8085 Microprocessor MCQs

Q1. Given N = 03H and the three bytes 55H, AAH, 01H stored at 2101H‑2103H, what three bytes will appear at 2201H‑2203H after the program finishes?

A.ABH, 55H, FEH
B.AAH, 56H, FFH
C.ABH, 55H, FEH ✅
D.54H, AAH, 00H
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The program reads the least‑significant byte first, complements it (CMA) and adds 1 (ADI 01H) to obtain its 2’s complement. For 55H, the complement is AAH and adding 1 yields ABH. No carry is generated, so the next byte is simply complemented, giving 55H. The third byte 01H becomes FEH after complement and addition. Options A and D give wrong values, and B mis‑adds the carry. The correct sequence matches option C, showing how 2’s complement works byte‑by‑byte.

Q2. If the result area must start at address 2300H instead of 2201H, which instruction(s) should be altered?

A.Change LXI D,2201H to LXI D,2300H ✅
B.Change LXI H,2100H to LXI H,2300H
C.Replace STAX D with MOV M,A
D.No change needed
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The destination address is set by the DE register pair, loaded with LXI D. To redirect the output to 2300H you only need to modify the LXI D instruction; the source address (HL) remains unchanged because it still points to the input data. Changing LXI H would affect the input location, not the output. Replacing STAX D would store at the wrong address, and doing nothing would leave the results at 2201H. Therefore option A is the correct modification.

Q3. When the byte count N stored at 2100H is 00H, what is the behavior of the program?

A.It halts immediately
B.It enters an infinite loop ✅
C.It processes one byte and stops
D.It jumps to address 2100H
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The program copies N into register C and then decrements C after each iteration. If N = 00H, C starts at zero, DCR C wraps to FFH, and the subsequent JNZ LOOP will be taken, causing the loop to repeat indefinitely because the counter never reaches zero again. The program does not reach the HLT instruction, so it does not halt. Options A and C describe premature termination, while D suggests an unrelated jump. Option B correctly describes the infinite loop.

Q4. To compute the 10’s complement of each BCD byte instead of the 2’s complement, which instruction sequence should replace the pair CMA; ADI 01H?

A.CMA; ADI 0FH
B.CMA; ADI 09H
C.CMA; DAA
D.CMA; ADI 01H; DAA ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The 10’s complement of a BCD digit is obtained by forming the 9’s complement (by complementing each nibble) and then adding 1. In 8085 code this is done by using CMA to get the 1’s complement, adding 1 with ADI 01H, and finally applying DAA to adjust the result back to valid BCD. Options A and B add the wrong constant, and C omits the required addition of 1. Only option D follows the correct sequence, so it is the right answer.

Q5. Why does the program use register B to hold the carry after each byte operation?

A.B retains the carry for the next more‑significant byte ✅
B.B is used as a temporary storage for the data byte
C.B holds the count of processed bytes
D.B is required for the HLT instruction
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: After computing the 2’s complement of a byte, a possible carry must be added to the next higher‑order byte. The program stores this carry (0 or 1) in register B and later adds it with the ADD B instruction, ensuring proper propagation across the multi‑byte word. Register B is not used for data storage, counting, or halting, making options B, C, and D incorrect. Option A correctly explains the role of B in carry propagation.

Q6. What is the primary purpose of the CMA instruction in this routine?

A.It adds 1 to the accumulator
B.It generates the 1’s complement of the accumulator ✅
C.It loads the next data byte
D.It increments the HL pair
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: CMA stands for Complement Accumulator; it flips every bit of the accumulator, producing the 1’s complement of the current byte. This step is essential before adding 1 to form the 2’s complement. The instruction does not perform addition, data loading, or address incrementing, so options A, C, and D describe unrelated actions. Therefore, option B accurately captures the purpose of CMA.

Q7. At which memory location is the hexadecimal value that indicates the number of bytes N stored?

A.2101H
B.2201H
C.2100H ✅
D.2200H
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The program begins by loading the HL pair with 2100H and then moves the contents of that address into register C (MOV C,M). This address therefore holds the count N. The other addresses are used for the first data byte (2101H) and the result area (2201H). Option C correctly identifies 2100H as the location of N.

Q8. How does the program ensure that a carry generated from adding 1 to a byte is propagated to the next more‑significant byte?

A.It resets the carry flag after each addition
B.It stores the carry in the accumulator
C.It uses the D register as a flag
D.It places the carry in register B and adds it with the ADD B instruction ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: When a byte addition produces a carry, the program loads B with 01H; otherwise it loads B with 00H. The subsequent ADD B instruction incorporates this value into the next byte’s computation, effectively propagating the carry. The carry flag itself is not examined directly, and the accumulator only holds the current byte. Register D is used for addressing, not for carry handling. Hence, option D correctly describes the mechanism.

Q9. After processing N = 02H bytes, what are the final contents of the HL and DE register pairs?

A.HL = 2103H, DE = 2203H ✅
B.HL = 2102H, DE = 2202H
C.HL = 2101H, DE = 2201H
D.HL = 2100H, DE = 2200H
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The routine starts with HL = 2100H, reads N, then increments HL to 2101H. Each loop iteration processes one byte and then increments both HL and DE. After two iterations (N = 02H), HL has been incremented three times (2100H → 2101H → 2102H → 2103H) and DE three times (2201H → 2202H → 2203H). Therefore the final registers are HL = 2103H and DE = 2203H, matching option A. The other options reflect fewer increments and are therefore incorrect.

🔗 Related Topics (MCQs)