OP = 91
AF is unused and reserved. May be specified as an indirect field length. A literal flag will cause an Invalid Instruction (IEX = 21) fault.
BF is the variant and may be specified as an indirect field length. The following variants may be specified:
|00||Pop Real Time I/O Complete Queue|
|01||Pop Normal I/O Complete Queue|
|02||Pop any Queue, priority is Real Time first, then Normal|
A is the address of an six digit result field. The address may be indexed, indirect or extended. The final address controller must be equal to UN or an Invalid Instruction (IEX = 03) fault will occur.
The Pop I/O Queue instruction is used to pop an entry from a specified I/O Complete Queue (BF = 00-01) or to pop an entry from either of the two queues (BF = 02). When a specific I/O complete queue is accessed, I/O's are popped in the order received. If any I/O complete queue is specified (BF = 02), I/O's will be popped by priority (Real Time first, Normal second); within one of these priorities the I/O's will be popped in the order received.
When this instruction completes, the six digit result field pointed to by the A address will be an ofset into the system IOCB Memory Area that points to the IOCB of an I/O that has completed.
This instruction may only be executed with Privileged Enable set or an Invalid Instruction (IEX = 02) fault is reported.
Examine the Queue specified by BF.
Qhen a Queue entry is popped, the six digit offset into the System IOCB Memory Area, that points to the descriptor of the completed I/O, is stored as the result (A). If there are no entries in the specified Queue, no result will be stored. If there is more than one entry in the queue, only the top entry will be popped.
If there are no entries remaining in the queue being popped or this is the last entry of the queue, then the corresponding interrupt bit is reset (I/O Real Time Complete, I/O Normal Complete).
Set the Comparison Flags to HIGH if there is more than one entry in the Queue. Se the Comparison Flags to EQUAL if the entry popped is the last one in the Queue. Set the Comparison Flags to LOW if there is no entry in the queue.
Set the Overflow Flag only if BF=02 and an entry has been popped from the Real Time I/O Queue, otherwise it is RESET.
Field overlap is not applicable to this instruction.