mirror of
https://github.com/irmen/prog8.git
synced 2025-02-18 05:30:34 +00:00
wording
This commit is contained in:
parent
1bd32c0f19
commit
cd500fee8c
@ -174,7 +174,7 @@ internal class AstChecker(private val program: Program,
|
|||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
errors.err("statement occurs in a block, where it will never be executed. Use it in a subroutine instead.", statement.position)
|
errors.err("non-declarative statement occurs in block scope, where it will never be executed. Move it to a subroutine instead.", statement.position)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
|
|
||||||
- alllow uword xx=memory() initialization in block scope.
|
|
||||||
|
|
||||||
- hoist all variable declarations up to the subroutine scope *before* even the constant folding takes place (to avoid undefined symbol errors when referring to a variable from another nested scope in the subroutine)
|
- hoist all variable declarations up to the subroutine scope *before* even the constant folding takes place (to avoid undefined symbol errors when referring to a variable from another nested scope in the subroutine)
|
||||||
- optimize swap of two memread values with index, using the same pointer expression/variable, like swap(@(ptr+1), @(ptr+2))
|
- optimize swap of two memread values with index, using the same pointer expression/variable, like swap(@(ptr+1), @(ptr+2))
|
||||||
- optimize several inner loops in gfx2 (highres 4 color mode)
|
- optimize several inner loops in gfx2 (highres 4 color mode)
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
%import textio
|
%import textio
|
||||||
|
%zeropage basicsafe
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
||||||
; $1F9C0 - $1F9FF PSG registers
|
|
||||||
|
|
||||||
sub start() {
|
sub start() {
|
||||||
txt.print("tone")
|
txt.print("done\n")
|
||||||
|
|
||||||
uword freq = 1181
|
|
||||||
cx16.vpoke(1, $f9c0, lsb(freq))
|
|
||||||
cx16.vpoke(1, $f9c1, msb(freq))
|
|
||||||
cx16.vpoke(1, $f9c2, %11111111) ; volume
|
|
||||||
cx16.vpoke(1, $f9c3, %11000000) ; triangle waveform
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user