AppleIIAsm-Collection/disks/disk5_strings/T.STRCMP.MIN

47 lines
788 B
Plaintext
Raw Normal View History

*
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