mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-09 13:33:26 +00:00
Fix all remaining NOJIT issues (defentry size discrepancy)
This commit is contained in:
parent
f5b0fb86b4
commit
eb076459e9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user