mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 08:29:25 +00:00
fix some invalid instructions on 6502 (instead of 65c02) target for bit shifts
This commit is contained in:
parent
be06d871b6
commit
75514fc7af
@ -602,7 +602,7 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
|||||||
asmgen.out(" pha")
|
asmgen.out(" pha")
|
||||||
if(dt in ByteDatatypes) {
|
if(dt in ByteDatatypes) {
|
||||||
assignExpressionToRegister(expr.left, RegisterOrPair.A, signed)
|
assignExpressionToRegister(expr.left, RegisterOrPair.A, signed)
|
||||||
asmgen.out(" ply")
|
asmgen.restoreRegisterStack(CpuRegister.Y, true)
|
||||||
if(expr.operator==">>")
|
if(expr.operator==">>")
|
||||||
if(signed)
|
if(signed)
|
||||||
asmgen.out(" jsr math.lsr_byte_A")
|
asmgen.out(" jsr math.lsr_byte_A")
|
||||||
@ -614,7 +614,7 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
|||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
assignExpressionToRegister(expr.left, RegisterOrPair.AY, signed)
|
assignExpressionToRegister(expr.left, RegisterOrPair.AY, signed)
|
||||||
asmgen.out(" plx")
|
asmgen.restoreRegisterStack(CpuRegister.X, true)
|
||||||
if(expr.operator==">>")
|
if(expr.operator==">>")
|
||||||
if(signed)
|
if(signed)
|
||||||
asmgen.out(" jsr math.lsr_word_AY")
|
asmgen.out(" jsr math.lsr_word_AY")
|
||||||
|
Loading…
Reference in New Issue
Block a user