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

Link to this comparison view

qdosmsq:traps:trap_1:xtop [2009/01/19 14:38] (current)
george.gwilt created
Line 1: Line 1:
 +====== -/SMS_XTOP ======
 +This trap performs an external operation.
 +^Call Parameters^^Return Parameters^^
 +===== Errors =====
 +No errors are returned by this trap.
 +===== Notes =====
 +  *No registers are used.
 +  *The code following Trap #1 is executed as if it were part of a system call. At entry the registers are changed so that A6 points to the system variables and A5 points to the stack frame which contains D7.L and the previous values of A5 and A6. The code is executed in supervisor mode and must end with RTS, at which point a return is made to the address on the stack.
 +===== Example =====
 +The example below shows the use of this trap call to obtain the value of PROGD$.
 +It is assumed that A6 points to the dataspace and that progd is the offset of the long word to hold the value of PROGD$.
 +info    moveq   #$25,d0         ; SMS_XTOP
 +        trap    #1              ; Set registers and go to supervisor mode
 +        bsr     get_progd       ; "later" is put on the stack     
 +later   ...                     ; Program continues in user mode
 +        move.l  sv_prog(a6),8+progd(a5)
 +        rts                     ; Registers are restored and return to "later"
  • qdosmsq/traps/trap_1/xtop.txt
  • Last modified: 2009/01/19 14:38
  • by george.gwilt