mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-08-12 04:25:07 +00:00
Fix CS destination jump
This commit is contained in:
@@ -90,7 +90,7 @@ def compiler(defptr)#0
|
|||||||
// Multi-byte operands
|
// Multi-byte operands
|
||||||
//
|
//
|
||||||
is $2E // CS
|
is $2E // CS
|
||||||
i = i + ^(bytecode+i+1) + 1
|
i = i + ^(bytecode+i+1)// + 1
|
||||||
break
|
break
|
||||||
//
|
//
|
||||||
// Double byte operands
|
// Double byte operands
|
||||||
@@ -393,9 +393,9 @@ def compiler(defptr)#0
|
|||||||
is $2E // CS
|
is $2E // CS
|
||||||
i++
|
i++
|
||||||
j = ^(bytecode+i)
|
j = ^(bytecode+i)
|
||||||
dest = i + j + 1
|
dest = codeptr + 10 + j
|
||||||
//puts("CS "); //puts(bytecode+i); //puts("-->"); puti(dest)
|
//puts("CS "); //puts(bytecode+i); //puts("-->"); puti(dest)
|
||||||
if isule(codeptr + 10 + j, codemax)
|
if isule(dest, codemax)
|
||||||
if A_IS_TOSL & TOSL_DIRTY
|
if A_IS_TOSL & TOSL_DIRTY
|
||||||
*codeptr = $D095+(VX<<8) // STA ESTKL,X
|
*codeptr = $D095+(VX<<8) // STA ESTKL,X
|
||||||
codeptr = codeptr + 2
|
codeptr = codeptr + 2
|
||||||
@@ -405,14 +405,12 @@ def compiler(defptr)#0
|
|||||||
codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X
|
codeptr=>2 = $C095+(VX<<8) // STA ESTKH,X
|
||||||
codeptr=>4 = $A9+((codeptr+9)<<8) // LDA #<STRING
|
codeptr=>4 = $A9+((codeptr+9)<<8) // LDA #<STRING
|
||||||
codeptr->6 = $4C // JMP abs
|
codeptr->6 = $4C // JMP abs
|
||||||
codeptr=>7 = addrxlate=>[dest]
|
dest = codeptr + 10 + j
|
||||||
if not (codeptr->8 & $80) // Unresolved address list
|
codeptr=>7 = dest
|
||||||
addrxlate=>[dest] = codeptr + 7 - *jitcodeptr
|
|
||||||
fin
|
|
||||||
strcpy(codeptr + 9, bytecode + i)
|
strcpy(codeptr + 9, bytecode + i)
|
||||||
i = i + j
|
i = i + j
|
||||||
fin
|
fin
|
||||||
codeptr = codeptr + 10 + j
|
codeptr = dest
|
||||||
A_IS_TOSL = TOSL_DIRTY // STA ESTKL,X
|
A_IS_TOSL = TOSL_DIRTY // STA ESTKL,X
|
||||||
break
|
break
|
||||||
is $32 // DROP2
|
is $32 // DROP2
|
||||||
@@ -421,7 +419,7 @@ def compiler(defptr)#0
|
|||||||
is $30 // DROP
|
is $30 // DROP
|
||||||
//puts("DROP")
|
//puts("DROP")
|
||||||
VX++ // INX
|
VX++ // INX
|
||||||
A_IS_TOSL = FALSE
|
A_IS_TOSL = FALSE
|
||||||
break
|
break
|
||||||
is $34 // DUP
|
is $34 // DUP
|
||||||
//puts("DUP")
|
//puts("DUP")
|
||||||
|
@@ -325,7 +325,7 @@ def nextln
|
|||||||
scanptr++
|
scanptr++
|
||||||
scan
|
scan
|
||||||
else
|
else
|
||||||
if token <> EOL_TKN and token <> EOF_TKN; puti(token&$7F); puts("Extraneous characters\n"); exit_err(0); fin
|
if token <> EOL_TKN and token <> EOF_TKN; putc(token&$7F); puts("Extraneous characters\n"); exit_err(0); fin
|
||||||
scanptr = inbuff
|
scanptr = inbuff
|
||||||
^instr = fileio:read(refnum, inbuff, 127)
|
^instr = fileio:read(refnum, inbuff, 127)
|
||||||
if ^instr
|
if ^instr
|
||||||
|
Reference in New Issue
Block a user