diff --git a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt index 423d7c784..7f7ed22fe 100644 --- a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt @@ -850,8 +850,8 @@ internal class AugmentableAssignmentAsmGen(private val program: Program, ldy #>$value jsr math.divmod_uw_asm lda P8ZP_SCRATCH_W2 + ldy P8ZP_SCRATCH_W2+1 sta $name - lda P8ZP_SCRATCH_W2+2 sty $name+1 """) } diff --git a/examples/cx16/highresbitmap.p8 b/examples/cx16/highresbitmap.p8 index 6511ebb65..43f4b001f 100644 --- a/examples/cx16/highresbitmap.p8 +++ b/examples/cx16/highresbitmap.p8 @@ -76,11 +76,8 @@ main { cx16.wait(2*60) - repeat 255 { - xx=rndw() % 640 ; TODO doesn't work correctly, truncates - yy=rndw() % 480 ; TODO doesn't work correctly, truncates - gfx2.line(xx, yy, rndw() % 640, rndw() % 480, 1) - } + repeat 255 + gfx2.line(rndw() % 640, rndw() % 480, rndw() % 640, rndw() % 480, 1) cx16.wait(1*60) } diff --git a/examples/test.p8 b/examples/test.p8 index e376da444..0c8439b8f 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,5 +1,6 @@ %import test_stack %import textio +%import floats %zeropage basicsafe %option no_sysinit @@ -8,13 +9,13 @@ main { sub start () { - ; TODO uword var = rndw() % 640 doesn't work??? works if its in an expression. - - x_f = -300.0 - for ww in -300 to 300 { - ;fl = ww as float / 10.0 ; TODO doesn't work??? - y_f = cos(x_f/30)*60 - x_f/1.7 - gfx2.plot(ww + 320 as uword, (y_f + 240) as uword, 1) + word ww + float x_f = -300.0 + float y_f + for ww in -300 to 300 { ; TODO fix crash if ww is not defined + ;fl = ww as float ; TODO doesn't work??? + y_f = cos(x_f/30.0)*60 - x_f/1.7 + ; gfx2.plot(ww + 320 as uword, (y_f + 240) as uword, 1) x_f += 1.0 }