6502-OS/programs/print_slow.s65

29 lines
662 B
Plaintext

.include "system.h65"
.include "sleep.h65"
.include "lcd.h65"
.export print_slow
.code
;;********************************************************************************
;; @function Print a null-terminated string with a delay between each character
;; @param ARG0-1: Address of the string to print
;; @param x: time to sleep in centiseconds
;; @ingroup applications
;; @clock_dependent
;;********************************************************************************
.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