mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +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) {
|
||||
asmgen.out("""
|
||||
tay
|
||||
cmp $variable
|
||||
bcc +
|
||||
beq +
|
||||
lda #0
|
||||
ldy $variable
|
||||
rol a""")
|
||||
beq ++
|
||||
+ lda #1
|
||||
+""")
|
||||
} else {
|
||||
// see http://www.6502.org/tutorials/compare_beyond.html
|
||||
asmgen.out("""
|
||||
@ -966,10 +969,13 @@ internal class AugmentableAssignmentAsmGen(private val program: PtProgram,
|
||||
if(!signed) {
|
||||
TODO("swap operand order")
|
||||
asmgen.out("""
|
||||
tay
|
||||
cmp $variable
|
||||
bcc +
|
||||
beq +
|
||||
lda #0
|
||||
ldy $variable
|
||||
rol a""")
|
||||
beq ++
|
||||
+ lda #1
|
||||
+""")
|
||||
} else {
|
||||
TODO("swap operand order")
|
||||
// see http://www.6502.org/tutorials/compare_beyond.html
|
||||
|
Loading…
Reference in New Issue
Block a user