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. |
ERR_NC | Not complete (usually means some jobs have been EXEC'd.) |
ERR_OM | Out of memory |
on exit.
The following shows the use of this call.
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. : :