Question: .macro Print MessageslStrings (messagehere) #macro, names as PrintMessagesInStrings .data# data segment Message: .asciiz %messagehere space 100 # 100 bytes are reserved for the message

.macro Print Messageshtings (%messagehere) #macro, names as PrintMessagesInStrings .data# data segmentStop: PrintMessagesInStrings(Statement: Statement: 1. Change the sample to print your age and experience in floating point formats, e.g.,

.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(" My name is Dr. Jan") Print MessagesInStrings(" 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(" 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:

Step by Step Solution

3.39 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To modify the code to print your age and experience in floatingpoint formats you can update the macr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!