Question: I need help with my program. It not display anything each time I ' m running it though marie program. Here is the assignment: Using

I need help with my program. It not display anything each time I'm running it though marie program. Here is the assignment: Using the MARIE computer assembly language, write a program that computes the following expression:
zlarr(a**(b))+(c**d). The computer will read in the input values a,b,c, and d from the keyboard, the final
result (z has to be displayed. In addition, every time an input value is read in, it must be validated by
checking that the input is a positive number. If it is positive display the number on the screen; otherwise
display zero and end the program. Remember that the MARIE instruction set does not have an instruction
to execute multiplication. The program must be tested in the MARIE simulator.
My Program:
ORG 100
InputA, DEC 0
InputB, DEC 0
InputC, DEC 0
InputD, DEC 0
ResultZ, DEC 0
Start, IN ; Input a
SKIPCOND 000 ; Check if input is positive
JUMP InputError ; Jump to InputError if input is not positive
STORE InputA ; Store input in InputA
OUT ; Display the input
IN ; Input b
SKIPCOND 000 ; Check if input is positive
JUMP InputError ; Jump to InputError if input is not positive
STORE InputB ; Store input in InputB
OUT ; Display the input
IN ; Input c
SKIPCOND 000 ; Check if input is positive
JUMP InputError ; Jump to InputError if input is not positive
STORE InputC ; Store input in InputC
OUT ; Display the input
IN ; Input d
SKIPCOND 000 ; Check if input is positive
JUMP InputError ; Jump to InputError if input is not positive
STORE InputD ; Store input in InputD
OUT ; Display the input
LOAD InputA ; Load InputA into accumulator
MUL InputB ; Multiply accumulator with InputB
STORE ResultZ ; Store result of first multiplication in ResultZ
LOAD InputC ; Load InputC into accumulator
MUL InputD ; Multiply accumulator with InputD
ADD ResultZ ; Add result of second multiplication to ResultZ
STORE ResultZ ; Store final result in ResultZ
OUT ; Display the final result
HLT ; Halt the program
InputError, LDA Zero ; Load 0 into accumulator
OUT ; Display 0
HLT ; Halt the program
Zero, DEC 0
END
 I need help with my program. It not display anything each

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!