This trap allocates an area in the common heap.

Call ParametersReturn Parameters
D0.B$18D0.LError return
D1.LNumber of bytes needed D1.LNumber of bytes allocated
D2.LJob owner D2.LUndefined
D3.L0 or "ACSI"D3.LUndefined
A0 A0Base address of area
ERR_IMEMOut of memory
ERR_IJOBJob does not exist
  • 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.
        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.
  • qdosmsq/traps/trap_1/achp.txt
  • Last modified: 2009/01/05 11:02
  • by norman