RosettaCodeData/Task/Binary-strings/8086-Assembly/binary-strings-2.8086

12 lines
295 B
Plaintext

;this code assumes that ES points to the correct segment.
cld
mov di,offset TestMessage
mov al,'o' ;the byte we wish to check
mov cx,5 ;len(Test)
repnz scasb ;scan through the string and stop if a match is found.
;flags will be set accordingly
ret
TestMessage byte "Hello"