Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions