47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
.ifndef INCLUDE_PRINT_SLOW
|
|
INCLUDE_PRINT_SLOW = 1
|
|
|
|
.include "system.h65"
|
|
.include "sleep.s65"
|
|
.include "lcd.h65"
|
|
|
|
.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
|
|
|
|
;********************************************************************************
|
|
; @macro Print a null-terminated string
|
|
; @param message: Address of the message
|
|
; @param time_cs: time to sleep in centiseconds
|
|
;********************************************************************************
|
|
.macro PrintSlow message,time_cs
|
|
jsr lcd::clear
|
|
lda #<message
|
|
sta ARG0
|
|
lda #>message
|
|
sta ARG1
|
|
phx
|
|
ldx #time_cs
|
|
jsr print_slow
|
|
plx
|
|
.endmacro
|
|
|
|
.endif ; guard
|