mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-27 12:49:27 +00:00
82d0e74c1a
some minor bugfixes, directory shuffling, added demo and utility disks
32 lines
747 B
Plaintext
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
|