Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 1 5 points ) . Using the Marie Simulator found on the web site, you will create a small assembly language Marie program. The
points Using the Marie Simulator found on the web site, you will create a small
assembly language Marie program. The program is a simple multiplication app
MARIE does not have a MULT operator, so you have to figure out how to do this on
your own Basically, your program will issue a prompt then accept a single
digit integer from the user. Hit the ENTER key to actually enter the value It will
then echo that integer to the screen, print a symbol, then wait for a second digit.
It will then echo this digit to the screen, followed by the symbol and then the
result of the multiplication. There is no error checking, so all numbers entered should
be a single digit, and the result must also be a single digit. So or
is okay, but is not ie your program is not expected to be able to
handle the third case properly When the calculation is finished, you must tell the
program whether to continue or not. If you enter a the program will print "BYE"
to the screen and halt. If you simply hit the ENTER key instead, it will loop and
provide a new prompt.
Note that IO is quite limited on Marie so you can't do anything fancy. You should
select the no linefeed" option in the Output Window everything will be printed on
one line.
In addition, the data format of both the Input and Output registers should be set to
ASCII this is the default It must not be changed to anything else as the program is
running.
A sample output for a two iteration loop would be something like this:
BYE
MY CODE CAN SOMEONE PLEASE FIX IT: ORG
Start, LOAD Load X from memory
OUTPUT Output prompt
INPUT Input a digit first operand
STORE X Store the digit in X
OUTPUT Output the entered digit
LOAD
OUTPUT Output
INPUT Input a digit second operand
STORE Y Store the digit in Y
LOAD X Load X first operand
ADD Y Add Y second operand
STORE Z Store the result in Z
LOAD X Load X first operand
OUTPUT Output the first operand
OUTPUT Output
LOAD Y Load Y second operand
OUTPUT Output the second operand
OUTPUT Output
LOAD Z Load Z result
OUTPUT Output the result
INPUT Input a character to determine continuation
SKIPCOND Skip if the input is
JUMP Finish If not finish
OUTPUT BYE Output B of BYE
OUTPUT BYE Output Y of BYE
OUTPUT BYE Output E of BYE
HALT
Finish, HALT
X DEC
Y DEC
Z DEC
BYE HEX B in ASCII
BYE HEX Y in ASCII
BYE HEX E in ASCII
HEX A in ASCII
HEX D in ASCII
HEX E in ASCII
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started