qdosmsq:traps:trap_3:test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_3:test [2010/10/30 14:10] (current)
george.gwilt created
Line 1: Line 1:
 +====== IO_PEND/​IOB_TEST ======
 +This trap tests for pending input.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$00|D0.L|Error code.|
 +|D1.L| |D1.L|Corrupted.|
 +|D3.W|Timeout.|D3.L|Preserved.|
 +|A0.L|Channel ID. |A0.L|Preserved.|
 +|A1.L| |A1.L|Corrupted.|
 +===== Errors =====
 +
 +
 +|ERR_NC|No pending input.|
 +|ERR_NO|Channel not found.|
 +|ERR_RF|End of file.|
 +
 +===== Notes =====
 +  * 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
 +
 +===== Example =====
 +The example below shows the use of this trap to test for input pending on  the channel whose ID is in A0.L.
 +
 +<​code>​
 +test    moveq   #​0,​d0 ​          ; IO_PEND
 +        trap    #3              ; See if there'​s any input.
 +        bne.s   ​none ​           ; No input
 +        ​
 +        ...                     ; Input the data.
 +</​code>​
  
  • qdosmsq/traps/trap_3/test.txt
  • Last modified: 2010/10/30 14:10
  • by george.gwilt