问题描述
我在MIPS是新尝试使用自学<一个href=\"https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CD8QFjAA&url=http://www.cse.buffalo.edu/~shambhu/cse34113/handouts/britton-mips-tutorial.pdf&ei=w5f0UYLgJJC08QSl8YHQBg&usg=AFQjCNG6BVXpFK5nMjqwbFJviy9XdSUI6g&sig2=z0KJQBDGPftOg4TyHHrhqw&bvm=bv.49784469,d.eWU\"相对=nofollow>这本书。我想了解的数据和指令是什么这三者之间的区别:
列表:.word 0:3
清单:.word 3
清单:.word
但我没有找到任何明确的文件/参考。
感谢您。
列表:.word 0:3
会预留3个字,并设置每个为值 0
。这将类似于
INT表[3] = {0,0,0};
或者
清单:12。空间
(在这种情况下,该值为隐0)
在0'0:3'可以有很好是任何其它值。例如:
列表:.word'X':3
# 要么
清单:.word 88:3
当缺少的元素数,它只是在字的值
列表:.word 3
这是类似
INT表= 3;
最后一个,
列表:.word
将有可能导致装配抱怨为丢失的操作。
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: .word 0:3
list: .word 3
list: .word
But I didn't find any clear document/reference.
Thank you.
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.
这篇关于MIPS指令数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!