As anyone can see I'm a newbe in assembly. I'm just trying to learn a bit and practicing. My problem right now is that I just created a program that allows me to enter any number from 1 to 5 and once I enter it the program will display the number I entered but instead of a number it will say the word. For example if I enter 5 it will the number you entered is "five". I know how to display it in number but I'm having a hard time trying to display it in words. Any help will be appreciated. My code is the following:
-------begin code---------
.model small
.stack 100h
.data
Number db ?
message1 db "Enter a number from 1 to 5:$ "
message2 db " The word is [$ "
message3 db " Enter another number from 1 to 5:$ "
message4 db " The word is [$ "
.code
main proc
mov ax,@data
mov ds,ax
mov dx,offset message1
mov ah,9
int 21h
mov ah,1
int 21h
mov number,al
mov dx,offset message2
mov ah,9
int 21h
mov ah,2
mov dl,number
int 21h
mov ah,2
mov dl,']'
int 21h
mov dx,offset message3
mov ah,9
int 21h
mov ah,1
int 21h
mov number,al
mov dx,offset message2
mov ah,9
int 21h
mov ah,2
mov dl,number
int 21h
mov ah,2
mov dl,']'
int 21h
mov ax,4c00h
int 21h
main endp
end main
--------- end of code ------------
-------begin code---------
.model small
.stack 100h
.data
Number db ?
message1 db "Enter a number from 1 to 5:$ "
message2 db " The word is [$ "
message3 db " Enter another number from 1 to 5:$ "
message4 db " The word is [$ "
.code
main proc
mov ax,@data
mov ds,ax
mov dx,offset message1
mov ah,9
int 21h
mov ah,1
int 21h
mov number,al
mov dx,offset message2
mov ah,9
int 21h
mov ah,2
mov dl,number
int 21h
mov ah,2
mov dl,']'
int 21h
mov dx,offset message3
mov ah,9
int 21h
mov ah,1
int 21h
mov number,al
mov dx,offset message2
mov ah,9
int 21h
mov ah,2
mov dl,number
int 21h
mov ah,2
mov dl,']'
int 21h
mov ax,4c00h
int 21h
main endp
end main
--------- end of code ------------