Hi Guys,
Can you help me on this assembly language code. The user will input words in a databank then the user can search a word. If search word is found, it will promt "word is found" and if not "word not found. Im having problem in the compare line.
e200 "Write word in the Databank: $"
e220 "Search a word: $"
e270 "successfully save! $"
e235 "word found! $"
e250 "word not found! $"
a100
mov ah,09
mov dx,200
int 21
mov bx, 0300 ;allocate memory for 1st input in the databank
mov ah, 01
int 21
mov [bx], ax ;loop start
inc bx ;increment by 1
cmp al, 0d ;if enter was hit
jne 10a
mov ch, 24
mov [bx], ch
mov ah, 02
mov dl, 0A
int 21
mov dl, 0d
int 21
mov ah, 09 ;succecfully save in the bank!
mov dx, 270
int 21
mov ah, 09 ;display the 1st word at memory 300
mov dx, 0300
int 21
mov ah, 02 ;enter next line
mov dl, 0A ;\
int 21 ;\
mov dl, 0d ;\
int 21 ;\
mov ah, 09 ;display enter a word ulet
mov dx, 200
int 21
mov bx, 0320 ;allocate memory for 2nd input in the databank
mov ah, 01
int 21
mov [bx], ax ;loop start
inc bx ;increment by 1
cmp al, 0d ;if enter was hit
jne 145
mov ch, 24
mov [bx], ch ;ch for 2nd word
mov ah, 02
mov dl, 0A
int 21
mov dl, 0d
int 21
mov ah, 09 ;succecfully save in the bank!
mov dx, 270
int 21
mov ah, 09 ;display the 2nd word at memory 320
mov dx, 0320
int 21
mov ah, 02 ;enter next line
mov dl, 0A ;\
int 21 ;\
mov dl, 0d ;\
int 21 ;\
mov ah, 09 ;search word
mov dx, 220
int 21
mov bx, 400 ;------------allocate for memory for search
mov ah, 01
int 21
mov [bx], ax
inc bx
cmp al, 0d ;if enter was hit
jne 180
mov al, 24
mov [bx], al
mov ah, 02 ;next line
mov dl, 0A ;\
int 21 ;\
mov dl, 0d ;\
int 21 ;
cmp ch, al
cmp cl, al
jne 01c4
mov ah, 09 ;compare if not word found
mov dx, 250
int 21
int 20
mov ah, 09 ;compare if word found
mov dx, 235
int 21
int 20