Link to home
Start Free TrialLog in
Avatar of pauledwardian
pauledwardian

asked on

MIPS Assembly

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
SOLUTION
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of leakim971
Because print_string accept only one argument in $a0 and not in $a1, $a2

http://www.tfinley.net/notes/cps104/mips.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@kozaiwaniec

Did you never call an OS function with assembly? ;-)
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pauledwardian
pauledwardian

ASKER

thanks!