This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: I/O polling EE 3750 2 Instructions for input and output IN AL, source (byte) IN AX, source (word) source is a port address source may be DX: variable address up to 16-bits long or an 8-bit constant (fixed address) OUT dest, AL (byte) OUT dest, AX (word) dest is a port address; may be DX or an 8-bit constant Example instructions: IN AX, 4DH IN AL, DX OUT DX, AX 3 Polling program-controlled I/O Processor examines (polls) the status of an interface and performs an I/O operation when the status of the interface indicates that it has data to be input or that its data-out buffer register is ready to receive data from the processor. Figure below shows program- controlled input 4 Example 1 Output one word of data by program-controlled I/O from buffer (variable) WHITE. Let 20H be the data port address (word-size), 22H be the status port address (byte-size), and let bit 1 be the ready bit....
View Full Document
- Fall '08
- mov, STATUS EQU 22H, DATA EQU 20H, JZ CKRDY