# Please in MIPS AssemblyIn this Project, we will add a few more helpful subprograms to below file.Notes: assume your subprograms already have inputs in the ‘a’ register(s) ($a0…$a3) and should store output(s) in the ‘v’ register(s) ($v0, $v1).Notes: no need to get user input or print output values, other subprograms in utils.asm can be used to do that.Notes: don’t ‘exit’ at the end of your subprogram, you need to return to the calling program using a jump operation NOR – take two input parameters and return the NOR operation on those two parametersNAND – take two input parameters and return the NAND operation on those two parametersMult4 – take an input parameter and return that parameter multiplied by 4 using only the shift operation.Swap – take two input parameters and swap them using only the XOR operation.File: utils.asm # Purpose: To define utilities which will be used in MIPS programs.# # Title to and ownership of all intellectual property rights # in this file are the exclusive property of Charles W. Kann.## Subprograms Index:# Exit Call syscall with a server 10 to exit the program# PrintNewLine Print a new line character (n) to the console# PrintInt Print a string with an integer to the console# PrintString Print a string to the console# PromptInt Prompt for an int & return it to the calling program.## Modification History# 12/27/2014 – Initial release# Subprogram: Exit# Author: Charles Kann# Purpose: to use syscall service 10 to exit a program# Input/Output: None# Side effects: The program is exited.textExit: li $v0, 10 syscall# Subprogram: PrintNewLine# Author: Charles Kann# Purpose: to output a new line to the user console# Input/Output: None# Side effects: A new line character is printed to the user’s console.textPrintNewLine: li $v0, 4 la $a0, __PNL_newline syscall jr $ra.data __PNL_newline: .asciiz “n”# Subprogram: PrintInt# Author: Charles W. Kann# Purpose: To print a string to the console# Input: $a0 – The address of the string to print.# $a1 – The value of the int to print# Output: None# Side effects: The String is printed followed by the integer value..textPrintInt: # Print string. The string address is already in $a0 li $v0, 4 syscall # Print integer. The integer value is in $a1, and must # be first moved to $a0. move $a0, $a1 li $v0, 1 syscall #Return jr $ra# Subprogram: PrintString# Author: Charles W. Kann# Purpose: To print a string to the console# Input: $a0 – The address of the string to print.# Output: None# Side effects: The String is printed to the console..textPrintString: addi $v0, $zero, 4 syscall jr $ra# Subprogram: PromptInt# Author: Charles W. Kann# Purpose: To print the user for an integer input, and# to return that input value to the caller.# Input: $a0 – The address of the string to print.# Output: $v0 – The value the user entered# Side effects: The String is printed followed by the integer value..textPromptInt: # Print the prompt, which is already in $a0 li $v0, 4 syscall # Read the integer. Note: at the end of the syscall the value is # already in $v0, so there is no need to move it anywhere. li $v0, 5 syscall #Return jr $ra


Please in MIPS AssemblyIn this Project we will add a few more helpful subprograms to below
$10.00 Original price was: $10.00.$5.00Current price is: $5.00.
Download button will appear immediately after successful payment.
Full support will be provided with necessary files installation.
Get impeccable customized solution within 24 hours, hassle-free.
Rated 5.00 out of 5 based on 1 customer rating
(2 customer reviews)
Free worldwide shipping on all orders over $50
- 30 days easy returns
- Order yours before 2.30pm for same day dispatch
2 reviews for Please in MIPS AssemblyIn this Project we will add a few more helpful subprograms to below
Only logged in customers who have purchased this product may leave a review.
SKU: 4768
Category: Computer Science
Tags: Kann Purpose To print a string to the console Input a0 The address of the string to print a1 The value of the int to print Output None Side effect, Kann Purpose To print a string to the console Input a0 The address of the string to print Output None Side effects The String is printed to the consoletextPrint, Kann Purpose To print the user for an integer input and to return that input value to the caller Input a0 The address of the string to print Output, Kann Subprograms Index Exit Call syscall with a server 10 to exit the program PrintNewLine Print a new line character n to the console PrintInt Print a string with, li v0 5 syscall Return jr ra, move a0 a1 li v0 1 syscall Return jr ra Subprogram PrintString Author Charles W, Note at the end of the syscall the value is already in v0 so there is no need to move it anywhere, Please in MIPS AssemblyIn this Project we will add a few more helpful subprograms to below fileNotes assume your subprograms already have inputs in the a registers a0a3 and should, The integer value is in a1 and must be first moved to a0, The string address is already in a0 li v0 4 syscall Print integer
Related products
-
Computer Science, CPT 341 Spring 2020, Visual Basic
Rated 5.00 out of 5$100.00Original price was: $100.00.$75.00Current price is: $75.00. Add to cart -
Computer Science, Visual Basic
Rated 5.00 out of 5$60.00Original price was: $60.00.$50.00Current price is: $50.00. Add to cart
Erica Cupp –
great and amazing work, highly recommend. God bless you in all your days
Karina Cisneros –
Tutor is patient, highly efficient and well spoken. I can always count on early delivery! Thx!!