8086 STRING MANIPULATION – SEARCH A WORD
ASSUME CS: CODE,
DS: DATA
DATA SEGMENT
LIST DW 53H, 15H,
19H, 02H
DEST EQU 3000H
COUNT EQU 05H
DATA ENDS
CODE SEGMENT
START: MOV AX, DATA
MOV DS, AX
MOV AX, 15H
MOV SI, OFFSET LIST
MOV DI, DEST
MOV CX, COUNT
MOV AX, 00
CLD
REP SCASW
JZ LOOP
MOV AX, 01
LOOP MOV [DI], AX
MOV AH, 4CH
INT 21H
CODE ENDS
END START
Comments
Post a Comment