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

Link to this comparison view

Both sides previous revision Previous revision
qdosmsq:traps:trap_1:lexi [2009/02/27 10:57]
george.gwilt Example added
qdosmsq:traps:trap_1:lexi [2010/02/07 13:46] (current)
george.gwilt Correct spelling of "Tghis"
Line 1: Line 1:
 +====== MT_LXINT/SMS_LEXI . .  =======
 +These traps link and unlink routines to and from lists. The full set is given in the following tables.
 +=== Link Traps ===
 +|$1A|MT_LXINT/SMS_LEXI|External interrupt|
 +|$1C|MT_LPOLL/SMS_LPOL|Polling 50/60Hz|
 +|$20|MT_LIOD/SMS_LIOD|IO device driver|
 +|$22|MT_LDD/SMS_LFSD|Directory device driver|
 +=== Unlink Traps ===
 +|$1B|MT_RXINT/SMS_REXI|External interrupt|
 +|$1D|MT_RPOLL/SMS_RPOL|Polling 50/60Hz|
 +|$21|MT_RIOD/SMS_RIOD|IO device driver|
 +|$23|MT_RDD/SMS_RFSD|Directory device driver|
 +=== Parameters ===
 +^Call Parameters^^Return Parameters^^
 +|D0.B|See above|D0.L|Corrupted?|
 +|A0.L|Address of link |A0.L|Preserved.|
 +===== Errors =====
 +No errors are returned by these traps.
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * A0.L points to an area whose nature depends on the type of list.
 +    * For external interrupt, polling and the scheduler, A0 points to two long words. The first is for the link and the second points to the linked routine.
 +    * For the device drivers A0 points to at least four long words. The first is the link pointer. The second, third and fourth are pointers to input/output, open and close routines. The directory device driver needs at least 40 bytes.
 +  * The routines for the external interrupt, polling and scheduler lists can assume that, on entry A6.L points to the systam variables. This address should not be changed by the routine. 
 +===== Example =====
 +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
  • qdosmsq/traps/trap_1/lexi.txt
  • Last modified: 2010/02/07 13:46
  • by george.gwilt