1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 22:28:06 +11:00
collapseos/blk/459
Virgil Dupras 25a35cf28e Move 8086 boot code from B800 to B440
That slims down blkfs a lot.
2020-09-21 20:09:42 -04:00

17 lines
707 B
Plaintext

CODE _find ( cur w -- a f ) 2 chkPS,
SI POPx, ( w ) DI POPx, ( cur )
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[]+, 0x7f ANDALi, ( strlen )
CL AL CMPrr, IFZ, ( same len )
SI PUSHx, DI PUSHx, CX PUSHx, ( --> lvl 3 )
3 ADDALi, ( header ) AH AH XORrr, DI AX SUBxx,
CLD, REPZ, CMPSB,
CX POPx, DI POPx, SI POPx, ( <-- lvl 3 )
IFZ, DI PUSHx, AX 1 MOVxI, AX PUSHx,
JMPn, lblnext @ RPCn, THEN,
THEN,
DI 3 SUBxi, AX [DI] MOVx[], ( prev ) AX AX ORxx, ( cont. )