2018-12-23 01:35:05 +00:00
|
|
|
PRNSTR
|
|
|
|
PLA
|
|
|
|
STA RETADR
|
|
|
|
PLA
|
|
|
|
STA RETADR+1
|
|
|
|
PLA
|
2019-01-21 18:27:30 +00:00
|
|
|
STA ADDR1 ; ADDRESS OF STRING
|
2018-12-23 01:35:05 +00:00
|
|
|
PLA
|
|
|
|
STA ADDR1+1
|
|
|
|
LDY #0
|
2019-01-21 18:27:30 +00:00
|
|
|
LDA (ADDR1),Y ; GET STRING LENGTH
|
2018-12-23 01:35:05 +00:00
|
|
|
STA :S1LEN
|
|
|
|
:LP
|
|
|
|
INY
|
2019-01-21 18:27:30 +00:00
|
|
|
LDA (ADDR1),Y ; GET CHARACTER
|
|
|
|
JSR SCOUT1 ; PRINT CHARACTER TO SCREEN
|
|
|
|
CPY :S1LEN ; IF Y < LENGTH
|
2018-12-23 01:35:05 +00:00
|
|
|
BNE :LP
|
2019-01-21 18:27:30 +00:00
|
|
|
; LOOP; ELSE
|
2018-12-23 01:35:05 +00:00
|
|
|
LDY #0
|
|
|
|
LDA (ADDR1),Y
|
|
|
|
LDA RETADR+1
|
|
|
|
PHA
|
|
|
|
LDA RETADR
|
|
|
|
PHA
|
|
|
|
LDY #0
|
2019-01-21 18:27:30 +00:00
|
|
|
LDA (ADDR1),Y ; STRING LENGTH IN A
|
2018-12-23 01:35:05 +00:00
|
|
|
LDY ADDR1
|
2019-01-21 18:27:30 +00:00
|
|
|
LDX ADDR1+1 ; ADDRESS IN Y,X
|
2018-12-23 01:35:05 +00:00
|
|
|
RTS
|
|
|
|
:S1LEN DS 1
|