2022-10-26 21:53:17 +00:00
|
|
|
%import textio
|
2022-11-10 21:45:07 +00:00
|
|
|
%import psg
|
2022-10-22 11:33:35 +00:00
|
|
|
%zeropage basicsafe
|
2022-10-19 21:23:49 +00:00
|
|
|
|
2022-10-22 11:33:35 +00:00
|
|
|
main {
|
2022-11-06 21:41:23 +00:00
|
|
|
|
2022-11-07 23:06:43 +00:00
|
|
|
sub start() {
|
2022-11-10 21:45:07 +00:00
|
|
|
ubyte @shared variable
|
|
|
|
|
|
|
|
sub nested() {
|
|
|
|
ubyte @shared variable2
|
|
|
|
|
|
|
|
variable2 = 33
|
|
|
|
nested()
|
|
|
|
|
|
|
|
sub nested() {
|
|
|
|
ubyte @shared variable3
|
|
|
|
|
|
|
|
variable3 = 33
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
nested()
|
|
|
|
explosion()
|
|
|
|
}
|
|
|
|
|
|
|
|
sub explosion() {
|
|
|
|
; this subroutine is not used but it is an example of how to make a sound effect using the psg library!
|
|
|
|
psg.silent()
|
|
|
|
psg.voice(0, psg.LEFT, 63, psg.NOISE, 0)
|
|
|
|
psg.voice(1, psg.RIGHT, 63, psg.NOISE, 0)
|
|
|
|
psg.freq(0, 1000)
|
|
|
|
psg.freq(1, 2000)
|
2022-11-06 12:40:55 +00:00
|
|
|
}
|
2022-09-18 14:04:49 +00:00
|
|
|
}
|