I\'m new in MIPS and trying to teach myself using this book. I\'m trying to learn data directive and what are the difference between these three :
list:
list: .word 0:3
Will reserve 3 words and set each to the value 0
. This would be similar to:
int list[3] = {0, 0, 0};
Or
list: .space 12
(In which case, the value is implicitly 0).
The 0 in '0:3' could have very well be any other value. For example:
list: .word 'X':3
# or
list: .word 88:3
When the number of elements is missing, it's simply the value of the word
list: .word 3
Which is similar to
int list = 3;
The last one,
list: .word
Will likely cause assemblers to complain for the missing operand.