prog8/examples/test.p8
Irmen de Jong 1382728bd2 warning about unreachable code after a return statement
added some dbus experiments for future compilation service
2020-03-14 13:12:01 +01:00

55 lines
991 B
Lua

%import c64flt
%zeropage basicsafe
main {
sub start() {
c64scr.print("spstart:")
print_stackpointer()
sub1()
c64scr.print("spend:")
print_stackpointer()
}
sub sub1() {
c64scr.print("sp1:")
print_stackpointer()
sub2()
}
sub sub2() {
c64scr.print("sp2:")
print_stackpointer()
exit(33)
sub3() ; TODO warning about unreachable code
sub3() ; TODO remove statements after a return
c64scr.print("sp2:")
c64scr.print("sp2:")
sub3()
sub blerp() {
;-- keep this!
}
sub3()
sub3()
sub3()
sub3()
sub3()
sub3()
sub3()
sub3()
sub3()
}
sub sub3() {
c64scr.print("sp3:")
print_stackpointer()
}
sub print_stackpointer() {
c64scr.print_ub(X) ; prints stack pointer
c64.CHROUT('\n')
}
}