AppleIIAsm-Collection/disks/disk5_strings/T.STRCMP.MIN
nathanriggs 16c1731e54 Strings 0.2.0 update
- bugfixes
- implemented required library
- commenting updates
- .min of every routine
2018-12-22 20:35:05 -05:00

47 lines
788 B
Plaintext

*
STRCMP
*
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA ADDR2
PLA
STA ADDR2+1
PLA
STA ADDR1
PLA
STA ADDR1+1
LDY #0
LDA (ADDR1),Y
CMP (ADDR2),Y
BCC :BEGCMP
LDA (ADDR2),Y
:BEGCMP
TAX
BEQ :TSTLEN
LDY #1
:CMPLP
LDA (ADDR1),Y
CMP (ADDR2),Y
BNE :EXIT
INY
DEX
BNE :CMPLP
:TSTLEN
LDY #0
LDA (ADDR1),Y
CMP (ADDR2),Y
:EXIT
LDA RETADR+1
PHA
LDA RETADR
PHA
LDY #0
LDA (ADDR1),Y
TAX
LDA (ADDR2),Y
TAY
RTS