AppleIIAsm-Collection/source/d5_strings/T.MIN.SUB.STRCAT.ASM
nathanriggs 9b12b6fd9b HOUSEKEEPING
- getting ready for major changes for 0.6.0.
- be sure to download the 0.5.0 release to ensure proper functionality, as these rountines will not work together in the SRC or BIN folder during the transition
- Beginning to significantly alter documentation
2019-12-17 17:19:24 -05:00

46 lines
1006 B
NASM

]S1LEN EQU VARTAB+1
]S2LEN EQU VARTAB+3
]INDEX EQU WPAR3
]STR2 EQU WPAR2
]STR1 EQU WPAR1
STRCAT
LDY #0
LDA (]STR1),Y
STA ]S1LEN
LDA (]STR2),Y
STA ]S2LEN
LDA ]S2LEN
CLC
ADC ]S1LEN
STA RETLEN
BCC :DOCAT
LDA #255
STA RETLEN
:DOCAT
LDY #0
:CAT1
INY
LDA (]STR1),Y
STA RETLEN,Y
CPY ]S1LEN
BNE :CAT1
TYA
CLC
ADC #<RETLEN
STA ]INDEX
LDA #0
ADC #>RETLEN+1
STA ]INDEX+1
CLC
LDY #0
:CAT2
INY
LDA (]STR2),Y
STA (]INDEX),Y
CPY RETLEN
BEQ :EXIT
BNE :CAT2
:EXIT
LDA RETLEN
RTS