Dr. Dobb's Journal November 1997
(a)
0x00 ABANDON
0x01 AGAIN
0x02 AGAIN
...
'w' AGAIN
'x' COMPLETED
'y' AGAIN
...
(b)
for (;;) {
NextCh = *pText++;
Action = pState[NextCh];
switch (Action) {
case AGAIN: continue;
case COMPLETED: return TRUE;
case ABANDON: return FALSE;
}
}
(c)
AGAIN: lodsb ; Address 0
xlat
jmp ax
COMPLETED: mov ax,1 ; Address 4
ret
ABANDON: mov ax,0 ; Address 8
ret