5 |
WRITING A DRIVER
IF BIT 13 IS SET THEN
RETURN TO THE CALLER OF YOUR CODE THROUGH 1. AN RTS IF HE CALLED YOU WITH A BSR/JSR
2. AN RTE IF HE CALLED YOU WITH A TRAP THAT REQUIRES AN RTE RETURN.
ELSE: (bit 13 is clear)
1. RESTORE THE REGISTER SET POINTED TO BY A3.
2. SOMEHOW PERFORM THE RTE REQUIRED BY THE
SOME OPERATING SYSTEMS HAVE A COMMON
HANDLER THAT PERFORMS ALL RETURNS FROM
PROCESSING. IN THIS CASE, EXECUTE THE COMMON
INTERRUPT HANDLER TO PERFORM THE RTE. IF THE
PARTICULAR OPERATING SYSTEM OF THE USER
HAVE A COMMON INTERRUPT HANDLER, EXECUTE THE
RTE INSTRUCTION.
ENDIF.
END OF RETURN CODE.
As can be seen from the return algorithm, the preprocessed packet and the packet queuing process is done through the software interrupt (vector $4B) set by the firmware and is transparent from user tasks. Here are the reasons:
1.A preprocessed packet has already run through the firmware BLDPCKT (build
command packet) module and is ready to communicate with the initiator or TARGET
on the SCSI bus. The only reason that this command packet did not make it
to the bus was that a selection or a reselection interrupt of the MVME147 beat
this packet to the bus. It is imperative that this packet run next.
2.A packet was sent to the FUNNEL entry for processing. Because the bus and
device wait queue was occupied at the instant the packet arrived, the