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 |
D3.W | Timeout | D3.L | Preserved |
A0.L | Window channel ID | A0.L | Preserved |
A1.L | Pointer to data to set | A1.L | Address of linkage block |
ERR_NO | Channel not open |
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