MIPS Assembly

pauledwardian
pauledwardian used Ask the Experts™
on
How Can I print 2 more string on this code:

la $a0, hello_msg
        li $v0, 4
        syscall


Why I cannot do it like this: !!! Loading the address into 3 differant addresses and then Calling the print_string()??? Please explain clearly....

la $a0, hello_msg1
la $a1, hello_msg2
la $a2, hello_msg3

        li $v0, 4
        syscall
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Kyle HamiltonData Scientist
Most Valuable Expert 2014
Commented:
im not an expert by any means, but assembly doesnt have highlevel functions like print_string(). are you writing this in C and compiling to assembly?

i probably cant help you, but i hope you dont mind if i tag along on this question.
leakim971Multitechnician
Top Expert 2014

Commented:
Because print_string accept only one argument in $a0 and not in $a1, $a2

http://www.tfinley.net/notes/cps104/mips.html
Kyle HamiltonData Scientist
Most Valuable Expert 2014
Commented:
haha, I thought you were referring to an an actual MIPS microprocessor. But you're talking about a language called MIPS, which by the way, is not assembly, but more like C.

:)
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

leakim971Multitechnician
Top Expert 2014

Commented:
@kozaiwaniec

Did you never call an OS function with assembly? ;-)
Data Scientist
Most Valuable Expert 2014
Commented:
no... that's why I was confused, and wanted to see the outcome of this question.

I did a little assembly using just a small instruction set on the PIC16 microcontroller to make an LED matrix display some messages, but that's the extent of my experience - doh! :)

Thanks.

Author

Commented:
thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial