mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 19:54:26 +00:00
37 lines
647 B
Lua
37 lines
647 B
Lua
%import textio
|
|
%import floats
|
|
%import syslib
|
|
%zeropage basicsafe
|
|
|
|
|
|
; Note: this program is compatible with C64 and CX16.
|
|
|
|
main {
|
|
|
|
sub start() {
|
|
const uword ADDR = $0400
|
|
|
|
memset(ADDR, 40*25, 100)
|
|
memsetw(ADDR, 20*10, $3031)
|
|
memcopy(ADDR, ADDR+40*12, 20*10*2)
|
|
;memcopy(ADDR, ADDR+40*12, 255)
|
|
|
|
testX()
|
|
}
|
|
|
|
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
|
|
}}
|
|
}
|
|
}
|