mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 03:54:27 +00:00
25 lines
417 B
Lua
25 lines
417 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
%option no_sysinit
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
ubyte rr = bla(1,true,2)
|
|
txt.print_ub(rr)
|
|
txt.nl()
|
|
rr = bla(1,false,2)
|
|
txt.print_ub(rr)
|
|
}
|
|
|
|
asmsub bla(ubyte aa @A, ubyte cc @Pc, ubyte bb @Y) -> ubyte @A{
|
|
%asm {{
|
|
bcc +
|
|
lda #10
|
|
bne end
|
|
+ lda #20
|
|
end rts
|
|
}}
|
|
}
|
|
}
|