I'm still kind of new with the whole assembly language and just need some help with this program i'm writing.
What I want it to do is to ask a question -like for a number and then store that inserted number in a variable. And then test whether its bigger than 14 which I declared as a variable already as shown below-and then there is a loop to ask again what is the number. So I want the loop to run as many time the number the user entered.
output db 10,13, "Enter your number: $" asq dw 10,13, "$" ; ascii values for a new line stilltoimplement db 10,13, "Do calculations later on $" .code jmp start number db ? max db 14 ;max number start: mov ax,@data mov ds,ax mov ah,09 ;prints new line mov dx, offset output int 21h mov ah, 01 ;checks for key int 21h mov number, al cmp max,number jg start jl part2 part2: mov ah,09 mov dx,offset stilltoimplement int 21h ending: mov ah,4ch mov al,00 int 21h ;End the program END
It gives me an error in where I try to compare the two variables and says Illegal memory reference. Prob just something small
Any help will be appreciated!
Edited 5 Years Ago by Phillamon: n/a