stack error fix

This commit is contained in:
Irmen de Jong 2018-12-29 20:01:07 +01:00
parent 98b9ddac76
commit 575bc7aa9a
2 changed files with 2 additions and 6 deletions

View File

@ -704,7 +704,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
Opcode.CAST_F_TO_W -> " jsr prog8_lib.stack_float2w"
Opcode.CAST_UB_TO_UW, Opcode.CAST_UB_TO_W -> " lda #0 | sta ${ESTACK_HI+1},x" // clear the msb
Opcode.CAST_B_TO_UW, Opcode.CAST_B_TO_W -> " ${signExtendA("${ESTACK_HI+1},x")}" // sign extend the lsb @todo missing an lda???
Opcode.MSB -> " lda ${(ESTACK_HI+1).toHex()},x | sta ${(ESTACK_LO+1).toHex()},x"
Opcode.MSB -> " lda ${(ESTACK_HI+1).toHex()},x | sta ${(ESTACK_LO+1).toHex()},x"
Opcode.ADD_UB, Opcode.ADD_B -> {
"""
@ -1182,7 +1182,7 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
"A" -> " sta ${segment[1].callLabel}"
"X" -> " stx ${segment[1].callLabel}"
"Y" -> " sty ${segment[1].callLabel}"
else -> " lda ${segment[0].callLabel} | sta ${segment[1].callLabel}"
else -> " lda ${segment[0].callLabel} | sta ${segment[1].callLabel}"
}
}
},

View File

@ -1076,10 +1076,6 @@ sub setchrclr (ubyte column, ubyte row, ubyte char, ubyte color) {
_charmod sta $ffff ; modified
lda setchrclr_color
_colormod sta $ffff ; modified
inx
inx
inx
inx
rts
}}
}