qdosmsq:pe:slnk

IOP.SLNK

This trap accesses the console linkage block and sets bytes in it.

Call ParametersReturn Parameters
D0.B$6FD0.LError return
D1.WPosition in linkage to setD1.LPreserved
D2.WNumber of bytes to setD2.LPreserved
D3.WTimeoutD3.LPreserved
A0.LWindow channel IDA0.LPreserved
A1.LPointer to data to setA1.LAddress of linkage block
ERR_NOChannel not open
  • All registers not mentioned above are unused and preserved.
  • The number of bytes in D2.W is set from the address in A1.L to the address D1.W bytes from the start of the console linkage block.
  • If D2.W is set to zero, no bytes are sent but the address of the linkage block is still returned in A1.L. This provides a way of accessing the linkage block without altering it.

The example shows how to access the linkage block's address.

con    dc.w   3
       dc.b   'con'

get_ad lea    con,a0       ; To open a window
       moveq  #0,d3
       moveq  #-1,d1       ; This job
       moveq  #io_open,d0
       trap   #2           ; Open the channel
       moveq  #0,d2        ; Send no bytes
       moveq  #$6F         ; IOP.SLNK
       trap   #3           ; sets the address in A1
       moveq  #io_close,d0
       trap   #2           ; close the channel
                           ; The linkage address is now in A1 
  • qdosmsq/pe/slnk.txt
  • Last modified: 2011/02/21 15:36
  • by george.gwilt