* SMS2 - IOSS operations
*
* This file - SMS16_in - contains the io sub-system trap definitions
*
         nolist

do.io    equ    3            trap #3
do.relio equ    4            trap #4

* Character/byte IO operations

iob.test equ    $00          TEST input
iob.fbyt equ    $01          Fetch BYTe from input
iob.flin equ    $02          Fetch LINe from input
iob.fmul equ    $03          Fetch MULtiple characters/bytes
iob.elin equ    $04          Edit LINe of characters
iob.sbyt equ    $05          Send BYTe to output

iob.smul equ    $07          Send MULtiple bytes

* Window IO operations

iow.xtop equ    $09          eXTernal OPeration on screen
iow.pixq equ    $0a          PIXel coordinate Query
iow.chrq equ    $0b          CHaRacter coordinate Query
iow.defb equ    $0c          DEFine Border
iow.defw equ    $0d          DEFine Window
iow.ecur equ    $0e          Enable CURsor
iow.dcur equ    $0f          Disable CURsor
iow.scur equ    $10          Set CURsor position (character coordinates)
iow.scol equ    $11          Set cursor COLumn
iow.newl equ    $12          put cursor on a NEW Line
iow.pcol equ    $13          move cursor to Previous COLumn
iow.ncol equ    $14          move cursor to Next COLumn
iow.prow equ    $15          move cursor to Prevous ROW
iow.nrow equ    $16          move cursor to Next ROW
iow.spix equ    $17          Set cursor to PIXel position
iow.scra equ    $18          SCRoll All of window
iow.scrt equ    $19          SCRoll Top of window (above cursor)
iow.scrb equ    $1a          SCRoll Bottom of window (below cursor)
iow.pana equ    $1b          PAN All of window

iow.panl equ    $1e          PAN cursor Line
iow.panr equ    $1f          PAN Right hand end of cursor line
iow.clra equ    $20          CLeaR All of window
iow.clrt equ    $21          CLeaR Top of window (above cursor)
iow.clrb equ    $22          CLeaR Bottom of window (below cursor)
iow.clrl equ    $23          CLeaR cursor Line
iow.clrr equ    $24          CLeaR Right hand side of cursor line
iow.font equ    $25          set / read FOuNT (font U.S.A.)
iow.rclr equ    $26          ReCoLouR a window
iow.spap equ    $27          Set PAPer colour
iow.sstr equ    $28          Set STRip colour
iow.sink equ    $29          Set INK colour
iow.sfla equ    $2a          Set FLash Attribute
iow.sula equ    $2b          Set UnderLine Attribute
iow.sova equ    $2c          Set OVerwrite Attributes
iow.ssiz equ    $2d          Set character SIZe
iow.blok equ    $2e          fill a BLOcK with colour

iow.donl equ    $2f          DO a pending newline

* Graphics operations

iog.dot  equ    $30          draw (list of) DOTs
iog.line equ    $31          draw (list of) LINEs
iog.arc  equ    $32          draw (list of) ARCs
iog.elip equ    $33          draw ELlIPse
iog.scal equ    $34          set graphics SCALe
iog.fill equ    $35          set area FILL
iog.sgcr equ    $36          Set Graphics CuRsor position

* Filing system

iof.chek equ    $40          CHEcK all pending operations on file
iof.flsh equ    $41          FLuSH all buffers
iof.posa equ    $42          set file POSition to Absolute address
iof.posr equ    $43          move file POSition Relative to current position
iof.posv equ    $44          set file POSition to Virtual address
iof.minf equ    $45          get Medium INFormation
iof.shdr equ    $46          Set file HeaDeR
iof.rhdr equ    $47          Read file HeaDeR
iof.load equ    $48          (scatter) LOAD file
iof.save equ    $49          (scatter) SAVE file
iof.rnam equ    $4a          ReNAMe file
iof.trnc equ    $4b          TRuNCate file to current position
iof.date equ    $4c          set or get file DATEs
iof.mkdr equ    $4d          MaKe DiRectory
iof.vers equ    $4e          set or get VERSion (d1 keys as iof.date)
iof.xinf equ    $4f          get eXtended INFormation
*
* Extended information block
*
ioi_name equ      $00        string  up to 20 character medium name (null filled)
ioi_dnam equ      $16        string  up to 4 character long device name (e.g. WIN)
ioi_dnum equ      $1c        byte    drive number
ioi_rdon equ      $1d        byte    set if read only
ioi_allc equ      $1e        word    allocation unit size (in bytes)
ioi_totl equ      $20        long    total medium size (in allocation units)
ioi_free equ      $24        long    free space on medium (in allocation units)
ioi_hdrl equ      $28        long    header length (per file storage overhead)
ioi_xxxx equ      $2c        $14 bytes set to -1
ioi.blkl equ      $64        information block length

iofd.get equ      -1         d1 key, GET date (or version)
iofd.cur equ      0          d1 key, set CURrent date (or version)
iofd.upd equ      0          d2 key, set/get UPDate date
iofd.bak equ      2          d2 key, set/get BAcKup date

* timeout keys

no.wait  equ    0
forever  equ    -1

         list
