ALP to find "FEH" in block of data byte

TITLE "to find FEH"

ASSUME CS:CODE
CODE SEGMENT
START:MOV AX,3000H ;BLOCK STARTS AT 3000:2240H
MOV ES,AX
MOV SI,2230H
MOV DI,2240H
MOV AX,2000H ;LENGTH OF BLOCK IS AT 2000:2240H & 2000:2241H
MOV DS,AX
MOV CX,DS:[DI]
MOV AL,0FEH ;TO FIND FEH
REPNE SCASB ;SCAN EACH BYTE OF ES
JNZ NF
MOV DS:[SI],00H ;CLEAR IF FEH IS FOUND
JMP L1
NF:MOV DS:[SI],0FFH ;SET IF NOT FOUND
L1:MOV AH,4CH
INT 21H
CODE ENDS
END START
Previous
Next Post »