fix dirent string compare

This commit is contained in:
Kelvin Sherlock 2015-08-26 09:09:44 -04:00
parent 6e51766769
commit 20f5a81517
1 changed files with 11 additions and 10 deletions

View File

@ -808,7 +808,7 @@ strcmp procname
; check if the name is even possible... ; check if the name is even possible...
with dp with dp, data
import target:GSString32 import target:GSString32
@ -824,8 +824,9 @@ strcmp procname
adc io_buffer+2 adc io_buffer+2
sta ptr+2 sta ptr+2
ldx target.length
ldy #0 ldy #0
ldx target.length
short m short m
; y = offset ; y = offset
@ -835,21 +836,21 @@ loop
beq eos beq eos
cmp target.text,y cmp target.text,y
bne no8 bne no8
iny iny
dex dex
bne loop bpl loop
eos
long m long m
; if y == target.length, this is a match.
cpy target.length
bne no
yes yes
;~DebugSetTrace #0 ;~DebugSetTrace #0
clc clc
rts rts
eos
long m
; end of string. if x = 1, it's a match!
dex
beq yes
no8 no8
long m long m