Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started