mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
fix in-place <= for bytes
This commit is contained in:
parent
15c649024e
commit
1ce8fe06d5
@ -813,10 +813,13 @@ internal class AugmentableAssignmentAsmGen(private val program: PtProgram,
|
|||||||
"<=" -> {
|
"<=" -> {
|
||||||
if(!signed) {
|
if(!signed) {
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
tay
|
cmp $variable
|
||||||
|
bcc +
|
||||||
|
beq +
|
||||||
lda #0
|
lda #0
|
||||||
ldy $variable
|
beq ++
|
||||||
rol a""")
|
+ lda #1
|
||||||
|
+""")
|
||||||
} else {
|
} else {
|
||||||
// see http://www.6502.org/tutorials/compare_beyond.html
|
// see http://www.6502.org/tutorials/compare_beyond.html
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
@ -966,10 +969,13 @@ internal class AugmentableAssignmentAsmGen(private val program: PtProgram,
|
|||||||
if(!signed) {
|
if(!signed) {
|
||||||
TODO("swap operand order")
|
TODO("swap operand order")
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
tay
|
cmp $variable
|
||||||
|
bcc +
|
||||||
|
beq +
|
||||||
lda #0
|
lda #0
|
||||||
ldy $variable
|
beq ++
|
||||||
rol a""")
|
+ lda #1
|
||||||
|
+""")
|
||||||
} else {
|
} else {
|
||||||
TODO("swap operand order")
|
TODO("swap operand order")
|
||||||
// see http://www.6502.org/tutorials/compare_beyond.html
|
// see http://www.6502.org/tutorials/compare_beyond.html
|
||||||
|
Loading…
Reference in New Issue
Block a user