mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-04 20:06:09 +00:00
b1238af49d
this will probably upset people
60 lines
955 B
ArmAsm
60 lines
955 B
ArmAsm
;================================
|
|
; move_and_print
|
|
;================================
|
|
; get X,Y from OUTL/OUTH
|
|
; then print following string to that address
|
|
; stop at NUL
|
|
; convert to APPLE ASCII (or with 0x80)
|
|
; leave OUTL/OUTH pointing to next string
|
|
|
|
move_and_print:
|
|
ldy #0
|
|
lda (OUTL),Y
|
|
sta CH
|
|
iny
|
|
lda (OUTL),Y
|
|
asl
|
|
tay
|
|
lda gr_offsets,Y ; lookup low-res memory address
|
|
clc
|
|
adc CH ; add in xpos
|
|
sta BASL ; store out low byte of addy
|
|
|
|
lda gr_offsets+1,Y ; look up high byte
|
|
adc DRAW_PAGE ;
|
|
sta BASH ; and store it out
|
|
; BASH:BASL now points at right place
|
|
|
|
clc
|
|
lda OUTL
|
|
adc #2
|
|
sta OUTL
|
|
lda OUTH
|
|
adc #0
|
|
sta OUTH
|
|
|
|
;================================
|
|
; print_string
|
|
;================================
|
|
|
|
print_string:
|
|
ldy #0
|
|
print_string_loop:
|
|
lda (OUTL),Y
|
|
beq done_print_string
|
|
ora #$80
|
|
sta (BASL),Y
|
|
iny
|
|
bne print_string_loop
|
|
done_print_string:
|
|
iny
|
|
clc
|
|
tya
|
|
adc OUTL
|
|
sta OUTL
|
|
lda OUTH
|
|
adc #0
|
|
sta OUTH
|
|
|
|
rts
|