รับ string แล้วนำไปเปรียบเทียบ โปรแกรมนี้ยังไม่ work แต่เกือบแล้ว
Size:1055 Byte Create: 17/2/2548 Time: 17:38:17

; when get 4 string
; will show 4 string
.model small
.data
vpar label byte
vmax db 5
vlen db ?
v db 5 dup('.'),'$'
l db 13,10,'====',13,10,'$'
pass db 'bye','$'
.386
.code
pmain proc far
push ds ; 1 of 5 line required for end .exe
mov ax,0 ; 2 clear ax by xor ax,ax
push ax ; 3 send ax to stack
mov ax,@data
mov ds,ax
mov es,ax
start:
mov ah,0ah
lea dx,vpar
int 21h
test vlen,0ffh
jz bye
mov ah,09h
lea dx,l
int 21h
mov ah,09h
lea dx,v
int 21h
cmps v,pass
jne start
bye: ret ; Can not use int 20h
pmain endp
.stack 200h ; not required
end pmain