qdosmsq:traps:trap_1:achp

Differences

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

Link to this comparison view

qdosmsq:traps:trap_1:achp [2008/12/02 11:40]
george.gwilt created
qdosmsq:traps:trap_1:achp [2009/01/05 11:02] (current)
norman Minor spelling correction.
Line 1: Line 1:
 +====== MT_ALCHP/SMS_ACHP ======
 +This trap allocates an area in the common heap.
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$18|D0.L|Error return|
 +|D1.L|Number of bytes needed |D1.L|Number of bytes allocated|
 +|D2.L|Job owner |D2.L|Undefined|
 +|D3.L|0 or "ACSI"|D3.L|Undefined|
 +| A0 |  |A0|Base address of area|
 +
 +
 +===== Errors =====
 +
 +
 +|ERR_IMEM|Out of memory|
 +|ERR_IJOB|Job does not exist|
 +
 +
 +===== Notes =====
 +  * All registers are used except D4-7 and A4-7.
 +  * The value in D3 is only used for ATARI TT (or similar machines with ST RAM and Fast RAM). If D3 = "ACSI" memory is allocated in ST compatible RAM and not in Fast RAM. This requires SMSQ.
 +===== Example =====
 +
 +<code>
 +        moveq   #18,d0          ; MT_ALCHP
 +        move.l  #$400,d1        ; Number of bytes needed
 +        moveq   #-1,d2          ; This job
 +        trap    #1              ; Allocate the area
 +        tst.l   d0              ; OK? . .
 +        bne     oops ---->      ; , , no!
 +        ...                     ; Do something here.
 +</code>
 +
  
  • qdosmsq/traps/trap_1/achp.txt
  • Last modified: 2009/01/05 11:02
  • by norman