
4-40
x86 MICROPROCESSORS
MOV AH, 09
INT 21H ;display message
MOV DL, CL ;move count to DL
MOV AH, 06 ;display the count
INT 21H
.EXIT
END
The output of the Example 4.27 for a string and the character ‘t’, entered through the
keyboard, is shown below.
ENTER THE CHARACTER: t
ENTER THE STRING: tyu8iolhttttfeerttt
NUMBER OF OCCURENCES: 8
C:\masm6.14\BIN>
Now that we have seen the use of the high level language constructs, it is obvious that
many of our previous programs can be re-written using these constructs.
KEY POINTS OF THIS CHAPTER
l String instructions are used to simplify coding when bulk data is moved, scanned and
compared.
l