mirror of
https://github.com/irmen/prog8.git
synced 2024-09-08 10:55:08 +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
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
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)
|
||||
- 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)
|
||||
|
@ -1,16 +1,9 @@
|
||||
%import textio
|
||||
%zeropage basicsafe
|
||||
|
||||
main {
|
||||
|
||||
; $1F9C0 - $1F9FF PSG registers
|
||||
|
||||
sub start() {
|
||||
txt.print("tone")
|
||||
|
||||
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
|
||||
txt.print("done\n")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user