2020-06-18 15:28:30 -04:00
|
|
|
lblfind BSET
|
2020-06-18 15:01:04 -04:00
|
|
|
( find word the same name as str in SI starting from tip in
|
|
|
|
DI. Returns wordref in DI. Z if found, NZ if not. )
|
|
|
|
CH CH XORrr, CL [SI] MOVr[], ( CX -> strlen )
|
|
|
|
SI INCx, ( first char ) AX AX XORxx, ( initial prev )
|
|
|
|
BEGIN, ( loop )
|
|
|
|
DI AX SUBxx, ( jump to prev wordref )
|
|
|
|
AL [DI] -1 MOVr[]+, ( strlen )
|
|
|
|
CL AL CMPrr, IFZ, ( same len )
|
|
|
|
SI PUSHx, DI PUSHx, CX PUSHx, ( --> lvl 3 )
|
|
|
|
3 ADDALi, ( header ) AH AH XORrr, DI AX SUBxx,
|
2020-06-19 20:09:51 -04:00
|
|
|
CLD, REPZ, CMPSB,
|
2020-06-18 15:01:04 -04:00
|
|
|
CX POPx, DI POPx, SI POPx, ( <-- lvl 3 )
|
2020-06-19 20:09:51 -04:00
|
|
|
IFZ, RETn, THEN,
|
2020-06-18 15:01:04 -04:00
|
|
|
THEN,
|