prog8/examples/test.p8

32 lines
480 B
Plaintext
Raw Normal View History

%import textio
%option no_sysinit
2023-01-22 16:10:36 +00:00
%zeropage basicsafe
2022-11-29 19:09:10 +00:00
main {
sub start() {
2023-01-25 00:57:25 +00:00
rsavex()
ubyte @shared ub
void asmfoo(42)
main.asmfoo.arg = 42
main.normalfoo.arg=99
; normalfoo(42)
2023-01-22 16:10:36 +00:00
somelabel:
ub++
txt.print_ub(ub)
}
2023-01-22 16:10:36 +00:00
asmsub asmfoo(ubyte arg @Y) -> ubyte @Y {
%asm {{
iny
rts
}}
}
2023-01-22 16:10:36 +00:00
sub normalfoo(ubyte arg) -> ubyte {
arg++
return 42
}
}