prog8/examples/test.p8

25 lines
417 B
Plaintext
Raw Normal View History

%import textio
%zeropage basicsafe
%option no_sysinit
2020-12-08 00:02:38 +00:00
main {
2021-01-13 21:32:17 +00:00
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
}}
2021-01-10 14:15:00 +00:00
}
2020-08-27 17:47:50 +00:00
}