Question: CDA3100 - SUMMER 2018 ASSIGNMENT 6 SUDOKU Objectives: Learn how to write an assembly program that consists of functions, learn the MIPS calling conventions, and
CDA3100 - SUMMER 2018 ASSIGNMENT 6 SUDOKU
Objectives:
Learn how to write an assembly program that consists of functions, learn the MIPS calling conventions, and learn how to access a two-dimensional array in assembly language. This will also be an exercise in gaming and game strategy solutions.
The Classic Sudoku is a number placing puzzle based on a 9x9 grid with several given numbers. The object is to place the numbers 1 to 9 in the empty squares so that each row, each column and each 3x3 box contains the same number only once. The following is an example of a valid Sudoku puzzle.
Write in mips, and make sure it runs on QTSPIM
| 2 | 7 | 1 | 9 | 5 | 4 | 6 | 8 | 3 |
| 5 | 9 | 3 | 6 | 2 | 8 | 1 | 4 | 7 |
| 4 | 6 | 8 | 1 | 3 | 7 | 2 | 5 | 9 |
| 7 | 3 | 6 | 4 | 1 | 5 | 8 | 9 | 2 |
| 1 | 5 | 9 | 8 | 6 | 2 | 3 | 7 | 4 |
| 8 | 4 | 2 | 3 | 7 | 9 | 5 | 6 | 1 |
| 9 | 8 | 5 | 2 | 4 | 1 | 7 | 3 | 6 |
| 6 | 1 | 7 | 5 | 9 | 3 | 4 | 2 | 8 |
| 3 | 2 | 4 | 7 | 8 | 6 | 9 | 1 | 5 |
Specifications:
1. There will be 2 test files:
a. puzzle1.dat # Valid Puzzle.
b. puzzle2.dat # Invalid Puzzle
2. Use the sample code provided to read in the file name, open the file, and read the file into a character array.
3. The file will consist of 81 consecutive integer numbers separated by one space.
a. The first set of 9 numbers will be row 1st, the second set of 9 numbers will be the 2nd row, the third set of 9 numbers will be the 3rd Row, etc.
b. You can assume that the file will be correct and have exactly 81 numbers with no invalid integers ( i.e. less than 0 or greater than 9).
4. Your Program must incorporate the following:
a. parameter passing and return values
b. preserving register values, as presented in class
c. In addition, you should not have any conditional branch instructions that cross function boundaries.
d. A comment beside each instruction is required in the assembly program (or at a minimum a comment for a small group of related instructions) to help make your code more understandable. You should also have comments at the top of the file indicating your name, this course, and the assignment.
5. Your program must indicate whether the file that was submitted represents a valid solution, or whether there is an error in the row, column, and/or 3x3 quadrant.
Grading
In order to be graded the program must assemble and allow the grader to start the program.
- 10% - Proper declaration of the 2d array and references the array properly
- 10% - Program properly documented
- Contains comments that identifies the programmer - Contains comments that describe how the program works.
- 25% - Program is modular.
~ Has functions with at least one instance of passing parameters using standard calling conventions and preserving registers.
~ Has functions with at least one instance of returning a value using standard calling conventions and preserving registers - 55% - Correct implementation.
~ 10% Identifies valid files and continues to ask for a valid false
~ 15% Identifies valid Sudoku solutions
~ 30% Identifies errors with individual errors in Rows, Columns, or 3x3 Quadrants

input.dat File

Sample Output: puzzlel.dat file 1112131415161718191 14151617181911 12131 71819111213141516 121311151614191718 1516141819171311121 81917121311161415 131112161415181917 614151917181213111 91718131112151614 Valid Sudoku Puzzle Sample Output: puzzlel.dat file 1112131415161718191 14151617181911 12131 71819111213141516 121311151614191718 1516141819171311121 81917121311161415 131112161415181917 614151917181213111 91718131112151614 Valid Sudoku Puzzle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
