Wording question - Row Representation


I’m currently doing the last task of the project but through attempts at explanation that I wanted to give to some fellow students, I’m not sure about a wording in the PDF.
I’m almost sure that I’ve understood it correctly since my public/daily tests pass, but I wanted to ask anyways, also for my fellow students:

The wording I’m talking about is:
“1. $a0 – Base address of an array of addresses representing a row”.

This can be understood in two different ways:

  1. It’s an array, representing the fields of one single row where the current action happens. This array contains not the direct values of the playing fields but their addresses.
  2. It’s an array, representing all rows/the whole playing field. It contains the base addresses of every row.

Both interpretations are completely different but possible. My understanding is the first one and my self-written tests and the pub/daily tests seem to confirm my understanding so far. But maybe a public confirmation/correction would be very helpful for some stressed programmers here xD :smiley:

Thanks in advance

1 Like

You are right.
You get the base address, of an array containing the addresses, where the values of the row are stored.
Here, you can find the slides of the project presentation, where it is explained beginning on page 15.


would you please tell me if it is right or wrong…
so like you said, $a0 – Base address of an array of addresses representing a row
so if I want to get the value from this address referred to, then I should do the following tricks?
lw $t0, ($a0) #since the address from $a0 was store in one word?..
lh $t1, ($t0) #since the content was first store in board in halfword?

in this way, we can get the value from the first address? (like the first element from one row)

if we want to get the second element then we do the following steps?

lw $t0, 4($a0)
lh $t1, ($t0)

I am so confused about the buf and board…

1 Like

Yes, you need an offset of 4 bytes to get the next address in the array :slight_smile:
And then you load the half-word from the received address, as you did.

1 Like

okay, I see, thank you soooo much :smile: