prog8/examples/test.p8

32 lines
572 B
Plaintext
Raw Normal View History

2024-03-28 22:24:14 +00:00
%import textio
%zeropage basicsafe
%option no_sysinit
main {
sub start() {
2024-03-28 22:24:14 +00:00
ubyte @shared bytevar
uword @shared wordvar
2024-03-21 22:40:36 +00:00
wordvar, bytevar = test4()
if_cs
txt.print("true! ")
else
txt.print("false! ")
2024-03-28 22:24:14 +00:00
txt.print_uwhex(wordvar, true)
txt.spc()
txt.print_ub(bytevar)
txt.nl()
2024-03-21 22:40:36 +00:00
}
2024-03-28 22:24:14 +00:00
asmsub test4() -> uword @AY, ubyte @X, bool @Pc {
%asm {{
lda #<$11ee
ldy #>$11ee
ldx #42
clc
2024-03-28 22:24:14 +00:00
rts
}}
}
}