AppleIIAsm-Collection/source/disk5_strings/T.PRNSTR.SUB.MIN
nathanriggs 82d0e74c1a 0.3.1 updates
some minor bugfixes, directory shuffling, added demo and utility disks
2019-01-26 21:02:17 -05:00

32 lines
747 B
Plaintext

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