Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am using putty and this was what i have so far, i do not know how to input code stuff to register. something about

image text in transcribed

image text in transcribed

I am using putty and this was what i have so far, i do not know how to input code stuff to register. something about imul? ScanInt ?

.data

d1:

.ascii "Loves chicken : 25 points \0"

d2:

.ascii "Loves fish : 20 points \0"

d3:

.ascii "Hates onions : -15 points \0"

d4:

.ascii "Hates lobster : -10 points \0"

chicken:

.ascii "How many students love chicken? \0"

fish:

.ascii "How many students love fish? \0"

onions:

.ascii "How many students hate onions? \0"

lobster:

.ascii "How many students hate lobsters? \0"

.text

.global _start

_start:

mov $d1, %rax

call PrintCString

mov $d2, %rax

call PrintCString

mov $d3, %rax

call PrintCString

mov $d4, %rax

call PrintCString

mov $chicken, %rax

call PrintCString

call EndProgram

Sample Run The following is a sample run of the program. The user's input is printed in blue. The data outputted from your calculations is printed in red. : 27 points Getting an A Cleaning your robes 5 points Being late to class 11 points saying the V-Word : Information text -34 points How many students got A's? Prompt the user How many students cleaned their robes? 2 How many students were late to class? 3 How many students said the V-Word? 1 Ravenclaw gained 51 points! Calculated output Sample Run The following is a sample run of the program. The user's input is printed in blue. The data outputted from your calculations is printed in red. : 27 points Getting an A Cleaning your robes 5 points Being late to class 11 points saying the V-Word : Information text -34 points How many students got A's? Prompt the user How many students cleaned their robes? 2 How many students were late to class? 3 How many students said the V-Word? 1 Ravenclaw gained 51 points! Calculated output

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions