4 .ascii "\n Hello! you are about to play the mastermind"
5 .ascii " guessing and logic game,Bulls & Cows!\n"
6 .ascii "The Computer will generate a secret number made of 4 unique"
7 .ascii " integer numbers. You have to guess the number!\n"
8 .ascii "Using the number of Bulls and Cows you get to find out what"
9 .asciiz " the secret number is!\n"
12 .ascii "\nEvery digit you enter that is both correct and in the right"
13 .ascii " location is a BULL. When you get 4 BULLS, YOU WIN!\n\n"
14 .ascii "Every digit you enter that is correct, but not in the right"
15 .asciiz " location is a COW!\n"
19 .ascii "YES - if you are ready to guess\n"
20 .ascii "NO - to see the rules again\n"
21 .asciiz "Cancel - to exit the Game\n"
24 .asciiz "\nEnter your game choice\n"
30 # show intro and rules
41 # ask user to select an action (i.e. enter data, reread rules, exit program)
47 # the return is in a0: 0=yes, 1=no, 2=cancel
52 # ask user for the next game input
53 # NOTE: this is a prompt for an integer number
59 beq $a1,-1,main_asknum # syntax error
60 beq $a1,-2,main_confirm # cancel
61 beq $a1,-3,main_asknum # ok, but no data
63 jal do_something # do something with the number in a0 ...
71 # do_something -- process user's input
74 # a0 -- number the user entered