prog8/examples/test.p8
2024-11-12 00:11:19 +01:00

29 lines
482 B
Lua

%import textio
%option no_sysinit
%zeropage basicsafe
main {
sub start() {
defer initial()
if allocate() {
txt.print("1")
defer deallocate()
txt.print("2")
return
}
txt.print("3")
}
sub allocate() -> bool {
txt.print("allocate\n")
return true
}
sub initial() {
txt.print("initial\n")
}
sub deallocate() {
txt.print("deallocate\n")
}
}