mirror of
https://github.com/irmen/prog8.git
synced 2024-12-22 18:30:01 +00:00
fix signed byte to word casting issue uw = 8888 + (bb as ubyte)
This commit is contained in:
parent
893b383bdf
commit
d88c09b098
@ -1830,8 +1830,9 @@ internal class AssignmentAsmGen(private val program: PtProgram,
|
||||
RegisterOrPair.AY,
|
||||
RegisterOrPair.XY,
|
||||
in Cx16VirtualRegisters -> {
|
||||
// cast an ubyte value to a 16 bits register, just assign it and make use of the value extension
|
||||
return assignExpressionToRegister(value, target.register!!, false)
|
||||
assignExpressionToRegister(value, RegisterOrPair.A, false)
|
||||
assignRegisterByte(target, CpuRegister.A, false)
|
||||
return
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- fix codegen signed byte to word casting issue uw = 8888 + (bb as ubyte)
|
||||
|
||||
- remove after(assignment from BeforeAsmAstChanger permanently once issues above fixed
|
||||
- gfx2/monogfx: use vera auto in/decrement in the flood fill routine (getpixels)
|
||||
- gfx2: use vera fx fill for horizontal_line of sufficient length?
|
||||
|
||||
|
@ -4,15 +4,11 @@
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
uword @shared uw = 5555
|
||||
byte @shared bb = -44
|
||||
|
||||
uw = (bb as ubyte) as uword
|
||||
txt.print_uw(uw) ; 212
|
||||
txt.nl()
|
||||
|
||||
uw = 8888 + (bb as ubyte) ; TODO fix 6502 codegen
|
||||
uword uw = 8888 + (bb as ubyte)
|
||||
txt.print_uw(uw) ; 9100
|
||||
txt.nl()
|
||||
txt.print_uw(8888 + (bb as ubyte)) ; 9100
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ org.gradle.daemon=true
|
||||
kotlin.code.style=official
|
||||
javaVersion=11
|
||||
kotlinVersion=1.9.10
|
||||
version=9.5
|
||||
version=9.5.1
|
||||
|
Loading…
Reference in New Issue
Block a user