Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with spim assembly language for qtspim. Please comment your code and answer the outputs. Compose a program to examine the string Hello, world!

image text in transcribed

Please help with spim assembly language for qtspim. Please comment your code and answer the outputs.

Compose a program to examine the string "Hello, world! ", calculating the total numeric value of all the characters in the string (including punctuation marks). The program should load each letter, add that numbers numeric value to the running total, and finally produce a total sum. The program will take a loop, but in this case, you do not need a counter, since the phrase is null terminated. Simply look for a null (0) and then terminate the program by printing out the total. Remember punctuation (even spaces!) have a numeric value as well. What is the total character numeric sum? Construct a program that will data print out the data words in memory AS ASCII CHARACTERS in the reverse order that they are declared in the data statement. To do this, use the stack to reverse the data sequence. You will need two small loops: one to store the four data words on the stack, and a second to print the data (which is main conveniently in reverse order on the stack!) to the console. Yes, you WILL need a counter in both loops! When addressing the stack, use the "points to the last filled location" convention for the stack pointer ($29). End the program with a syscall 10, as usual. What is printed out

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

ISBN: 3319712721, 978-3319712727

More Books

Students also viewed these Databases questions