Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleRST 20H, DEFB $4E
IN:
     A = memory mask arguments (several arguments OR'ed together):

          Destination segment (allocated memory addressed for segment):
          MM_S0 ($00), segment 0
          MM_S1 ($40), segment 1
          MM_S2 ($80), segment 2
          MM_S3 ($C0), segment 3

          Source of memory (to be allocated):
          MM_FIX ($02), fixed workspace (not subject to swapping)
          or
          MM_SLT ($04), explicit slot usage,
mask also following:                MC_CIMM_EXC ($10), internalexclusive memoryuse of bank
             MC_C1MM_MUL ($01$20), carduse 1multiple banks

     B = 0, always
    MC_C2 ($02), card 2
               MC_C3 ($03), card 3

          Allocation variations: C = bank or slot number if MM_SLT = 1 and MM_MUL = 0
		  MC_AS ($00), find an exclusive bank in any slot
             MM_EXCMC_CI ($10), exclusiveinternal usememory
of bank           MMMC_MULC1 ($20$01), card use1
 multiple banks       B = 0, alwaysMC_C2 ($02), card 2
       C = If MMMC_SLT is specified, C holds bank numberC3 ($03), card 3
		  or ($20-$ff), or slot (0-3) - otherwise 0explicit bank

OUT, if call successful:
     Fc = 0
     IX = memory pool handle
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_NA ($06), handle not available
          RC_ROOM ($07), no room

Registers changed after return:
     A.FBCDEHL/..IY same
     .F......./IX.. different 

...