วันอังคารที่ 20 สิงหาคม พ.ศ. 2556
repne scasb ค้นหาตัวอักษร
stseg segment para stack
db 64 dup('A');
sttop label word
stseg ends
dtseg segment
str1 db 'Hello,World',0dh,0ah,'$'
str2 db 'Hello,World2',0dh,0ah,'$'
mess1 db 'Found',0dh,0ah,'$'
mess2 db 'Not Found',0dh,0ah,'$'
dtseg ends
cdseg segment
main proc far
assume cs:cdseg,es:dtseg,ds:dtseg,ss:stseg
mov ax,dtseg
mov ds,ax
mov es,ax
mov ax,stseg
mov ss,ax
lea sp,sttop
;-------------------------------------------------------------------
lea di,str1
mov al,'r'
cld
mov cx,14
repne scasb
je found
notfound:
lea dx,mess2
mov ah,9
int 21h
jmp done
found:
lea dx,mess1
mov ah,9
int 21h
jmp done
done:
;-------------------------------------------------------------------
mov ah,4ch
int 21h
main endp
cdseg ends
end main
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น