This is an old revision of the document!


These traps read a set of bytes from a channel.

Call ParametersReturn Parameters
D0.B$02 or $03D0.LError code.
D1.L D1.WNumber of bytes fetched.
D2.WLength of buffer. D2.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.LPointer to buffer.A1.LPointer to one byte after the last fetched.
ERR_NCNot complete.
ERR_NOChannel not open.
ERR_EFEnd of file.
ERR_BOBuffer overflow.
  • All registers not shown above are not used on entry and are preserved on exit.
  • D0.B is $02 for IO_FLINE/IOB_FLIN and $03 for IO_FSTRG/IOB_FMUL.
  • IO_FLINE/IOB_FLIN fetches a line of bytes ending with LF ($0A). The LF is included as the last character fetched. If the number of bytes read before LF is reached exceeds the size of the buffer a buffer overflow error occurs.
  • IO_FSTRG/IOB_FMUL reads the number of bytes specified in D2.W unless EOF is reached first.
  • If bytes are being read from a CON channel the actions of the two Traps are different. For IO_FLINE/IOB_FLIN the cursor is enabled and the characters are mirrored in the window. Also the arrow keys can be used to edit the line in the normal way. For IO_FSTRG/IOB_FMUL the characters are not printed in the window and any cursor handling is up to the application.

No example yet

info    moveq   #0,d0           ; MT_INF
        trap    #1              ; Get system variables address into A0
        ...                     ; Do something here.
  • qdosmsq/traps/trap_3/flin.1235301766.txt.gz
  • Last modified: 2009/02/22 11:22
  • by george.gwilt