From fdee5810c635b1ae51879b71916d4edd21ea378d Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sun, 21 Dec 2014 16:47:32 -0800 Subject: [PATCH] Bump the version. Init VM from PLASMA.SYSTEM. --- src/toolsrc/sb.pla | 13 ++++++++++++- src/vmsrc/a1cmd.pla | 2 +- src/vmsrc/cmd.pla | 2 +- src/vmsrc/plvm02.s | 26 +++++++++++++++++--------- src/vmsrc/soscmd.pla | 4 ++-- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/toolsrc/sb.pla b/src/toolsrc/sb.pla index a767c9c..a0af425 100644 --- a/src/toolsrc/sb.pla +++ b/src/toolsrc/sb.pla @@ -91,7 +91,7 @@ word = $0450,$04D0,$0550,$05D0,$0650,$06D0,$0750,$07D0 // Editor variables // byte nullstr = "" -byte version = "PLASMA ][ SANDBOX VERSION 00.10 " +byte version = "PLASMA ][ SANDBOX VERSION 00.11 " byte errorstr = "ERROR: $" byte okstr = "OK" byte outofmem = "OUT OF MEMORY!" @@ -3944,6 +3944,17 @@ def parse_module return FALSE end // +// Close all files +// +^$BFD8 = 0 +close(0) +// +// Set memory bitmap +// +memset($BF58, 24, 0) +^$BF58 = $CF +^$BF6F = $01 +// // Init editor // if !(^machid & $80) diff --git a/src/vmsrc/a1cmd.pla b/src/vmsrc/a1cmd.pla index 7ee1e47..4a3b3e0 100644 --- a/src/vmsrc/a1cmd.pla +++ b/src/vmsrc/a1cmd.pla @@ -39,7 +39,7 @@ predef loadmod, execmod, lookupstrmod // // System variables. // -word version = $0010 // 00.10 +word version = $0011 // 00.1 word systemflags = 0 word heap word symtbl, lastsym diff --git a/src/vmsrc/cmd.pla b/src/vmsrc/cmd.pla index 5593b24..c542592 100644 --- a/src/vmsrc/cmd.pla +++ b/src/vmsrc/cmd.pla @@ -33,7 +33,7 @@ predef loadmod, execmod, lookupstrmod // // System variable. // -word version = $0010 // 00.10 +word version = $0011 // 00.11 word systemflags = 0 word heap word xheap = $0800 diff --git a/src/vmsrc/plvm02.s b/src/vmsrc/plvm02.s index 68606a6..fc5f0a1 100644 --- a/src/vmsrc/plvm02.s +++ b/src/vmsrc/plvm02.s @@ -288,18 +288,27 @@ CMDENTRY = * !BYTE $CC !WORD CLOSEPARMS BNE FAIL +; +; INIT VM ENVIRONMENT STACK POINTERS +; +; LDA #$00 ; INIT FRAME POINTER + STA IFPL + LDA #$BF + STA IFPH + LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) + TXS + LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX JMP $2000 ; JUMP TO LOADED SYSTEM COMMAND ; ; PRINT FAIL MESSAGE, WAIT FOR KEYPRESS, AND REBOOT ; FAIL INC $3F4 ; INVALIDATE POWER-UP BYTE - LDY #$01 + LDY #33 - LDA FAILMSG,Y ORA #$80 JSR $FDED - INY - CPY FAILMSG - BNE - + DEY + BPL - JSR $FD0C ; WAIT FOR KEYPRESS JMP ($FFFC) ; RESET OPENPARMS !BYTE 3 @@ -309,13 +318,12 @@ REFNUM !BYTE 0 READPARMS !BYTE 4 !BYTE 0 !WORD $2000 - !WORD $1100 + !WORD $9F00 !WORD 0 CLOSEPARMS !BYTE 1 !BYTE 0 DISABLE80 !BYTE 21, 13, '1', 26, 13 -FAILMSG !BYTE 39 - !TEXT "MISSING CMD. PRESS ANY KEY TO RESET..." +FAILMSG !TEXT "...TESER OT YEK YNA .DMC GNISSIM" PAGE0 = * ;****************************** ;* * @@ -344,10 +352,10 @@ PAGE3 = * BIT LCRDEN+LCBNK2 ; $03DC - INDIRECT INTERPX ENTRY JMP IINTRPX } -DEFCMD !FILL 30 +DEFCMD !FILL 28 ENDBYE = * } -LCDEFCMD = *-30 ; DEFCMD IN LC MEMORY +LCDEFCMD = *-28 ; DEFCMD IN LC MEMORY ;***************** ;* * ;* OPXCODE TABLE * diff --git a/src/vmsrc/soscmd.pla b/src/vmsrc/soscmd.pla index 6657701..ac3a3ca 100644 --- a/src/vmsrc/soscmd.pla +++ b/src/vmsrc/soscmd.pla @@ -34,7 +34,7 @@ predef loadmod, execmod, lookupstrmod // // System variables. // -word version = $0010 // 00.10 +word version = $0011 // 00.11 word systemflags = 0 byte refcons = 0 byte devcons = 0 @@ -63,7 +63,7 @@ byte machid = $F2 // Apple ///, 80 columns // // Command line pointer // -word cmdptr = @autorun +word cmdptr // // Standard Library exported functions. //