qdosmsq:traps:trap_1:arpa

Differences

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

Link to this comparison view

qdosmsq:traps:trap_1:arpa [2009/01/30 11:53] (current)
norman created
Line 1: Line 1:
 +====== MT_ALRES/SMS_ARPA ======
 +This trap allocates space in the resident procedures area.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$0E|D0.L|Corrupted?|
 +|D1.L|Number of bytes required.|D1.L|Corrupted.|
 +|D2.L|Unused. |D2.L| Corrupted.|
 +|D3.L|Unused. |D3.L| Corrupted.|
 +|A0.L|Unused. |A0.L| Base address of allocated memory.|
 +|A1.L|Unused. |A1.L| Corrupted.|
 +|A2.L|Unused. |A2.L| Corrupted.|
 +|A3.L|Unused. |A3.L| Corrupted.|
 +
 +===== Errors =====
 +|ERR_NC|Not complete (usually means some jobs have been EXEC'd.)|
 +|ERR_OM|Out of memory|
 +
 +===== Notes =====
 +
 +  * All registers not shown above are not used on entry and are preserved
 +on exit.
 +
 +  * This trap is how the SuperBasic function RESPR works. It allocates space in the resident procedures area, but only if there are no jobs running.
 +
 +===== Example =====
 +The following shows the use of this call.
 +<code>
 +        moveq   #mt_alres,d0      ; Trap code
 +        move.l  #1024,d1          ; 1 Kbyte required in resident procedure space
 +        trap    #1                ; Allocate the space
 +        tst.l   D0                ; Did it work ?
 +        bne.s   oops              ; No, handle errors
 +                                  ; All ok, use tha space allocated from (A0) onwards.
 +        :
 +        :
 +</code>
 +
 +
  
  • qdosmsq/traps/trap_1/arpa.txt
  • Last modified: 2009/01/30 11:53
  • by norman