Question: Use tool 'MARS' to Solve the problem: Download third.asm and macro.asm in a same directory. Add the following macro in this macro.asm : lwi ($reg,
Use tool 'MARS' to Solve the problem:
Download third.asm and macro.asm in a same directory.
Add the following macro in this macro.asm:
lwi ($reg, $ui, $li) : This macro takes two 16-bit immediate values $ui and $li and put them into higher bits and lower bits of $reg. For example lwi($s1, 0x5a5a, 0xa5a5) will place a value 0x5a5aa5a5 into $s1 register.
Assemble and execute third.asm. This should create following sample output Register S1 contains integer number 1515890085
============================================================
The given .asm document is as follow: macro.asm:


third.asm:

=================================================================
All the information are already shown above, just need help with the macro in macro.asm.
Please help, thank you!
-- MACRO DEFINITIONS ------ -----------> # Macro : print_str # Usage: print_str(
) .macro print_str($arg) $v0, 4 # System call code for print str Sal, $arg # Address of the string to print syscall # Print the string .end_macro li la # Macro : print_int # Usage: print_int (Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
