Sw vs. sh - Usage in public tests

The project description states that

each single space in the playing field is represented by an unsigned halfword

(section 3.1 Tile Representation).

The public tests for move_one and move_left use sw to store entries into the buffer that is then given to the subprocedure to operate on. This strikes me as an oddity. Does it make any difference to using sh instead?

(In case you are wondering for my motivation to ask this, I keep failing these tests and I am out of my wits to find my mistake.)

If u look closely it states that the buffer is used to store addresses which are stored as words not halfwords. Hope I could help you out

2 Likes