Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly language Search Words with meanings in Array of String.

Status
Not open for further replies.

danbhi

Programmer
Mar 13, 2021
1
0
0
PK
I know in Dictionary program we can search any word and find meaning but in my project I want to add some words with their meanings (before execution). when program run it ask the user to enter the word for search meaning of that pre-defined word that is already saved( maybe in array of string or any file).when user enter the word program search that word and display that word with meaning to user if exist otherwise it says not found..

here is my code help me please to find meaning

.model small
.stack 100h
.data
CLASS DB "Aftab","Ahmad"
DB 'Hello','gbolo'
DB 'afraz','altaf'
DB 'nagin','cobra'
DB 'happy','joy '
invalid db 10,13,10,13,10,13,"Invalid input$"
choice db 10,13,10,13,"Enter Choice",63,10,13,"$"
menu db 10,13,10,13,10,13," ",4,4,4,4,4," Welcome IN English Urdu Dictionary ",4,4,4,4,4,10,13,10,13,10,13,"$"
op1 db 10,13, "Press 1 for find meaning",63,"$"
op2 db 10,13, "Press 2 for display Dictionary$"
op3 db 10,13, "Press 3 for Agian$"
op4 db 10,13, "Press 4 for Exit$"
op5 db 10,13,10,13,10,13,10,13,10,13,"-------------------------------$"
.code
main proc
start:
mov ax,@data
mov ds,ax
mov dx,offset menu
mov ah,9
int 21h

mov dx,offset op1
mov ah,9
int 21h

mov dx,offset op2
mov ah,9
int 21h

mov dx,offset op3
mov ah,9
int 21h

mov dx,offset op4
mov ah,9
int 21h


mov dx,offset op5
mov ah,9
int 21h


mov dx,offset choice
mov ah,9
int 21h

mov ah,1
int 21h

cmp al,'1'
call Dictionary
cmp al,'2'
je start
cmp al,'3'
je start
cmp al,'4'
je exit




mov dx,offset invalid
mov ah,9
int 21h

Dictionary proc
..?
..?
..?





end Dictionary

exit:
mov ah,4ch
int 21h

main endp
end main




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top