0

Hello all, i really need help with this program, i am a brand new assembly learner/ noob, i need help with a program that ( promts the user to enter a number between 1-10, then when the user enters a number, if it is less then 5 display message1, if it is 5 diplay message2, if it is from 5-10 diplay message3. that is it, so if anyone would be kind enough to help this would be great!!!!

1
Contributor
2
Replies
3
Views
5 Years
Discussion Span
Last Post by itsmrshow
0
DOSSEG 
.MODEL SMALL 
.STACK 64 
.DATA 
message1 db "your number is between 0-5",0Dh,0Ah,"$" 
message2 db "the number you entered is 5",0Dh,0Ah,"$" 
message3 db "haha your number is between 5-10",0Dh,0Ah,"$" 
.CODE 
MAIN PROC 
. 
. 
. 
. 
. 
main endp 
end main

could someone help fill in this
0

DOSSEG
.MODEL SMALL
.STACK 64
.DATA
message db "Enter a number between 1-10","$"
display1 db "Hello","$"
display2 db "It is Equal","$"
display3 db "its between 5-10","$"
.CODE
MAIN PROC

mov ah, 02
mov dh,10
mov dl,38
mov bh,0
int 10h

mov ah,09
mov dx,offset message
int 21h

mov ah,01
int 21h
sub al,30h
cmp al,5

JL aa

JE bb

jmp ll

ll:
mov ah,09
mov dx,offset display3
int 21h

aa:
mov ah,09
mov dx,offset display1
int 21h

bb:
mov ah,09
mov dx,offset display2
int 21h

mov ax,4c00h
int 21h

MAIN ENDP
END MAIN

This is where i got too, but it wont work... help please!!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.