AppleIIAsm-Collection/source/disk5_strings/T.PRNSTR.SUB.MIN

32 lines
747 B
Plaintext
Raw Normal View History

PRNSTR
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA ADDR1 ; ADDRESS OF STRING
PLA
STA ADDR1+1
LDY #0
LDA (ADDR1),Y ; GET STRING LENGTH
STA :S1LEN
:LP
INY
LDA (ADDR1),Y ; GET CHARACTER
JSR SCOUT1 ; PRINT CHARACTER TO SCREEN
CPY :S1LEN ; IF Y < LENGTH
BNE :LP
; LOOP; ELSE
LDY #0
LDA (ADDR1),Y
LDA RETADR+1
PHA
LDA RETADR
PHA
LDY #0
LDA (ADDR1),Y ; STRING LENGTH IN A
LDY ADDR1
LDX ADDR1+1 ; ADDRESS IN Y,X
RTS
:S1LEN DS 1