diff --git a/PLASMA-SYS2.PO b/PLASMA-SYS2.PO index ae8b2cb..56f6718 100755 Binary files a/PLASMA-SYS2.PO and b/PLASMA-SYS2.PO differ diff --git a/src/vmsrc/apple/cmd.pla b/src/vmsrc/apple/cmd.pla index 78fb73b..5427928 100755 --- a/src/vmsrc/apple/cmd.pla +++ b/src/vmsrc/apple/cmd.pla @@ -43,8 +43,8 @@ word syspath word syscmdln word = @execmod, @open, @close, @read, @write byte perr -byte jitcount = $10 -byte jitsize = $FF +byte jitcount = 0 +byte jitsize = 0 // // Working input buffer overlayed with strings table // @@ -1369,8 +1369,8 @@ syscmdln = @cmdln // Try to load autorun. // autorun = open(@autorun) -if autorun > 0 - cmdln = read(autorun, @autorun, 128) +if autorun + ^getlnbuf = read(autorun, getlnbuf + 1, 128) close(0) else // @@ -1381,6 +1381,7 @@ fin perr = 0 while 1 if ^getlnbuf + strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) is 'Q' reboot() @@ -1406,27 +1407,26 @@ while 1 execsys(getlnbuf) break is '+' - saveX + //saveX execmod(striptrail(getlnbuf)) // // Clean up // - restoreX + //restoreX resetmemfiles break otherwise - cout('?') + cout(perr)//cout('?') wend if perr prstr("ERR:$") prbyte(perr) - perr = 0 else prstr("OK") fin crout() fin prstr(pfxop(@prefix, GET_PFX)) - strcpy(@cmdln, rdstr($BA)) + rdstr($BA) loop done diff --git a/src/vmsrc/apple/cmdjit.pla b/src/vmsrc/apple/cmdjit.pla index ee5f38b..f20c876 100755 --- a/src/vmsrc/apple/cmdjit.pla +++ b/src/vmsrc/apple/cmdjit.pla @@ -1027,7 +1027,7 @@ def adddef(isfirst, addr, deflast)#1 if not isfirst preventry = defentry - t_defentry defsize = addr - preventry=>bytecodeaddr - if defsize <= jitsize // and *jitcomp + if defsize <= jitsize preventry=>interpaddr = $03D6 // JSR $03D6 (JIT INTERP) preventry->callcount = jitcount // Set JIT countdown preventry->bytecodesize = defsize // Set size @@ -1036,8 +1036,7 @@ def adddef(isfirst, addr, deflast)#1 defentry->interpjsr = $20 defentry=>interpaddr = $03DC // JSR $03DC (BYTECODE INTERP) defentry=>bytecodeaddr = addr - //defentry=>5 = 0 // Clear count and size - defentry->t_defentry = 0 // NULL out next entry + defentry->t_defentry = 0 // NULL out next entry return defentry end def loadmod(mod)#1 @@ -1438,8 +1437,8 @@ xheaptop = $A000 // Top where JIT loaded // Try to load autorun. // autorun = open(@autorun) -if autorun > 0 - cmdln = read(autorun, @autorun, 128) +if autorun + ^getlnbuf = read(autorun, getlnbuf + 1, 128) close(0) else // @@ -1450,6 +1449,7 @@ fin perr = 0 while 1 if ^getlnbuf + strcpy(@cmdln, getlnbuf) when toupper(parsecmd(getlnbuf)) is 'Q' reboot() @@ -1489,13 +1489,12 @@ while 1 if perr prstr("ERR:$") prbyte(perr) - perr = 0 else prstr("OK") fin crout() fin prstr(pfxop(@prefix, GET_PFX)) - strcpy(@cmdln, rdstr($BA)) + rdstr($BA) loop done diff --git a/src/vmsrc/apple/cmdjitstub.s b/src/vmsrc/apple/cmdjitstub.s index 483d4bb..ba4e9af 100644 --- a/src/vmsrc/apple/cmdjitstub.s +++ b/src/vmsrc/apple/cmdjitstub.s @@ -34,6 +34,7 @@ JITCODE = $03E4 ; ; INIT VM ENVIRONMENT STACK POINTERS ; + STY $01FF STY PPL STY IFPL ; INIT FRAME POINTER = $AF00 (4K FOR JIT CODE) STY JITCODE diff --git a/src/vmsrc/apple/cmdstub.s b/src/vmsrc/apple/cmdstub.s index ff00909..54527d4 100644 --- a/src/vmsrc/apple/cmdstub.s +++ b/src/vmsrc/apple/cmdstub.s @@ -32,10 +32,9 @@ LCBNK1 = $08 ; ; INIT VM ENVIRONMENT STACK POINTERS ; - STY PPL + STY $01FF STY IFPL ; INIT FRAME POINTER = $BF00 LDA #$BF - STA PPH STA IFPH LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) TXS diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s index e5a0b2a..ca10863 100755 --- a/src/vmsrc/apple/plvm02.s +++ b/src/vmsrc/apple/plvm02.s @@ -29,8 +29,7 @@ LCRWEN = $C083 LCBNK2 = $00 LCBNK1 = $08 !SOURCE "vmsrc/plvmzp.inc" -PSR = TMP+2 -DVSIGN = PSR+1 +DVSIGN = TMP+3 DROP = $EF NEXTOP = $F0 FETCHOP = NEXTOP+1 @@ -245,19 +244,6 @@ CMDENTRY = * !WORD CLOSEPARMS BNE FAIL ; -; INIT VM ENVIRONMENT STACK POINTERS -; -; LDA #$00 - STA $01FF ; CLEAR CMDLINE BUFF - STA PPL ; INIT FRAME POINTER - STA IFPL - LDA #$BF ; FRAME POINTER AT $BF00, BELOW PRODOS - STA PPH - STA IFPH - LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) - TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX -; ; CHANGE CMD STRING TO SYSPATH STRING ; LDA STRBUF @@ -317,6 +303,7 @@ DEFCMD = * ;!FILL 28 ENDBYE = * } LCDEFCMD = * ;*-28 ; DEFCMD IN LC MEMORY + !ALIGN 255,0 ;* ;* ADD TOS TO TOS-1 ;* diff --git a/src/vmsrc/apple/plvmjit02.s b/src/vmsrc/apple/plvmjit02.s index b9f516b..136bc07 100755 --- a/src/vmsrc/apple/plvmjit02.s +++ b/src/vmsrc/apple/plvmjit02.s @@ -329,19 +329,6 @@ CMDENTRY = * !WORD CLOSEPARMS BNE FAIL ; -; INIT VM ENVIRONMENT STACK POINTERS -; -; LDA #$00 - STA $01FF ; CLEAR CMDLINE BUFF - STA PPL ; INIT FRAME POINTER - STA IFPL - LDA #$AF ; FRAME POINTER AT $AF00, BELOW JIT BUFFER - STA PPH - STA IFPH - LDX #$FE ; INIT STACK POINTER (YES, $FE. SEE GETS) - TXS - LDX #ESTKSZ/2 ; INIT EVAL STACK INDEX -; ; CHANGE CMD STRING TO SYSPATH STRING ; LDA STRBUF