prog8/examples/test.p8
Irmen de Jong 0d3ad80659 retain type of consts better to avoid precision loss
this also fixed a difference in const calculation where the result could differ if you were using optimzations or not.
2024-09-14 21:06:21 +02:00

17 lines
315 B
Lua

%import textio
%zeropage basicsafe
%option no_sysinit
main {
sub start() {
uword @shared large = (320*240/8/8)
const uword WIDTH=320
uword x1 = ((WIDTH-256)/2 as uword) + 200
txt.print_uw(x1)
txt.nl()
x1 = ((WIDTH-256)/2) + 200
txt.print_uw(x1)
}
}