fig 8-4 p-341. s 5 =if flag (interrupt enable). s 6 =0 always
TRANSCRIPT
![Page 1: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/1.jpg)
![Page 2: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/2.jpg)
![Page 3: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/3.jpg)
![Page 4: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/4.jpg)
![Page 5: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/5.jpg)
![Page 6: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/6.jpg)
![Page 7: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/7.jpg)
Fig 8-4 p-341.
S5=IF flag (interrupt Enable).
S6=0 always.
![Page 8: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/8.jpg)
SSO=during read cycle, it is identifies whether a code or data access is in progress.
![Page 9: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/9.jpg)
![Page 10: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/10.jpg)
![Page 11: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/11.jpg)
![Page 12: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/12.jpg)
![Page 13: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/13.jpg)
![Page 14: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/14.jpg)
![Page 15: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/15.jpg)
![Page 16: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/16.jpg)
![Page 17: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/17.jpg)
![Page 18: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/18.jpg)
![Page 19: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/19.jpg)
![Page 20: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/20.jpg)
![Page 21: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/21.jpg)
![Page 22: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/22.jpg)
![Page 23: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/23.jpg)
![Page 24: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/24.jpg)
![Page 25: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/25.jpg)
![Page 26: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/26.jpg)
![Page 27: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/27.jpg)
![Page 28: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/28.jpg)
![Page 29: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/29.jpg)
![Page 30: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/30.jpg)
![Page 31: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/31.jpg)
![Page 32: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/32.jpg)
![Page 33: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/33.jpg)
![Page 34: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/34.jpg)
![Page 35: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/35.jpg)
![Page 36: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/36.jpg)
![Page 37: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/37.jpg)
![Page 38: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/38.jpg)
![Page 39: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/39.jpg)
![Page 40: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/40.jpg)
![Page 41: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/41.jpg)
![Page 42: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/42.jpg)
![Page 43: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/43.jpg)
![Page 44: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/44.jpg)
![Page 45: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/45.jpg)
![Page 46: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/46.jpg)
![Page 47: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/47.jpg)
![Page 48: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/48.jpg)
![Page 49: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/49.jpg)
![Page 50: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/50.jpg)
![Page 51: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/51.jpg)
![Page 52: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/52.jpg)
![Page 53: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/53.jpg)
![Page 54: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/54.jpg)
Types of I/O for 8088/8086
• Input/output system allows peripherals to:– Provide data or – Receive results after processing the data.
• Implemented using I/O ports.
• Employs two different types of I/O:– Isolated I/O.– Memory mapped I/O.
• Method differs in how I/O ports are mapped into MPU’s address spaces.
• Some microcomputer employs both method.
![Page 55: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/55.jpg)
Isolated I/O• I/O devices treated separately from memory.
– Hardware and software architecture of 8088/8086 support separate memory I/O address space.
• Can be accessed as either byte-wide or word-wide.
• Can be treated as either independent byte-wide I/O ports or word-wide I/O ports.
• Page 0:– Certain I/O instructions can only perform operations to
ports in this part of the address range.– Other I/O instructions can input/output data for ports
anywhere in the address space.
![Page 56: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/56.jpg)
Isolated I/O
FFFFPort 65 535
I/O address space
00FFPort 255
00FEPort 254
.
.
.
.
.
.
0004Port 4
0003Port 3
0002Port 2
0001Port 1
0000Port 0Port 0 (16 bit port)
Port 1 (16 bit port)
Page 0
![Page 57: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/57.jpg)
Isolated I/O
• Advantages:– 1 MByte memory address space is available for use
with memory.– Special instructions have been provided in the
instruction set of 8088/8086 to perform isolated I/O input and output operations.
• These instructions have been tailored to maximize I/O performance.
• Disadvantages:– All input and output data transfers must take place
between AL or AX register and the I/O port.
![Page 58: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/58.jpg)
Memory-mapped I/O
• I/O devices is placed in memory address space of the microcomputer.– The memory address space is assigned
to I/O devices.– MPU looks at the I/O port as though it is
a storage location in memory.– Make use of instructions that affect data
in memory rather than special input/output instructions.
![Page 59: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/59.jpg)
Memory-mapped I/O
FFFFF
:Memory address space
:
E0FFF
::I/O ports
::
E0003
E0002
E0001
E0000
:::
00001
00000
Port 4095
::
I/O ports::
Port 3
Port 2
Port 1
Port 0
I/O addresses
Port 0
)16 bit port(
Port 1
)16 bit port(
![Page 60: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/60.jpg)
Memory-mapped I/O
• Advantages:– Many more instructions and addressing modes
are available to perform I/O operations.– I/O transfers can now take place between I/O port
and internal registers other than just AL/AX.
• Disadvantages:– Memory instructions tend to execute slower than
those specifically designed for isolated I/O.– Part of the memory address space is lost.
![Page 61: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/61.jpg)
Isolated Input/Output Interface
• The interface permits 8088/8086 microcomputers to communicate with the outside world.
• The interface between MPU and I/O is similar to MPU and memory.
• Input output data transfers also take place over the multiplexed address/data bus.
• Through this I/O interface, the MPU can input or output data in bit, byte or word (8086) formats.
![Page 62: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/62.jpg)
Isolated Input Output Interface :: Minimum-mode Interface
Minimum-mode 8088 system I/O interface
![Page 63: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/63.jpg)
Isolated Input Output Interface :: Minimum-mode Interface
Minimum-mode 8086 system I/O interface
![Page 64: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/64.jpg)
Isolated Input Output Interface :: Minimum-mode Interface
• Example of I/O device:– Keyboard (input).– Printer (output).– Asynchronous serial communications port
(input/output).
• Circuits in the interface section must perform functions such as:– Select I/O port.– Latch output data.– Sample input data.– Synchronize data transfers.
![Page 65: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/65.jpg)
Isolated Input Output Interface :: Minimum-mode Interface (8088)
• Data/Address Lines:– Multiplexed address/data bus.– Only 16 least significant lines used.
• AD0-AD7 and A8-A15.
• Control Signals:– Similar to memory interface.
• Difference between 8088 and 8086.– Complete data bus used for data transfer.
• AD0-AD15.– M/IO complement of IO/M.– SSO replaced with BHE.
![Page 66: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/66.jpg)
Isolated Input Output Interface :: Maximum-mode Interface
Maximum-mode 8088 system I/O interface Maximum-mode 8086 system I/O interface
![Page 67: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/67.jpg)
Isolated Input Output Interface :: Maximum-mode Interface (8088/86)
• 8288 bus controller produces control signals for the I/O subsystems.
• Decoded S2S1S0 will determine which type of bus cycle is in progress.
• If code corresponds to:– I/O read bus cycle , 8288 generates IORC. – I/O write bus cycle, then IOWC and AIOWC generated.
• 8288 also produces ALE, DT/R and DEN control signals.
• Data and addresses are transferred over AD0-AD7 and A8-A15.
• 8086 differs from 8088 as follows:– 16 bit data bus is the path for data transfers.– Signal BHE is included.
![Page 68: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/68.jpg)
Input Output Data Transfers
• Data transfers:– Byte-wide or word-wide.
• I/O address used to select the input/output port to be accessed.– I/O address specified as part of the instruction that performs the I/O
operation.
• The addresses:– 16 bits in length.– Output over AD0 (LSb) – AD7 and A8-A15 (MSb).
• The most significant address lines A16-A19 = 0 during address period (T1) of all bus cycles.
• IO/M determines I/O operations. Held at 1 during the complete input/output bus cycles.
![Page 69: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/69.jpg)
Input Output Data Transfers
• Data transfer (8088).– Performed over data bus.– Byte-wide transfers = 1 cycle (D0-D7).– Word-wide transfers require two bus cycles.
• Two consecutive byte-wide data transfers.
• Data transfer (8086):– The addresses are output on address/data bus lines AD0-
AD15.– A0 and BHE determine whether access at odd-addressed
byte-wide port, even-addressed byte-wide port or word-wide port.
• i.e. A0BHE = 10 odd-addressed byte wide I/O port is accessed.
![Page 70: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/70.jpg)
Input Output Data Transfers
– Even and odd addressed byte transfer require 1 bus cycle.
• Even-addressed byte transfer D0-D7.
• Odd-addressed byte transfer D8-D15.
– Word data transfer can either require one or two bus cycles .
• Word data transfer performed over D0-D15.
• One cycle word transfer I/O port is aligned at even address boundaries.
• Two cycles word transfer Misaligned word.
![Page 71: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/71.jpg)
Input Output Instructions
• Isolated I/O mode uses special input and output instructions together with I/O port addressing modes.
• Can either be direct or variable I/O instructions.– Can be used to transfer byte/word.– All data transfer take place over I/O device
and accumulator register (AL/AX).• Known as accumulator I/O.
– Byte/word wide transfer determined by AL/AX.
![Page 72: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/72.jpg)
Input Output Instructions
MnemonicMeaningFormat Operation
INInput directIN Acc, Prt(Acc) (Port)
Acc = AL or AX
Input indirect (variable)
IN Acc, DX(Acc) ((DX))
OUTOutput directOUT Prt, Acc(Port) (Acc)
Output indirect (variable)
OUT DX, Acc((DX)) (Acc)
Input/output instructions
![Page 73: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/73.jpg)
Input Output Instructions :: Direct I/O Instructions
• Address of the I/O port:– Specified as part of the instruction.
• 8 bits provided for direct address, thus:– Address range is limited to 0016-FF16.– This range is referred as page 0 in I/O address space.
• i.e. IN AL, 0FEH – (AL) (FE16)– Content of address FE to be input to the AL register.– Only one bus cycle.
![Page 74: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/74.jpg)
Input Output Instructions :: Direct I/O Instructions
• Example 2:
– Write a sequence of instructions that will output the data 3416 to a byte-wide output port at address 8916 of the I/O address space.
![Page 75: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/75.jpg)
Input Output Instructions
• Difference between direct and variable:– The way in which the address of the I/O port is
specified.– Direct 8 bit address is specified as part of the
instruction.– Variable use 16 bit address in DX register.
• (DX) is not an offset but actual address.
• Variable I/O instructions can access ports located anywhere in the 64 K byte I/O address space.
• Data/address must be loaded into or removed from AL/AX/DX before another input or output operation can be performed.
![Page 76: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/76.jpg)
Input Output Instructions
• Example 2:
– Write a program that will output DA16 to an output port located at address EA2016 of the I/O address space.
– Data are to be read in from two byte-wide input ports at address AA16 and BA16 and then output as a word-wide output port at address B00016. Write a program to perform this input/output operation.
![Page 77: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/77.jpg)
Input Output Bus Cycles
• Signals (minimum-mode) similar to those involved in memory interface.
• Function, logic levels and timing of all signals other than IO/M are identical to section 8.11.
• IO/M changes at logic level, not the timing.
![Page 78: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/78.jpg)
Input Bus Cycles :: 8088
• T1: – IO/M =1 and maintained
throughout the cycle.• Indicate IO operation.
– ALE output together with address.
– DEN =0.• Signals interface circuitry
when to put data onto the bus.
• 8088 reads data off the bus during period T3.
Input bus cycle of the 8088
![Page 79: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/79.jpg)
Output Bus Cycles :: 8088
• 8088 puts data on the bus late in T2 and maintains it during the rest of the bus cycle.
• This time WR = 0.– Signals I/O system that
valid data are on the bus.
Output bus cycle of the 8088
![Page 80: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/80.jpg)
Input Bus Cycles :: 8086
• Differences:
– BHE output along with address in state T1.
• Used with A0 to select even/odd address byte/word wide port.
– Data transfer over 16 bit address/data bus at T3.
– M/IO replaces IO/M.– SSO = none.
Refer figure 8-52 & 8-53
![Page 81: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/81.jpg)
![Page 82: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/82.jpg)
![Page 83: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/83.jpg)
![Page 84: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/84.jpg)
![Page 85: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/85.jpg)
![Page 86: Fig 8-4 p-341. S 5 =IF flag (interrupt Enable). S 6 =0 always](https://reader035.vdocuments.mx/reader035/viewer/2022081513/56649e7c5503460f94b7d533/html5/thumbnails/86.jpg)