Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE (pretty, pretty, pretty please) do not answer this unless you're sure. People answer a lot on here and are wrong. Translate the program below

PLEASE (pretty, pretty, pretty please) do not answer this unless you're sure. People answer a lot on here and are wrong.

Translate the program below into PEP/8 assembly language

Use a jump table to implement the switch statement.

Use trace tags on all variables.

For invalid scores, output should be the same as the C++ program.

Add something to the output that makes this program uniquely yours.

The variable finish needs to be local.

This is similar to Fig 6.40.

a) Comment lines of the source code to trace the C++ code. Cut & paste the Source Code

Listing into your assignment document.

b) Run for each score and paste a screen shot of each of the PEP/8 Output area.

c) Step thru & Cut and paste the memory trace at any point.

#include

using namespace std;

int main () { int

finish;

cout

endl; cin >> finish;

switch (finish) {

case 1:

cout

break;

case 2:

cout

break;

case 3: case 4:

cout

break;

default:

cout

}

cout

return 0;

}

Figure 6.4

image text in transcribed

BR main main () guess:.EQUATE O main: SUBSP 2,i STRO msgln, DECIguess, sS LDX ASLX BR ;local variable #2d ;allocate #guess cout Guess ; switch (Guess) addresses occupy two bytes guess,3 guessJT, x guessJT: .ADDRSS case0 ADDRSS casel ADDRSS case2 ADDRSS case3 case0: STRO g0,d casel STRO msgl, d case2: STRO g2,d cout Guess ; switch (Guess) addresses occupy two bytes guess,3 guessJT, x guessJT: .ADDRSS case0 ADDRSS casel ADDRSS case2 ADDRSS case3 case0: STRO g0,d casel STRO msgl, d case2: STRO g2,d cout

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions