mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-22 01:30:45 +00:00
fix opcode skip for CS in branch detection
This commit is contained in:
parent
9a82e3b5fb
commit
8b649b0d48
BIN
PLASMA-BLD2.PO
BIN
PLASMA-BLD2.PO
Binary file not shown.
BIN
PLASMA-SYS2.PO
BIN
PLASMA-SYS2.PO
Binary file not shown.
@ -29,7 +29,7 @@ const codemax = $BEE0
|
||||
const indirectentry = $03DC
|
||||
const directentry = $03D0
|
||||
//
|
||||
//
|
||||
// Copy bytecode DEF to main memory
|
||||
//
|
||||
def defcpy(dst, defptr)#0
|
||||
*$003C = defptr=>bytecodeaddr
|
||||
|
@ -56,12 +56,13 @@ def compiler(defptr)#0
|
||||
i = 0
|
||||
while i <= defptr->bytecodesize
|
||||
if not ^(isdata+i)
|
||||
when (^(bytecode+i) & $FE)
|
||||
when ^(bytecode+i) & $FE
|
||||
//
|
||||
// Multi-byte operands
|
||||
//
|
||||
is $2E // CS
|
||||
i = i + ^(bytecode+i+1)// + 1
|
||||
i++
|
||||
i = i + ^(bytecode+i)
|
||||
break
|
||||
//
|
||||
// Double byte operands
|
||||
@ -824,7 +825,7 @@ def compiler(defptr)#0
|
||||
fin
|
||||
VX-- // DEX
|
||||
if opcode == $68
|
||||
//puts("LAB $"); puth(*(bytecode+i))
|
||||
//puts("LAB $"); puth(dest)
|
||||
if VY <> 0
|
||||
*codeptr = $00A0 // LDY #$00
|
||||
codeptr = codeptr + 2
|
||||
@ -834,7 +835,7 @@ def compiler(defptr)#0
|
||||
codeptr = codeptr + 2
|
||||
else
|
||||
//puts("LAW $"); puth(dest)
|
||||
codeptr->0 = $AD // LDA abs
|
||||
codeptr->0 = $AD // LDA abs+1
|
||||
codeptr=>1 = dest+1
|
||||
codeptr=>3 = $C095+(VX<<8) // STA ESTKH,X
|
||||
codeptr = codeptr + 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user