mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 17:28:06 +11:00
15 lines
516 B
Plaintext
15 lines
516 B
Plaintext
|
L4 BSET PC 3 - ORG @ 4 + ! ( find )
|
||
|
( find word the same name as str in SI starting from tip in
|
||
|
BX. Returns wordref in BX. Z if found, NZ if not. )
|
||
|
CH CH XORrr, CL [SI] MOVr[], ( CX -> strlen )
|
||
|
SI INCx,
|
||
|
AX AX XORxx, ( initial prev )
|
||
|
BEGIN, ( inner )
|
||
|
BX AX SUBxx, ( jump to prev wordref )
|
||
|
BX DECx, AL [BX] MOVr[], ( strlen )
|
||
|
CL AL CMPrr, IFZ, BX INCx, RETn, THEN,
|
||
|
BX DECx, BX DECx, AX [BX] MOVx[], ( prev )
|
||
|
AX AX ORxx,
|
||
|
JNZ, AGAIN,
|
||
|
BEGIN, JMPs, AGAIN,
|