0 Zero Page Usage (Apple IIe 64K )
Ian Flanigan edited this page 2018-06-10 14:55:33 +02:00
Location Use
$00 - $05 unused by Plasma
$06 - $07 SRC - Temporarily used in the memcpy routine as the source address. (In PLASMA for the Apple I, this is called freemem and is used during initialization to pass the start of the heap to the command interpreter.)
$07 - $08 DST - Temporarily used in the memcpy routine as the destination address.
$09 - $BD unused by PLASMA
$BE - $BF ESGUARD - Stack guard? Seems to be unused directly.
$C0 - $CF ESTKL Evaluation stack low byte; together with ESTKH, forms a 16-bit wide stack indexed by the X register
$D0 - $DF ESTKH Evaluation stack high byte
$E0 VMZP - ?? I think this is supposed to mark the start of the zero page locations used by the VM, but it's unclear since many addresses before are also used.
$E0 - E1 IFP - Interpreter frame pointer (initialized to #$8000 on the Apple I, not sure on Apple ][.)
$E2 - E3 PP - Param pointer
$E4 IPY - Instruction pointer offset (Y register) temporary storage
$E5 ESP - Stack pointer (X register) temporary storage
$E6 JMPTMP - Always #$4C, a JMP instruction, allowing JSR JMPTMP to dispatch to the location in TMP, usually as a subroutine.
$E7 - $E8 TMP - A 16-bit temporary register.
$E9 DVSIGN (Apple I) - Sign of dividend after division
$EA DVSIGN (Apple ][ 64K) - Sign of dividend after division
$EF - FF PAGE0 - Interpreter bytecode inner loop. The following locations are part of the loop.
$EF DROP - Drops one frame of the evaluation stack, then interprets the next opcode.
$F0 NEXTOP - Interprets the next opcode.
$F1 FETCHOP - Fetch the current opcode.
$F2 - $F3 IP - Instruction pointer for PLASMA interpreter
$F4 - $F6 part of zero page routine
$F7 OPIDX - location of the lower byte of the address in JMP (OPTBL), used to dispatch into the interpreter
$F8 OPPAGE - location of the high byte of the address in JMP (OPTBL).
$F9 - $FF part of the zero page routine, but currently unused