Question
https://courses.missouristate.edu/KenVollmar/mars/tutorial.htm .data buffer: .space 20 str1: .asciiz Enter string str2: .asciiz You wrote: .text main: la $a0, str1 # Load and print string asking
https://courses.missouristate.edu/KenVollmar/mars/tutorial.htm
.data buffer: .space 20 str1: .asciiz "Enter string" str2: .asciiz "You wrote: "
.text main: la $a0, str1 # Load and print string asking for string li $v0, 4 syscall
li $v0, 8 # take in input
la $a0, buffer # load byte space into address li $a1, 20 # allot the byte space for string
move $t0, $a0 # save string to t0 syscall
la $a0, str2 # load and print "you wrote" string li $v0, 4 syscall
la $a0, buffer # reload byte space to primary address move $a0, $t0 # primary address = t0 address (load pointer) li $v0, 4 # print string syscall
li $v0, 10 # end program syscall
comes with it. https://courses missouristate.edu/KenVollmar/mars/tutorial.htm Read Part 1 of the tutorial. Study the following code, try to understand the data storage, input, output for MIPS. .data buffer: .space 20 stri: aasiiz "Enter string" str2: :aasiiz "You wrote: " .text main: la $ab, stri li $v0, 4 sxasatt # Load and print string asking for string li $v0, 8 # take in input la $a0, buffer li $al, 20 # load byte space into address # allot the byte space for string # save string to to move $t0, $a Aasalu # load and print "you wrote" string la $ao, str2 li $v0, 4 aMasala la $a, buffer move $a0,$t0 li $v0,4 # reload byte space to primary address # primary address = to address (load pointer) # print string Smarald li $v0, 10 # end program Exacatt 1. Write a "Hello World program that will promote you to type in your name first, and then display "Hello world!
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