Question: -in the part 2 assembly language program, instead of assuming that the user will guess the number in at most 9 guesses, write your program

-in the part 2 assembly language program, instead of assuming that the user will guess the number in at most 9 guesses, write your program to accurately report the number of guesses even if that number is higher than 9. For instance, if it takes the user 12 guesses can you construct your program to accurately handle that and report that it took 12 guesses?

-in the part 2 assembly language program, instead

2. Write an assembly language program to simulate a simple guessing game. The program has stored the value 4 . The program will continually ask the user to guess a number between 0 and 9 (see sample program input/output below.). If your program encounters any non-digit character, the program should output 'Invalid input'. Invalid input should still count as a guess. You can use "ln" in your strings (.STRINGZ) to make the prompt start on a newline. Name your file GuessingGame.asm. Assume that the user gets it right within 9 guesses. Sample Output Guess a number: 3 Too small. Guess again: 9 Too big. Guess again: a Invalid input. Guess again: 4 Correct! You took 4 guesses

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!