mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
fixed % operator bug
This commit is contained in:
parent
9e2c52e1ec
commit
69780ecde9
@ -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
|
||||
""")
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user