|
May we use subroutines in our solution to part B? May we use the stack? |
You may use any method that was taught in class, including subroutines and the stack, but remember that we will decrease points if you use it wrong.
|
Can the program change the given array?
For example, changing the 1 bytes into 0's. |
Yes.
|
Does the number of ships must be exactly the same as in the table
which is on page 4 of the exercise? |
Yes. The numbers and sizes of the ships are given as constants.
|
What would an example board look like? |
Board: .word line1, line2,....line10. line1: .byte 1,0,1,.... line2: .byte 0,0,0,.... .... line10: .byte 1,1,1....
|
Is the use of subroutines allowed in this exercise? |
You are not supposed to use subroutines in this exercise, but only loops and branches. If you feel that using subroutines will help you, you may do that, but notice that you have to do it right! This means- don't forget to make sure everything that goes in the stack is also removed from it, make sure that you document every subroutine, including all its parameters, and so on.
|
|