home *** CD-ROM | disk | FTP | other *** search
- FILTER:
- SUB DX,DX ;zero characters transferred counter
- SUB AH,AH ;preconvert AL to a word value
- FILTER_LOOP:
- LODSB ;get next character from source buffer
- PUSH BX
- ADD BX,AX ;generate total offset of entry
- MOV AL,[BX] ;look it up in filter table
- POP BX
- AND AL,AL ;is it wanted?
- JZ FILTER_NEXT ;if not, go to next character
- STOSB ;it's wanted, store it in output buffer
- INC DX ;count this character as usable
- FILTER_NEXT:
- LOOP FILTER_LOOP
- RET