Chapter 10.1: 8086 Pins
Multiple Choice · Overview
Question 1: Purpose of Multiplexing
Why do the 8086's address and data bits share the same pins (AD0–AD15) by time multiplexing?
D: 20 address + 16 data + control, clock and power signals fit into 40 pins only with multiplexing: AD0–AD15 carry the address in T1, then data; A16–A19 carry the address in T1, then status (S3–S6). The goal is saving pins, not speed; the price is latching the address externally with ALE and every access taking at least 4 clock cycles. The address bus is still unidirectional.
Short Answer · Overview
Question 2: Pins by Mode
At which level must the MN/MX' pin be tied to select maximum mode? Give the maximum-mode functions of pins 24–31, whose minimum-mode names are listed.
| Pin | Minimum | Maximum |
|---|---|---|
| 24 | INTA' | ? |
| 25 | ALE | ? |
| 26–28 | DEN', DT/R', M/IO' | ? |
| 29 | WR' | ? |
| 30–31 | HLDA, HOLD | ? |
Show answer
MN/MX' = 0 (GND) → maximum mode; 1 (VCC) → minimum mode. The mode is set by hardware and does not change while running.
| Pin | Maximum | Role |
|---|---|---|
| 24–25 | QS1, QS0 | queue status (watched by the 8087) |
| 26–28 | S0', S1', S2' | cycle type → 8288 |
| 29 | LOCK' | locks the bus |
| 30–31 | RQ'/GT1', RQ'/GT0' | bus request/grant |
In maximum mode the 8288 bus controller generates the command signals that replace ALE, DEN', DT/R', INTA' and WR', such as MWTC'/IOWC' (and MRDC'/IORC'); RD' (pin 32) is a processor pin in both modes.
Multiple Choice · Address and Data
Question 3: The Address-Latching Signal
Which signal makes the address on AD0–AD15 get captured by the external latches (8282) during T1?
A: ALE (address latch enable) is 1 during T1 of every bus cycle; on its falling edge the 8282 latches capture the address and present it stably to memory and I/O for the whole cycle. After T2 the same pins carry data. DEN' enables the data transceiver, DT/R' selects its direction, and BHE' says the upper half of the data bus will be used.
Classic Question · Address and Data
Question 4: BHE' and A0
DS = 0000h. For each instruction give the number of data bus cycles, the BHE' and A0 values in each cycle, and which lines carry the data.
MOV [2004h], AXMOV [2007h], AXMOV AL, [2009h]MOV [200Ah], AH
Show answer
| Cycle | Address | BHE' | A0 | Lines | |
|---|---|---|---|---|---|
| 1 | 1 | 02004h | 0 | 0 | D15–D0 (AL → even, AH → odd) |
| 2 | 1 | 02007h | 0 | 1 | D15–D8 (AL) |
| 2 | 02008h | 1 | 0 | D7–D0 (AH) | |
| 3 | 1 | 02009h | 0 | 1 | D15–D8 → AL |
| 4 | 1 | 0200Ah | 1 | 0 | D7–D0 (AH) |
Even addresses are in the low bank (D7–D0), odd addresses in the high bank (D15–D8). A word at an odd address is split into two cycles; a byte access is a single cycle at any address.
Step-by-Step Trace · Address and Data
Question 5: Aligned and Unaligned Access
How many bus cycles does each data access take, and what are BHE' and A0? What are CX and DL at the end? (30205h starts as 00h.)
DS = 3000h: the data segment starts at 30000h. These two instructions use only instruction-fetch cycles.
PA = 30203h is odd. Cycle 1: BHE' = 0, A0 = 1 → high bank only; the 6Bh in AL is written over D15–D8.
Cycle 2: PA = 30204h, BHE' = 1, A0 = 0 → low bank only; the 5Ah in AH is written. An unaligned word = 2 cycles.
PA = 30206h is even: BHE' = 0, A0 = 0 → both banks at once; BL (D2h) goes to the even and BH (C1h) to the odd address in a single cycle.
Word read from an odd address: cycle 1 reads 30205h (BHE' = 0, A0 = 1) → CL = 00h; cycle 2 reads 30206h (BHE' = 1, A0 = 0) → CH = D2h. CX = D200h.
Byte read, even address: BHE' = 1, A0 = 0, D7–D0 → DL = 5Ah. Total data bus cycles: 2 + 1 + 2 + 1 = 6.
mov ax, 3000h mov ds, ax mov ax, 5A6Bh mov [0203h], ax mov bx, 0C1D2h mov [0206h], bx mov cx, [0205h] mov dl, [0204h]
Multiple Choice · Bus Cycles
Question 6: Bus Turnaround on a Read
Why does the 8086 put the AD0–AD15 drivers in high impedance (float them) during T2 of a read bus cycle?
B: In T1 the processor drives the address; in T3–T4 memory drives the data. In between, the processor has to release its outputs, or two drivers would fight on the same line. This bus turnaround exists only on reads: on a write, the processor is still the source of the data. The address was latched in T1; READY is a separate pin.
Classic Question · Bus Cycles
Question 7: How Many Wait States?
In a 10 MHz 8086-1 system, the address delay, data setup time and buffer delays add up to TCLAV + TDVCL + tbuffer = 90 ns. If the memory access time is a) 350 ns, b) 250 ns, c) 200 ns, how many Tw states are needed? How long does the bus cycle last in each case?
Show answer
T = 1 / 10 MHz = 100 ns; tallowed = 3T − 90 = 300 − 90 = 210 ns. n = ⌈(taccess − tallowed) / T⌉, or 0 if negative.
| Access | n | Cycle |
|---|---|---|
| 350 ns | ⌈140 / 100⌉ = 2 | 6 × 100 = 600 ns |
| 250 ns | ⌈40 / 100⌉ = 1 | 5 × 100 = 500 ns |
| 200 ns | 200 ≤ 210 → 0 | 4 × 100 = 400 ns |
Check (350 ns): 1 Tw → 310 ns is not enough; 2 Tw → 410 ns is enough. Each Tw stretches the window by one T.
Step-by-Step Trace · Bus Cycles
Question 8: READY and the Wait State
A 5 MHz 8086 (T = 200 ns) reads from a slow memory that can have the data ready only with one wait state. Which states does the cycle go through, and how long does it take?
T1: M/IO' = 1, the address is on the AD pins; the ALE pulse latches it. The address decoder selects the slow memory, and the memory pulls READY to 0.
T2: the AD drivers float, RD' = 0 and DEN' = 0: the transceiver is enabled; since DT/R' = 0 (from T1), data will flow from memory to the processor.
T3: the processor samples READY; READY = 0 → it does not go on to T4 but inserts a Tw. All signals stay as they are.
Tw: the data is now on the bus; READY = 1 is sampled → the next state is T4.
T4: the data is taken into the processor, and RD' and DEN' go inactive. The cycle took 5 × 200 = 1000 ns; had READY stayed 0 for two Tw states, 1200 ns.
T1: address to AD, ALE = 1
T2: AD floats, RD' = 0, DEN' = 0
T3: READY is sampled
READY = 0 → add Tw
Tw: READY is sampled again
T4: data is taken in, RD' = 1
Short Answer · Status Pins
Question 9: Which Segment Is Used?
During T2–T4, pins A17/S4 and A16/S3 show which segment register is used for the access. What are S4 S3 for the accesses below? What does A18/S5 show?
- Instruction byte fetch
- Data read of
MOV AL, [BX] - Write of
PUSH AX - Read of
MOV AL, ES:[DI] - Read of
MOV AX, [BP+4]
Show answer
| Access | Segment | S4 S3 |
|---|---|---|
| code fetch | CS | 1 0 |
[BX] | DS | 1 1 |
PUSH | SS | 0 1 |
ES:[DI] | ES | 0 0 |
[BP+4] | SS | 0 1 |
S5 is the current IF flag; S6 is always 0. I/O and interrupt-vector accesses also give code 1 0 (CS or no segment). With these bits, a separate 1 MB of memory can be attached to each segment.
Multiple Choice · Control Pins
Question 10: Transceiver Direction
In minimum mode, DEN' = 0 and DT/R' = 0 are measured during T2–T4 of a bus cycle. What happens at the data bus transceiver (8286)?
A: DEN' is active low: with 0 the transceiver is enabled. DT/R' = 1 means transmit (write), 0 means receive (read); this cycle is a read, so data flows toward the processor. DEN' stays 1 during T1 so the address on the AD pins does not leak onto the data bus. Handing the bus to another master happens through HOLD/HLDA.
Short Answer · Control Pins
Question 11: Command and Control Signals
In minimum mode, what values do M/IO', RD', WR' and DT/R' take in the data bus cycle of the following instructions?
MOV AL, [BX]MOV [BX], ALIN AL, 60hOUT 43h, AL
Show answer
| Instruction | M/IO' | RD' | WR' | DT/R' | Operation |
|---|---|---|---|---|---|
MOV AL, [BX] | 1 | 0 | 1 | 0 | memory read |
MOV [BX], AL | 1 | 1 | 0 | 1 | memory write |
IN AL, 60h | 0 | 0 | 1 | 0 | I/O read |
OUT 43h, AL | 0 | 1 | 0 | 1 | I/O write |
RD' and WR' are active low; they are never both 0. The 8088 has IO/M' instead of M/IO', with the opposite polarity. Every instruction is also preceded by an instruction-fetch (memory read) cycle.
Multiple Choice · Control Pins
Question 12: After a Reset
After the RESET pin is held at 1 for at least four clock cycles and then released, from which physical address does the 8086 fetch its first instruction?
B: After reset CS = FFFFh, IP = 0000h, DS = SS = ES = 0000h; the flags are cleared (IF = 0, interrupts disabled) and the queue is emptied. PA = FFFF0h + 0000h = FFFF0h: the last 16 bytes of the 1 MB. The ROM (BIOS) is placed here and usually holds a far JMP to the real start-up code.
Multiple Choice · Control Pins
Question 13: DMA and Bus Handover
In minimum mode a DMA controller requests the bus. What is the correct order of events?
D: HOLD is an active-high request. The 8086 completes the bus cycle it is in, floats the address, data and control pins at T4 or in the middle of an idle cycle, and acknowledges with HLDA = 1. Meanwhile the EU can keep executing queued instructions. When HOLD drops, HLDA drops too and the bus is taken back. The interrupt mechanism (INTR/INTA') is a separate handshake.
Classic Question · Control Pins
Question 14: Clock Generator
A 30 MHz crystal is connected to the 8284A clock generator.
- What are the CLK frequency and period? Which 8086 version is it suitable for?
- With a 33% duty cycle, for what part of a period is the clock at 1?
- How long does a bus cycle with no wait states last?
- What does the 8284A do with the READY and RESET inputs?
Show answer
- The 8284A divides the crystal by 3: 30 / 3 = 10 MHz, T = 100 ns → 8086-1 (8086: 5 MHz, 8086-2: 8 MHz).
- 100 / 3 ≈ 33 ns high, ≈ 67 ns low.
- 4 × 100 = 400 ns.
- It synchronizes both to the clock; the Schmitt trigger on the RES' input turns the slowly rising voltage from the RC circuit into a clean RESET signal.
Multiple Choice · Maximum Mode
Question 15: Status Code and the 8288
In maximum mode, S2' S1' S0' = 0 1 0 is seen at the start of a bus cycle. Which command signal does the 8288 bus controller generate?
C: S2' = 0 → I/O or special cycle; S1' S0' = 1 0 → write. The code table: 000 interrupt acknowledge (INTA'), 001 I/O read (IORC'), 010 I/O write (IOWC', AIOWC'), 011 HLT, 100 code fetch, 101 memory read (MRDC'), 110 memory write (MWTC'), 111 passive. An OUT instruction starts this cycle.
Multiple Choice · Interrupts
Question 16: INTR and NMI
Which statement about the INTR and NMI pins is correct?
C: INTR is a level-triggered, maskable input: it is accepted at the end of each instruction only when IF = 1; the processor generates two INTA' pulses, and during the second the interrupt controller puts the type number on D7–D0. NMI is triggered by a 0 → 1 transition, cannot be disabled with CLI, and has a fixed type number (2); it is for urgent events such as power failure and memory parity errors.