How can I declare an array at memory location 100(Decimal) in a MIPS program?
相关问题
- How to get the maximum of more than 2 numbers in V
- Faster loop: foreach vs some (performance of jsper
- Convert Array to custom object list c#
- pick a random item from a javascript array
- Newtonsoft DeserializeXNode expands internal array
相关文章
- Numpy matrix of coordinates
- Why are memory addresses incremented by 4 in MIPS?
- PHP: Can an array have an array as a key in a key-
- Accessing an array element when returning from a f
- How can I convert a PHP function's parameter l
- How to make a custom list deserializer in Gson?
- Recursively replace keys in an array
- React Native - Dynamic Image Source
The
spim
simulator supports the optionaldata
directive argument as detailed here.Therefore, using
spim
, you can store any data at an exact address as long as it is within the range of the user data segment. Inspim
, the reserved range is0x10000000 - 0x10040000
.So, for example, if you wanted to store an array at address
0x10000030
you would write:However, address
100
is not within the acceptable range for thespim
simulator's user data segment (or probably in any other circumstance since it would be part of the first page of memory).I tried a
.data 100
directive inspim
, just to see what it would do when I tried to load from it, and the answer is aMemory address out of bounds
error.