Reputation: 19
Hello Im pretty new to Mips and I'm trying to save three 8-bit value and there hex value while including the 0X prefix to make sure they are read as hexadecimal. I made a table of three values I would like to store.
I would like these values to be stored in the .data section, I'm aware I need to use .byte to store them but can't figure out how to store multiple values. I later need to loop through each value. Thank you for any help.
Upvotes: 0
Views: 721
Reputation: 58437
Just separate them by commas:
.data
foo: byte 0x0, 0x1, 0x2
Note that the 0x
prefix is completely unnecessary. 0, 1, 2
would give you exactly the same values. They are just collections of bits, and whether you want to present them to the user as a base10 string or a base16 string at some point is irrelevant.
Upvotes: 1