From d0215eb7e158d966f6b6e678a195d48dd6bb5412 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Mon, 2 Apr 2018 12:36:44 -0700 Subject: [PATCH] Allocate proper size for defentries --- src/vmsrc/apple/plvm03.s | 10 ++++++++-- src/vmsrc/apple/soscmd.pla | 2 +- src/vmsrc/apple/sossys.pla | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/vmsrc/apple/plvm03.s b/src/vmsrc/apple/plvm03.s index 144e399..1363f81 100755 --- a/src/vmsrc/apple/plvm03.s +++ b/src/vmsrc/apple/plvm03.s @@ -192,7 +192,7 @@ JITINTRP PLA PLA SBC #$00 STA TMPH - LDY #$05 + LDY #$06 LDA (TMP),Y ; DEC JIT COUNT SEC SBC #$01 @@ -200,6 +200,9 @@ JITINTRP PLA BEQ RUNJIT DEY ; INTERP BYTECODE AS USUAL LDA (TMP),Y + STA IPX + DEY + LDA (TMP),Y STA IPH DEY LDA (TMP),Y @@ -210,7 +213,10 @@ RUNJIT LDA JITCOMP STA SRCL LDA JITCOMP+1 STA SRCH - DEY ; LDY #$04 + DEY ; LDY #$05 + LDA (SRC),Y + STA IPX + DEY LDA (SRC),Y STA IPH DEY diff --git a/src/vmsrc/apple/soscmd.pla b/src/vmsrc/apple/soscmd.pla index 7f445ed..14827bb 100755 --- a/src/vmsrc/apple/soscmd.pla +++ b/src/vmsrc/apple/soscmd.pla @@ -316,5 +316,5 @@ cmdsys:cmdparser = @shell interpentry = compiler:interpaddr *jitcomp = @compiler cmdsys.jitcount = 44 -cmdsys.jitsize = 96 +//cmdsys.jitsize = 96 done diff --git a/src/vmsrc/apple/sossys.pla b/src/vmsrc/apple/sossys.pla index 3ead0ed..03739ec 100755 --- a/src/vmsrc/apple/sossys.pla +++ b/src/vmsrc/apple/sossys.pla @@ -457,7 +457,7 @@ end // // Addresses of internal routines. // -asm interp()#1 +asm xinterp()#1 DEX LDA #interpjsr = $20 - defentry=>interpaddr = interp + defentry=>interpaddr = xinterp defentry=>bytecodeaddr = addr defentry->bytecodexbyte = ext defentry->t_defentry = 0 @@ -1120,7 +1120,7 @@ def loadmod(mod)#1 // // Init def table. // - deftbl = allocheap(defcnt * 6 + 1) + deftbl = allocheap(defcnt * t_defentry + 1) deflast = deftbl ^deflast = 0 if !refnum