qdosmsq:traps:trap_3:test

IO_PEND/IOB_TEST

This trap tests for pending input.

Call ParametersReturn Parameters
D0.B$00D0.LError code.
D1.L D1.LCorrupted.
D3.WTimeout.D3.LPreserved.
A0.LChannel ID. A0.LPreserved.
A1.L A1.LCorrupted.
ERR_NCNo pending input.
ERR_NOChannel not found.
ERR_RFEnd of file.
  • All registers not shown above are not used on entry and are preserved on exit.
  • If D0.L is zero there is data waiting to be read. It is assumed that the channel ID is in A0.L

The example below shows the use of this trap to test for input pending on the channel whose ID is in A0.L.

test    moveq   #0,d0           ; IO_PEND
        trap    #3              ; See if there's any input.
        bne.s   none            ; No input
        
        ...                     ; Input the data.
  • qdosmsq/traps/trap_3/test.txt
  • Last modified: 2010/10/30 14:10
  • by george.gwilt