Status And Flag Lines - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

I/O Handling
137
Remembering that these registers are not really memory locations, but instead are registers on
the card being addressed by the Pa register, storing information to these locations is not the
same as storing to other memory locations or registers. For example, storing a value in R5 to set
the control register sends the information to the addressed interface. Later, if you were to read
a value from R5, the information you sent would not be what is returned. Instead, the contents
of the status register in the interface would be returned.
Status and Flag Lines
Whenever an I/O register is accessed, the interface with the same select code as is in the Pa
register responds. The primary response depends upon the nature of the interface and which
register is accessed (see discussion above). However, in all cases there is a secondary effect.
Part of every interface's response is to set or clear the Status and Flag lines.
The Status line (not to be confused with the status register discussed above), is a single bit
indicating whether the interface is operational or not. By inclusion, this can also mean the
status of the actual peripheral to which the interface is connected. For example, if a peripheral
device has a line coming from it that indicates its power is on, it could be connected to the
Status line in the interface. Then the program could quickly determine whether the device is
turned on or off. As another example, a printer might have the Status line connected to the
out-of-paper indicator (should it have one) to indicate to the program when it is inoperable
because of lack of paper.
The Flag line is a momentary "busy/ready" indicator used to keep the computer from getting
ahead of the peripheral. The line shows that the interface is busy processing the last task given
it by the 9835A/ B or that it is ready for another operation. If the line is set, it indicates
"ready"; if the line is cleared, it indicates "busy". For example, if the computer has a sequence
of ASCII characters to send to a slow printer, it sends one character (making the Flag line
"busy") and then waits for the Flag line to go "ready" again before sending the next character.
There are four instructions, part of the I/O group, which can check these lines -
,j'"
':::::;
Skip if Flag line is set (Le., "ready")
'--",f-- ;'
Skip if Flag line is cleared (Le., "busy")
' : :::<::::: _ _ "
Skip if Status is set (Le., "operational")
(::::;' : ::::, ' - . . , . ,
Skip if Status is cleared (Le., "non-operational")
These instructions have the capability of skipping up to 31 locations in a forward branch, up to
32 locations in a backward branch, or to the same instruction.

Advertisement

Table of Contents
loading

Table of Contents