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

12 lines
295 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
;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"