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!

need help on simple programming assignment

Status
Not open for further replies.

AClemens

Programmer
Nov 15, 2001
1
0
0
US
i need to write a program in assembly language for a class and i'm pretty stuck. anyone who could help would be a great blessing!
i need to write a program that's a simple guessing game. The program has stored the value 6. The program continually asks the user to enter a number 0 through 9. The user enters the guess from the keyboard.
If the guess is larger than 6, it should output "Too big" & if it is less than 6 it will say "Too small". When the user guesses correctly it will say "Correct! You took # guesses" with the # of guesses the user took. After 9 guesses and the user has not guessed correctly: "Game Over. Correct answer is 6." Don't check for invalid input. If input is not a #: "Invalid Input", which still counts as a guess.

I know i need to use TRAP x20 and .sTRINGZ, but i've never really programmed in assembly before and i really need some direction. thanks! any help?
 
Now what I prithee is your processor? Most of the people here think "Intel x86 asm" also known as "IA16 or IA32 asm." I have no idea what trap and .stringz you are talking about. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top