Answer to Question #165547 in Assembler for Vera

Question #165547

How to definition data in MIPS?


1
Expert's answer
2021-02-21T19:49:26-0500

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


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS