mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
27 lines
394 B
Lua
27 lines
394 B
Lua
%import textio
|
|
%option no_sysinit
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
ubyte @shared ub = asmfoo(42)
|
|
ub = normalfoo(42)
|
|
somelabel:
|
|
ub++
|
|
txt.print_ub(ub)
|
|
}
|
|
|
|
asmsub asmfoo(ubyte arg @Y) -> ubyte @Y {
|
|
%asm {{
|
|
iny
|
|
rts
|
|
}}
|
|
}
|
|
|
|
sub normalfoo(ubyte arg) -> ubyte {
|
|
arg++
|
|
return 42
|
|
}
|
|
}
|