From eb076459e9bf9a621c5fd46ffa7076331512255b Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Sat, 28 Dec 2019 18:48:15 -0800 Subject: [PATCH] Fix all remaining NOJIT issues (defentry size discrepancy) --- src/tftpbld | 2 +- src/vmsrc/apple/plvm03.s | 50 +++-------------------------------- src/vmsrc/apple/soscmd.pla | 16 +---------- src/vmsrc/apple/sossys.pla | 8 +++--- src/vmsrc/apple/sossysjit.pla | 4 +-- 5 files changed, 11 insertions(+), 69 deletions(-) diff --git a/src/tftpbld b/src/tftpbld index 9a53911..5d40e6c 100755 --- a/src/tftpbld +++ b/src/tftpbld @@ -47,7 +47,7 @@ echo "BLD/SAMPLES/HGRTEST.PLA"; atftp $1 --put -l samplesrc/hgrtest.pla -r $ echo "BLD/SAMPLES/PLAYSEQ.PLA"; atftp $1 --put -l samplesrc/playseq.pla -r $2/BLD/SAMPLES/PLAYSEQ.PLA#040000 echo "BLD/SAMPLES/RPNCALC.PLA"; atftp $1 --put -l samplesrc/rpncalc.pla -r $2/BLD/SAMPLES/RPNCALC.PLA#040000 echo "BLD/SAMPLES/SIEVE.PLA"; atftp $1 --put -l samplesrc/sieve.pla -r $2/BLD/SAMPLES/SIEVE.PLA#040000 -echo "BLD/SAMPLES/MON.PLA"; atftp $1 --put -l utilsrc/mon.pla -r $2/BLD/SAMPLES/MON.PLA#040000 +echo "BLD/SAMPLES/MON.PLA"; atftp $1 --put -l utilsrc/apple/mon.pla -r $2/BLD/SAMPLES/MON.PLA#040000 echo "BLD/SAMPLES/MEMTEST.PLA"; atftp $1 --put -l samplesrc/memtest.pla -r $2/BLD/SAMPLES/MEMTEST.PLA#040000 echo "BLD/SAMPLES/FATCAT.PLA"; atftp $1 --put -l samplesrc/fatcat.pla -r $2/BLD/SAMPLES/FATCAT.PLA#040000 echo "BLD/SAMPLES/GFXDEMO.PLA"; atftp $1 --put -l samplesrc/gfxdemo.pla -r $2/BLD/SAMPLES/GFXDEMO.PLA#040000 diff --git a/src/vmsrc/apple/plvm03.s b/src/vmsrc/apple/plvm03.s index 90b9f95..1c4c874 100755 --- a/src/vmsrc/apple/plvm03.s +++ b/src/vmsrc/apple/plvm03.s @@ -134,7 +134,6 @@ JITCOMP !WORD 0 ; $A0F2 JITCODE !WORD 0 ; $A0F4 SENTRY !WORD INTERP ; $A0F6 XENTRY !WORD XINTERP ; $A0F8 -JENTRY !WORD JITINTRP ; $A0FA ;* ;* OPCODE TABLE ;* @@ -156,11 +155,11 @@ OPTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02 ;* SYSTEM INTERPRETER ENTRYPOINT ;* INTERP PLA - CLC - ADC #$01 + CLC + ADC #$01 STA IPL PLA - ADC #$00 + ADC #$00 STA IPH LDY #$00 STY IPX @@ -184,49 +183,6 @@ XINTERP PLA DEY JMP FETCHOP ;* -;* JIT PROFILING ENTRY INTO INTERPRETER -;* -JITINTRP PLA - STA TMPL - PLA - STA TMPH - LDY #$04 - LDA (TMP),Y ; DEC JIT COUNT - SEC - SBC #$01 - STA (TMP),Y - BNE - ; INTERP BYTECODE - LDA JITCOMP ; CALL JIT COMPILER - STA SRCL - LDA JITCOMP+1 - STA SRCH - INY ; LDY #$05 - LDA (SRC),Y - STA IPX - DEY - LDA (SRC),Y - STA IPH - DEY - LDA (SRC),Y - STA IPL - DEX ; ADD PARAMETER TO DEF ENTRY - LDA TMPL - SEC - SBC #$02 ; POINT TO DEF ENTRY - PHA ; AND SAVE IT FOR LATER - STA ESTKL,X - LDA TMPH - SBC #$00 - PHA - STA ESTKH,X - LDY #$00 - JSR FETCHOP ; CALL JIT COMPILER - PLA - STA TMPH - PLA - STA TMPL - JMP (TMP) ; RE-CALL ORIGINAL DEF ENTRY -;* ;* INTERNAL DIVIDE ALGORITHM ;* _NEG LDA #$00 diff --git a/src/vmsrc/apple/soscmd.pla b/src/vmsrc/apple/soscmd.pla index 12ce01e..f433a5d 100755 --- a/src/vmsrc/apple/soscmd.pla +++ b/src/vmsrc/apple/soscmd.pla @@ -3,18 +3,6 @@ include "inc/cmdsys.plh" // Private addresses // const cmdparser = $A0F0 -const sinterp = $A0F6 -const xinterp = $A0F8 -const estkh8 = $C000 -const estkh = $00C0 -const estkl8 = $D000 -const estkl = $00D0 -const ifpl8 = $E000 -const ifph8 = $E100 -const jmptmp = $00E6 -const tmpl8 = $E700 -const tmph8 = $E800 -word directentry, indirectentry // // SOS routines // FILE I/O @@ -253,7 +241,5 @@ end // // Save pointer to command line handler // -*cmdparser = @shell -directentry = *sinterp -indirectentry = *xinterp +*cmdparser = @shell done diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index 12e199c..30b0bf2 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -691,7 +691,7 @@ asm lookupdef(addr, deftbl)#1 LDA SRCH STA ESTKH,X RTS -+ LDA #$08 ; T_DEFENTRY ++ LDA #$06 ; T_DEFENTRY CLC ADC SRCL STA SRCL @@ -1028,7 +1028,7 @@ def adddef(ext, addr, deflast)#1 return defentry end def loadmod(mod)#1 - word refnum[], rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup + word refnum, rdlen, modsize, bytecode, codefix, defofst, defcnt, init, initcode[], fixup word addr, defaddr, modaddr, modfix, modofst, modend word deftbl, deflast, codeseg word moddep, rld, esd, sym @@ -1269,8 +1269,8 @@ prstr("MEM:$"); prword(availheap); crout // Exec command line parser // loadmod(@soscmd) -modid = 0 -autorun = open("AUTORUN") +modid = 0 +autorun = open("AUTORUN") if autorun > 0 cmdln = read(autorun, @cmdln.1, 64) close(autorun) diff --git a/src/vmsrc/apple/sossysjit.pla b/src/vmsrc/apple/sossysjit.pla index 2e91d8d..58d10c9 100755 --- a/src/vmsrc/apple/sossysjit.pla +++ b/src/vmsrc/apple/sossysjit.pla @@ -1292,8 +1292,8 @@ prstr("MEM:$"); prword(availheap); crout // Exec command line parser // loadmod(@soscmd) -modid = 0 -autorun = open("AUTORUN") +modid = 0 +autorun = open("AUTORUN") if autorun > 0 cmdln = read(autorun, @cmdln.1, 64) close(autorun)