Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to declare some variables in MIPS(Assembly) and initialize them.I am parsing a C file.I initialize the variables like this:

.data

.text
.globl main

        .align 2
a:      .space 4

main:

#Exit
li $v0,10
syscall

But i don't know how to initialze variable a.I tried to use li,la,add,addi etc but nothing worked right.

share|improve this question
1  
Hello and Welcome to Programmers. Please do not cross post questions from Stack Overflow here. Have a pleasant day. – World Engineer Apr 15 at 19:21

closed as off topic by World Engineer Apr 15 at 19:21

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.