1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-11-04 11:07:00 +00:00

Update ops $70-$7E

This commit is contained in:
David Schmenk 2018-03-25 20:20:19 -07:00
parent 8f5d4647bf
commit 26a03d8e0b

View File

@ -1263,7 +1263,7 @@ def compiler(defptr)#0
fin
A_IS_TOSL = FALSE
break
is $68
is $68 // LAB
i++
//puts("LAB $"); puth(*(bytecode+i))
if A_IS_TOSL & TOSL_DIRTY
@ -1284,7 +1284,7 @@ def compiler(defptr)#0
A_IS_TOSL = TOSL_DIRTY
i++
break
is $6A
is $6A // LAW
i++
//puts("LAW $"); puth(*(bytecode+i))
if A_IS_TOSL & TOSL_DIRTY
@ -1309,7 +1309,7 @@ def compiler(defptr)#0
A_IS_TOSL = TOSL_DIRTY
i++
break
is $6C
is $6C // DLB
i++
//puts("DLB "); puti(^(bytecode+i))
if not A_IS_TOSL
@ -1334,7 +1334,7 @@ def compiler(defptr)#0
//^codeptr = $00; codeptr++ // $00
fin
break
is $6E
is $6E // DLW
i++
//puts("DLW "); puti(^(bytecode+i))
if A_IS_TOSL & TOSL_DIRTY
@ -1373,51 +1373,64 @@ def compiler(defptr)#0
A_IS_TOSL = TOSL_CLEAN
break
// SB,SW,SLB,SLW,SAB,SAW,DAB,DAW ; 70 72 74 76 78 7A 7C 7E
is $70
is $70 // SB
//puts("SB")
if not A_IS_TOSL
*codeptr = $D0B5+(VX<<8) // LDA ESTKL,X
codeptr = codeptr + 2
fin
^codeptr = $95; codeptr++ // STA zp,X
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
^codeptr = $B5; codeptr++ // LDA zp,X
^codeptr = $D0+1+VX; codeptr++ // ESTKL+1
^codeptr = $81; codeptr++ // STA (zp,X)
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>0 = ($C095-$0100)+(VX<<8) // STA ESTKH-1,X
//^codeptr = $95; codeptr++ // STA zp,X
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>2 = ($D0B5+$0100)+(VX<<8) // LDA ESTKL+1,X
//^codeptr = $B5; codeptr++ // LDA zp,X
//^codeptr = $D0+1+VX; codeptr++ // ESTKL+1
codeptr=>4 = ($C081-$0100)+(VX<<8) // STA (ESTKH-1,X)
//^codeptr = $81; codeptr++ // STA (zp,X)
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
//^codeptr = $E8; codeptr++ // INX
//^codeptr = $E8; codeptr++ // INX
codeptr = codeptr + 6
VX = VX + 2
A_IS_TOSL = FALSE
break
is $72
is $72 // SW
//puts("SW")
if not A_IS_TOSL
*codeptr = $D0B5+(VX<<8) // LDA ESTKL,X
codeptr = codeptr + 2
fin
^codeptr = $95; codeptr++ // STA zp,X
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
^codeptr = $B5; codeptr++ // LDA zp,X
^codeptr = $D0+1+VX; codeptr++ // ESTKL+1
^codeptr = $81; codeptr++ // STA (zp,X)
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
^codeptr = $B5; codeptr++ // LDA zp,X
^codeptr = $C0+1+VX; codeptr++ // ESTKH+1
^codeptr = $F6; codeptr++ // INC zp,X
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
^codeptr = $D0; codeptr++ // BNE rel
^codeptr = $02; codeptr++ // +2
^codeptr = $F6; codeptr++ // INC zp,X
^codeptr = $C0+VX; codeptr++ // ESTKH
^codeptr = $81; codeptr++ // STA (zp,X)
^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>0 = ($C095-$0100)+(VX<<8) // STA ESTKH-1,X
//^codeptr = $95; codeptr++ // STA zp,X
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>2 = ($D0B5+$0100)+(VX<<8) // LDA ESTKL+1,X
//^codeptr = $B5; codeptr++ // LDA zp,X
//^codeptr = $D0+1+VX; codeptr++ // ESTKL+1
codeptr=>4 = ($C081-$0100)+(VX<<8) // STA (ESTKH-1,X)
//^codeptr = $81; codeptr++ // STA (zp,X)
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>6 = ($C0B5+$0100)+(VX<<8) // LDA ESTKH+1,X
//^codeptr = $B5; codeptr++ // LDA zp,X
//^codeptr = $C0+1+VX; codeptr++ // ESTKH+1
codeptr=>8 = ($C0F6-$0100)+(VX<<8) // INC ESTKH-1,X
//^codeptr = $F6; codeptr++ // INC zp,X
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
codeptr=>10 = $02D0 // BNE +2
//^codeptr = $D0; codeptr++ // BNE rel
//^codeptr = $02; codeptr++ // +2
codeptr=>12 = $C0F6+(VX<<8) // INC ESTKH,X
//^codeptr = $F6; codeptr++ // INC zp,X
//^codeptr = $C0+VX; codeptr++ // ESTKH
codeptr=>14 = ($C081-$0100)+(VX<<8) // STA (ESTKH-1,X)
//^codeptr = $81; codeptr++ // STA (zp,X)
//^codeptr = $C0-1+VX; codeptr++ // ESTKH-1
//^codeptr = $E8; codeptr++ // INX
//^codeptr = $E8; codeptr++ // INX
codeptr = codeptr + 16
VX = VX + 2
A_IS_TOSL = FALSE
break
is $74
is $74 // SLB
i++
//puts("SLB "); puti(^(bytecode+i))
if not A_IS_TOSL
@ -1425,19 +1438,25 @@ def compiler(defptr)#0
codeptr = codeptr + 2
fin
if ^(bytecode+i) <> 0
^codeptr = $A0; codeptr++ // LDY #imm
^codeptr = ^(bytecode+i); codeptr++
*codeptr = $A0+(^(bytecode+i)<<8) // LDY #imm
codeptr = codeptr + 2
//^codeptr = $A0; codeptr++ // LDY #imm
//^codeptr = ^(bytecode+i); codeptr++
fin
^codeptr = $91; codeptr++ // STA (zp),Y
^codeptr = $E0; codeptr++ // IFP
*codeptr = $E091 // STA (IFP),Y
codeptr = codeptr + 2
//^codeptr = $91; codeptr++ // STA (zp),Y
//^codeptr = $E0; codeptr++ // IFP
if ^(bytecode+i) <> 0
^codeptr = $A0; codeptr++ // LDY #imm
^codeptr = $00; codeptr++ // $00
*codeptr = $00A0 // LDY #$00
codeptr = codeptr + 2
//^codeptr = $A0; codeptr++ // LDY #imm
//^codeptr = $00; codeptr++ // $00
fin
VX++ //^codeptr = $E8; codeptr++ // INX
A_IS_TOSL = FALSE
break
is $76
is $76 // SLW
i++
//puts("SLW "); puti(^(bytecode+i))
if not A_IS_TOSL
@ -1445,56 +1464,75 @@ def compiler(defptr)#0
codeptr = codeptr + 2
fin
if ^(bytecode+i) <> 0
^codeptr = $A0; codeptr++ // LDY #imm
^codeptr = ^(bytecode+i); codeptr++
*codeptr = $A0+(^(bytecode+i)<<8) // LDY #imm
codeptr = codeptr + 2
//^codeptr = $A0; codeptr++ // LDY #imm
//^codeptr = ^(bytecode+i); codeptr++
fin
^codeptr = $91; codeptr++ // STA (zp),Y
^codeptr = $E0; codeptr++ // IFP
^codeptr = $C8; codeptr++ // INY
^codeptr = $B5; codeptr++ // LDA zp,X
^codeptr = $C0+VX; codeptr++ // ESTKH
^codeptr = $91; codeptr++ // STA (zp),Y
^codeptr = $E0; codeptr++ // IFP
codeptr=>0 = $E091 // STA (IFP),Y
//^codeptr = $91; codeptr++ // STA (zp),Y
//^codeptr = $E0; codeptr++ // IFP
codeptr->2 = $C8 // INY
//^codeptr = $C8; codeptr++ // INY
codeptr=>3 = $C0B5+(VX<<8) // LDA ESTKH,X
//^codeptr = $B5; codeptr++ // LDA zp,X
//^codeptr = $C0+VX; codeptr++ // ESTKH
codeptr=>5 = $E091 // STA (IFP),Y
//^codeptr = $91; codeptr++ // STA (zp),Y
//^codeptr = $E0; codeptr++ // IFP
if ^(bytecode+i) <> 0
^codeptr = $A0; codeptr++ // LDY #imm
^codeptr = $00; codeptr++ // $00
codeptr=>7 = $00A0 // LDY #$00
codeptr = codeptr + 9
//^codeptr = $A0; codeptr++ // LDY #imm
//^codeptr = $00; codeptr++ // $00
else
^codeptr = $88; codeptr++ // DEY
codeptr->7 = $88 // DEY
codeptr = codeptr + 8
//^codeptr = $88; codeptr++ // DEY
fin
VX++ //^codeptr = $E8; codeptr++ // INX
VX++ // INX
A_IS_TOSL = FALSE
break
is $78
is $78 // SAB
i++
//puts("SAB $"); puth(*(bytecode+i))
if not A_IS_TOSL
*codeptr = $D0B5+(VX<<8) // LDA ESTKL,X
codeptr = codeptr + 2
fin
^codeptr = $8D; codeptr++ // STA abs
*codeptr = *(bytecode+i); codeptr = codeptr + 2
VX++ //^codeptr = $E8; codeptr++ // INX
codeptr->0 = $8D // STA abs
codeptr=>1 = *(bytecode+i)
//^codeptr = $8D; codeptr++ // STA abs
//*codeptr = *(bytecode+i); codeptr = codeptr + 2
VX++ // INX
codeptr = codeptr + 3
A_IS_TOSL = FALSE
i++
break
is $7A
is $7A // SAW
i++
//puts("SAW $"); puth(*(bytecode+i))
if not A_IS_TOSL
*codeptr = $D0B5+(VX<<8) // LDA ESTKL,X
codeptr = codeptr + 2
fin
^codeptr = $8D; codeptr++ // STA abs
*codeptr = *(bytecode+i); codeptr = codeptr + 2
^codeptr = $B5; codeptr++ // LDA zp,X
^codeptr = $C0+VX; codeptr++ // ESTKH
^codeptr = $8D; codeptr++ // STA abs
*codeptr = *(bytecode+i)+1; codeptr = codeptr + 2
codeptr->0 = $8D // STA abs
codeptr=>1 = *(bytecode+i)
//^codeptr = $8D; codeptr++ // STA abs
//*codeptr = *(bytecode+i); codeptr = codeptr + 2
codeptr=>3 = $C0B5+(VX<<8) // LDA ESTKH,X
//^codeptr = $B5; codeptr++ // LDA zp,X
//^codeptr = $C0+VX; codeptr++ // ESTKH
codeptr->5 = $8D // STA abs
codeptr=>6 = *(bytecode+i)+1
//^codeptr = $8D; codeptr++ // STA abs
//*codeptr = *(bytecode+i)+1; codeptr = codeptr + 2
VX++ //^codeptr = $E8; codeptr++ // INX
codeptr = codeptr + 8
A_IS_TOSL = FALSE
i++
break
is $7C
is $7C // DAB
i++
//puts("DAB $"); puth(*(bytecode+i))
if not A_IS_TOSL
@ -1502,11 +1540,14 @@ def compiler(defptr)#0
codeptr = codeptr + 2
A_IS_TOSL = TOSL_CLEAN
fin
^codeptr = $8D; codeptr++ // STA abs
*codeptr = *(bytecode+i); codeptr = codeptr + 2
codeptr->0 = $8D // STA abs
codeptr=>1 = *(bytecode+i)
//^codeptr = $8D; codeptr++ // STA abs
//*codeptr = *(bytecode+i); codeptr = codeptr + 2
codeptr = codeptr + 3
i++
break
is $7E
is $7E // DAW
i++
//puts("DAW $"); puth(*(bytecode+i))
if not A_IS_TOSL
@ -1514,14 +1555,21 @@ def compiler(defptr)#0
codeptr = codeptr + 2
A_IS_TOSL = TOSL_CLEAN
fin
^codeptr = $8D; codeptr++ // STA abs
*codeptr = *(bytecode+i); codeptr = codeptr + 2
^codeptr = $B4; codeptr++ // LDY zp,X
^codeptr = $C0+VX; codeptr++ // ESTKH
^codeptr = $8C; codeptr++ // STY abs
*codeptr = *(bytecode+i)+1; codeptr = codeptr + 2
^codeptr = $A0; codeptr++ // LDY #imm
^codeptr = $00; codeptr++ // $00
codeptr->0 = $8D // STA abs
codeptr=>1 = *(bytecode+i)
//^codeptr = $8D; codeptr++ // STA abs
//*codeptr = *(bytecode+i); codeptr = codeptr + 2
codeptr=>3 = $C0B4+(VX<<8) // LDY ESTKH,X
//^codeptr = $B4; codeptr++ // LDY zp,X
//^codeptr = $C0+VX; codeptr++ // ESTKH
codeptr->5 = $8C // STY abs
codeptr=>7 = *(bytecode+i)+1
//^codeptr = $8C; codeptr++ // STY abs
//*codeptr = *(bytecode+i)+1; codeptr = codeptr + 2
codeptr=>9 = $00A0 // LDY #$00
//^codeptr = $A0; codeptr++ // LDY #imm
//^codeptr = $00; codeptr++ // $00
codeptr = codeptr + 11
i++
break
// LNOT,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 80 82 84 86 88 8A 8C 8E