How to definition data in MIPS?
Data Definitions
You can define variables/constants with:
.word : defines 32 bit quantities.
.byte: defines 8 bit quantities
.asciiz: zero‐delimited ascii strings
.space: allocate some bytes
Directives for declaring 32- and 64-bit floating-point data:
.float
.double
Data Examples
.data
prompt: .asciiz “HELLO”
msg: .asciiz “The answer is ”
x: .word 0
y: .word 0
str: .space 100
float_X: .float 4.0
double_Y: .double 4.0
Comments
Leave a comment