prog8/examples/test.p8

34 lines
597 B
Plaintext
Raw Normal View History

%import textio
2020-10-22 21:41:16 +00:00
%import diskio
2020-09-27 20:05:44 +00:00
%zeropage basicsafe
2020-08-27 17:47:50 +00:00
main {
2020-10-09 20:47:42 +00:00
sub start() {
2020-10-22 21:41:16 +00:00
memcopy($aaaa, $bbbb, 200)
mcp($aaaa, $bbbb, 200)
testX()
}
2020-10-22 21:41:16 +00:00
sub mcp(uword from, uword dest, ubyte length) {
txt.print_uw(from)
txt.print_uw(dest)
txt.print_ub(length)
}
asmsub testX() {
%asm {{
stx _saveX
lda #13
jsr txt.chrout
lda _saveX
jsr txt.print_ub
lda #13
jsr txt.chrout
ldx _saveX
rts
_saveX .byte 0
}}
2020-09-16 21:04:18 +00:00
}
2020-08-27 17:47:50 +00:00
}