Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to ask how I can declare a string variable without initialization in MIPS assembly?

for example:
string judge;
Posted
Comments
Suvendu Shekhar Giri 30-Oct-15 1:58am    
As far I know, there is no such keyword like "string" in MIPS.

Declare a data storage reserving the amount of memory (max. string length). You did not specify the assembler you are using but according to http://logos.cs.uic.edu/366/notes/mips%20quick%20tutorial.htm[^] it might be:
            .data
string1:    .space    40    # max. length for string1 is 40 chars
 
Share this answer
 
See http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Mips/dataseg.html[^], or the documentation for whichever assembler you are using.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900