138 I/O Handling Programmed I/O Programmed I/O is the process whereby software controls the transfer of information between memory and an interface. In the process the program must decide when and where to make the transfer, how to make it, and how much information to transfer. The decision even to originate the transfer comes under program control. The Status line can be used to determine the availability of an interface. The interface is selected, under program control, by the contents of the Pa register. Then the Status line is checked to see if the interface (and by inclusion its associated peripheral) is operational.
After an operational interface has been chosen, the Flag line can be used to determine when the interface (Le., peripheral) is ready for a transfer and when it has not finished with the previous transfer. With sufficient checks of Flag and Status before and between I/O operations, it is possible to eliminate initiating an I/O operation to an interface which isn't ready for it. For example, a simple output driver for the 98032 interface is - I :=;C)tJI~~C:E~ :::;";i:; F'.3. C: !'''l(;!() :::.!::' t i"'il::' r:!i::' r" i j:) !"'lE' ('·3.1 ISOURCE SSS *+3 C:~-!':::'ck f'()f"' (::r;E:'j""".:::Li:.
'iCtf'"~::t"J fjE·i.)·~ (I::' ISOURCE LDA =164 I8JURa~ JSM Errc~ ~~it I~::;OUFC::E ::;:;FC * I:=;OU~~CE STB F4 I]t~t j:)!.At t t-JE' rii:::':: :.I)Cil·-·c~ .~ C', t ~"'!~:' 'j rit ~:.~.N·F·.3.C E' I :;::;Oi...iF::CE ::;;'T'B ::;:7 ::::; t·ar· 'I:. ·i:. he h.:ti.n d:::. i···.:::i. k ~:' Interrupt I/O Interrupt I/O is a means of allowing control to pass temporarily to an assembly language routine other than the routine (BASIC or assembly language) currently executing. The "interrupt", which causes the control to be passed, is detected through the backplane and is control is passed back to the original routine. associated with a particular interface.
After the "interrupt service" routine completes its tasks,