6502-OS/programs/print_slow.s65

27 lines
576 B
Plaintext

.include "system.h65"
.include "sleep.h65"
.include "lcd.h65"
.export print_slow
.code
;********************************************************************************
; @function Print a null-terminated string
; @param ARG0-1: Address of the string to print
; @param x: time to sleep in centiseconds
;********************************************************************************
.proc print_slow
ldy #$00
@print_loop:
lda (ARG0),y
beq @print_end
phx
jsr sleep
plx
jsr lcd::print_char
iny
bra @print_loop
@print_end:
rts
.endproc