[A82] Re: porting iondetect to the ti82
[Prev][Next][Index][Thread]
[A82] Re: porting iondetect to the ti82
Ahh, so thats what it does (find_next does copy the name to OP1 IIRC).
I had a look a your code (just having a bit of fun, haven't coded Z80 in a
while). I think the code below does the same thing, but should be a bit
faster.
AceDetect:
call FIND_NEXT
ret c
inc de
inc de
push ix
pop hl
ex de,hl
call StrCmp
jr nz,AceDetect
ret
strcmp:
ld a,(de)
or a
ret z
cp (hl)
ret nz
inc hl
inc de
jr strcmp
(Swapped hl and de in strcmp to make it faster, and simplified AceDetect).
If strcmp is only used for this function it could probably be made slightly
smaller by moving the inc hl to the beginning and removing one inc de in
AceDetect.
Dines
--
Dines Justesen
References: