Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I created the code but it giving me an error. Please help : here is the assignment:Using the MARIE computer assembly language, write a program

I created the code but it giving me an error. Please help : here is the assignment:Using the MARIE computer assembly language, write a program that computes the following expression: z = a * b, where a and b are positive numbers. The computer will read in the input values a, and b from the keyboard, and the final result (z) have to be displayed. In addition, every time an input value is read in, it must be displayed on the screen. Remember that the instruction set does not have an instruction to execute multiplication.
Note: Only input numbers greater than zero
The program must be tested on MARIE simulator.
My code: ORG 100
Load 0
Store a
Input
Output
Store B
Input
Output
Load a
skipcond 800
Jump skip
Jump done
skip, load B
skipcond 800
Jump skip2
Jump done
skip2, Store temp
loop, load temp
add result
Store result
load A
Subtract one
Store A
skipcond 000
Jump loop
done, load result
Output
Halt

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 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago

Question

What is paper chromatography?

Answered: 1 week ago