Question: Templates: PA01: .include ./macro.asm ## ## .data msg1: .asciiz Please enter a number? msg2: .asciiz You have entered # newline: .asciiz

Templates:
PA01:
.include "./macro.asm"
## ## .data msg1: .asciiz "Please enter a number? " msg2: .asciiz "You have entered # " newline: .asciiz " " ## .text .globl main main: print_str(msg1) read_int($t1) print_str(msg2) print_reg_int($t1) print_str(newline) exit
macro.asm:
## # Macro : print_str # Usage: print_str(
) .macro print_str($arg) li $v0, 4 # System call code for print_str la $a0, $arg # Address of the string to print syscall # Print the string .end_macro # 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
