Question: Write an assembly program titledYourLastName_Program1 that prints out Hello world, your name, the name of your favorite video game, the name of your favorite film,

Write an assembly program titled"YourLastName_Program1" that prints out "Hello world", your name, the name of your favorite video game, the name of your favorite film, and the name of your favorite song and the artist(s) who play it.

Remember, this course will use the SPIM emulator for MIPS processors. Make sure your programs work on these emulated machines.

================================================================

I'm currently learning assembly language in my class and I need help on one of the excercies. The program just needs to print out the strings - no need for the program to take information from the user.

In this case, I need the program to print out "Hello world", "Jack Zhu", "Zelda", "Pulp Fiction", "Oceans Away by Arizona"

This is what I have currently.

====================================

=====================================

# helloworld.s # # Print out Name, favorite video game, movie and song

.data

name: .asciiz "My name is Jack Zhu" game: .asciiz " My favorite video game is Zelda" movie: .asciiz " My favorite movie is Pulp Fiction" song: .asciiz " My favorite song is Oceans Away by Arizona"

.text

.globl main

main:

#print name li $v0, 4 # syscall 4 (print_str) la $a0, name # argument: string syscall # print the string

#print video game li $v0, 4 # syscall 4 (print_str) la $a0, game # argument: string syscall # print the string

#print movie li $v0, 4 # syscall 4 (print_str) la $a0, movie # argument: string syscall # print the string

#print song li $v0, 4 # syscall 4 (print_str) la $a0, song # argument: string syscall # print the string

jr $ra # retrun to caller

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!