prog8/examples/test.p8

48 lines
874 B
Plaintext
Raw Normal View History

2019-02-12 20:53:57 +00:00
%import c64utils
%zeropage basicsafe
2019-01-26 21:46:01 +00:00
~ main {
2019-02-25 00:08:10 +00:00
; @todo see problem in looplabelproblem.p8
2019-02-21 00:31:33 +00:00
sub start() {
ubyte ub1
ubyte ub2
ubyte ub3
ubyte ub4
ubyte ub5
2019-03-18 03:44:20 +00:00
ub1, ub2 = test2()
c64scr.print_ub(ub1)
c64.CHROUT('\n')
c64scr.print_ub(ub2)
c64.CHROUT('\n')
c64.CHROUT('\n')
ub1, ub2 = test3()
c64scr.print_ub(ub1)
c64.CHROUT('\n')
c64scr.print_ub(ub2)
c64.CHROUT('\n')
c64.CHROUT('\n')
}
2019-03-18 03:44:20 +00:00
asmsub test2() -> clobbers() -> (ubyte @Pc, ubyte @A) {
%asm {{
lda #100
ldy #100
sec
rts
}}
}
2019-03-18 03:44:20 +00:00
asmsub test3() -> clobbers() -> (ubyte @Pc, ubyte @A) {
%asm {{
2019-03-18 03:44:20 +00:00
lda #101
ldy #101
clc
rts
}}
}
}