Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
IO

IO

Ratings: (0)|Views: 1 |Likes:
Published by BSASciti
Input-Output
Input-Output

More info:

Categories:Types, Research
Published by: BSASciti on Jan 20, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/20/2013

pdf

text

original

 
I/O and Interrupts
 There is more variety between CPUs in the way theyhandle Input and Output (I/O) than in any other type of instruction.
I/O processing can be either:
 –
Memory-mapped
 The I/O registers in the device controllers form partof regular address space, and are read and writtenusing normal LOAD and STORE-type instructions
 –
Non-memory-mapped
Special instructions (e.g. IN OUT) are used to readand write I/O registers
In various combinations with the above there are fourdifferent I/O schemes in general use:
 –
Programmed I/O with busy waiting
 –
Interrupt-driven I/O
 –
DMA I/O
 –
I/O using data Channels
 
Programmed I/O with Busy Waiting
Used in some low-endmicrocomputers
Single input and singleoutput instruction
Each instructionsselects one I/O device(by number) andtransfers a singlecharacter (byte)
Example:microprocessor-controlled videoterminal
Four registers: inputstatus and character,output status andcharacter`
 
Programmed I/O with Busy Waiting
Whenever a character arrives from the keyboard bit 7 of thekeyboard status register is set by the hardware. Inputroutine loops until 1 is set
Whenever a character is to be displayed output routine loopsuntil bit 7 of display status register is set to 1 by thehardware
def OutputBuffer (buffer, count):## Output block of count bytes to the terminal screen#i = 0while i <= count: # for each char:# wait until ready then output while (in (DisplayStatusReg) & 0x80) == 0:passout (buffer[i])i += 1

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->