These traps link and unlink routines to and from lists. The full set is given in the following tables.
D0.B | Mnemonic | List |
---|---|---|
$1A | MT_LXINT/SMS_LEXI | External interrupt |
$1C | MT_LPOLL/SMS_LPOL | Polling 50/60Hz |
$1E | MT_LSCHD/SMS_LSHD | Scheduler |
$20 | MT_LIOD/SMS_LIOD | IO device driver |
$22 | MT_LDD/SMS_LFSD | Directory device driver |
D0.B | Mnemonic | List |
---|---|---|
$1B | MT_RXINT/SMS_REXI | External interrupt |
$1D | MT_RPOLL/SMS_RPOL | Polling 50/60Hz |
$1F | MT_RSCHD/SMS_RSHD | Scheduler |
$21 | MT_RIOD/SMS_RIOD | IO device driver |
$23 | MT_RDD/SMS_RFSD | Directory device driver |
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | See above | D0.L | Corrupted? |
A0.L | Address of link | A0.L | Preserved. |
A1.L | Unused | A1.L | Corrupted. |
No errors are returned by these traps.
The example shows a timer being set in system variables. This is linked to the polling list.
lnk ds.l 2 ; Space for link. rout addq.l #1,$DC(a6) ; Add one to the timer in system variables. rts ; The routine must end with RTS. link lea lnk,a0 ; Address of link. lea rout,a1 ; Address of routine. move.l a1,4(a0) ; Set the pointer in the linkage block. moveq #MT_LPOLL,d0 ; To link in the routine. trap #1