diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index 85333f7aa..37542bc08 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -70,7 +70,9 @@ asmsub RDTIM16() -> uword @AY { ; -- like RDTIM() but only returning the lower 16 bits in AY for convenience %asm {{ phx + sei jsr c64.RDTIM + cli pha txa tay @@ -936,9 +938,13 @@ _loop lda P8ZP_SCRATCH_W1 plx rts -+ jsr c64.RDTIM ++ sei + jsr c64.RDTIM + cli sta P8ZP_SCRATCH_B1 -- jsr c64.RDTIM +- sei + jsr c64.RDTIM + cli cmp P8ZP_SCRATCH_B1 beq - diff --git a/examples/test.p8 b/examples/test.p8 index fdee3a0c9..474a0deaa 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -9,7 +9,7 @@ main { ubyte pos for pos in 0 to 7 { - pokew(table + 64 + pos*2, ($000a-pos)*200) ; TODO FIX WRONG CODE + pokew(table + 64 + pos*2, ($000a-pos)*200) } for pos in 0 to 7 {