.macro Print MessageslStrings (messagehere) #macro, names as PrintMessagesInStrings .data# data segment Message: .asciiz %messagehere space 100...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
.macro Print MessageslStrings (messagehere) #macro, names as PrintMessagesInStrings .data# data segment Message: .asciiz %messagehere space 100 # 100 bytes are reserved for the message text # code segment li Sv0, 4 # code to print strings la $a0, Message #Base address of Message is loaded into $a0 syscall # Print string .end_macro # End of the macro .data # Data segment, it will hold strings, varables, etc. AGE: .word 50 EXP: .word 25 text #code segment, it conatins Op-code/Instructions Main: PrintMessagesInStrings("Welcome To MIPS Prorgamming ... !") PrintMessages.InStrings("\n My name is Dr. Jan") Print MessagesInStrings("\n My age is: " li $v0, 1 # Code in $v0 to print string Iw $a0, AGE # AGE is loaded into $a0 syscall # Print message to Mars Messages Console Stop: PrintMessagesInStrings("\n my expereince in years is: ) li $v0, 1 # Code in Sv0 to print string lw $a0, EXP # EXP is loaded into $a0 syscall # Print message to Mars Messages Console li $v0, 10 # Code to stop simulation syscall 11 Statement: Statement: 1. Change the sample to print your age and experience in floating point formats, e.g., experience: 2.3 years and age 27.5 years. 2. Also, give a new name (any other) to the macro. Code: .macro Print MessageslStrings (messagehere) #macro, names as PrintMessagesInStrings .data# data segment Message: .asciiz %messagehere space 100 # 100 bytes are reserved for the message text # code segment li Sv0, 4 # code to print strings la $a0, Message #Base address of Message is loaded into $a0 syscall # Print string .end_macro # End of the macro .data # Data segment, it will hold strings, varables, etc. AGE: .word 50 EXP: .word 25 text #code segment, it conatins Op-code/Instructions Main: PrintMessagesInStrings("Welcome To MIPS Prorgamming ... !") PrintMessages.InStrings("\n My name is Dr. Jan") Print MessagesInStrings("\n My age is: " li $v0, 1 # Code in $v0 to print string Iw $a0, AGE # AGE is loaded into $a0 syscall # Print message to Mars Messages Console Stop: PrintMessagesInStrings("\n my expereince in years is: ) li $v0, 1 # Code in Sv0 to print string lw $a0, EXP # EXP is loaded into $a0 syscall # Print message to Mars Messages Console li $v0, 10 # Code to stop simulation syscall 11 Statement: Statement: 1. Change the sample to print your age and experience in floating point formats, e.g., experience: 2.3 years and age 27.5 years. 2. Also, give a new name (any other) to the macro. Code:
Expert Answer:
Answer rating: 100% (QA)
To modify the code to print your age and experience in floatingpoint formats you can update the macr... View the full answer
Related Book For
Operating Systems Design And Implementation
ISBN: 9780131429383
3rd Edition
Authors: Andrew Tanenbaum, Albert Woodhull
Posted Date:
Students also viewed these programming questions
-
Find the maximum of (x, y, z) = xyz subject to the constraint g(x, y, z) = 2x + y + 4z = 1.
-
A singly charged ion completes five revolutions in a uniform magnetic field of magnitude 5.00 x 10-2 T in 1.50 ms. Calculate the mass of the ion in kilograms.
-
The state is considering eliminating a railroad grade crossing by building an overpass. The new Structure, together with the needed land, would cost $1.8 million. The analysis period is assumed to be...
-
Sports Consulting Pty Ltd is a company set up by sports and recreation management students to gain experience in running their own business. It had the following data for the year ended 2025....
-
Interview two people about their exercise behavior. In one interview, try to use a semi-structured approach by preparing questions ahead of time and trying to have the respondent complete answers for...
-
Margo, a calendar year taxpayer, paid $1,580,000 for new machinery (seven-year recovery property) placed in service on August 1, 2023. Use Table 7-2. Required: a. Assuming that the machinery was the...
-
Using the 4-quarter moving average: What is the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 2. Compute the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 using exponential smoothing...
-
2. Wally acquires and places in service a new machine (seven year property) on january 10, 2018 at a cost of $1,080,000. Wally makes the election to expense the maximum amount under 179, but does not...
-
What are the psychological mechanisms underlying the desire for power, and how do they manifest in interpersonal relationships, organizational dynamics, and political behavior?
-
On average, clinic patients are expected to contribute $10 per visit, irrespective of location. Annual donations at each location are expected to be $1 million, and are expected to grow 15 percent...
-
How do individuals and groups acquire, wield, and contest power within various institutional and interpersonal settings, and what are the ethical implications of different forms of power utilization ?
-
Compare & contrast AD vs AS management policies. State the assumptions of the 4th generation Keynesian model and explain how its endogenous variables are determined. Compare & contrast anticipated vs...
-
How can theories of power inform strategies for promoting social justice, equity, and democratization, and what are the practical implications of these theoretical insights for political activism and...
-
You average 60 mph while driving to an amusement park. On the return trip, you average 45 mph due to traffic. The total driving time is 3 hours and 30 minutes. How long does each trip take?
-
a. Determine the domain and range of the following functions.b. Graph each function using a graphing utility. Be sure to experiment with the window and orientation to give the best perspective of the...
-
Are pipes an essential facility? Would major functionality be lost if they were not available?
-
When a message is sent to a sleeping process in MINIX 3, the procedure ready is called to put that process on the proper scheduling queue. This procedure starts out by disabling interrupts. Explain.
-
Modify the terminal driver so that in addition to a having a special key to erase the previous character, there is a key to erase the previous word.
-
When and why should exchange rates change under a fixed-exchange-rate system?
-
Using the diagram in exercise 5, illustrate the effect of the change in Japanese tastes if exchange rates are fixed. What will happen to the foreign exchange market equilibrium? Data from in exercise...
-
How does a currency speculator profit from exchange-rate changes? Give an example of a profitable speculation.
Study smarter with the SolutionInn App