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

Link to this comparison view

qdosmsq:pe:slnk [2011/02/21 15:36] (current)
george.gwilt created
Line 1: Line 1:
 +====== IOP.SLNK ======
 +This trap accesses the console linkage block and sets bytes in it.
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$6F|D0.L|Error return|
 +|D1.W|Position in linkage to set|D1.L|Preserved|
 +|D2.W|Number of bytes to set|D2.L|Preserved|
 +|A0.L|Window channel ID|A0.L|Preserved|
 +|A1.L|Pointer to data to set|A1.L|Address of linkage block|
 +==== Error ====
 +|ERR_NO|Channel not open|
 +==== Notes ====
 +  * 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.
 +==== Example ====
 +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   #          ; Open the channel
 +       moveq  #0,d2        ; Send no bytes
 +       moveq  #$6F         ; IOP.SLNK
 +       trap   #          ; sets the address in A1
 +       moveq  #io_close,d0
 +       trap   #          ; close the channel
 +                           ; The linkage address is now in A1 
  • qdosmsq/pe/slnk.txt
  • Last modified: 2011/02/21 15:36
  • by george.gwilt