mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 15:33:02 +00:00
33 lines
596 B
Lua
33 lines
596 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
%option no_sysinit
|
|
|
|
main {
|
|
sub start() {
|
|
ubyte @shared bytevar
|
|
uword @shared wordvar
|
|
bool flag
|
|
|
|
wordvar, bytevar, void = test4()
|
|
if_cs
|
|
txt.print("true! ")
|
|
else
|
|
txt.print("false! ")
|
|
|
|
txt.print_uwhex(wordvar, true)
|
|
txt.spc()
|
|
txt.print_ub(bytevar)
|
|
txt.nl()
|
|
}
|
|
|
|
asmsub test4() -> uword @AY, ubyte @X, bool @Pc {
|
|
%asm {{
|
|
lda #<$11ee
|
|
ldy #>$11ee
|
|
ldx #42
|
|
clc
|
|
rts
|
|
}}
|
|
}
|
|
}
|