Question: I am trying to write a program for MARIE assembly that multiplies 3 inputs. a*b*c = z I have attached the program below as I

I am trying to write a program for MARIE assembly that multiplies 3 inputs. a*b*c = z

I have attached the program below as I am getting an issue with the program running continuously.

How can I change the program to make it work?

RG 100

INPUT STORE a OUTPUT a /display a

INPUT STORE b OUTPUT b /display b

INPUT STORE c OUTPUT c /display

LOOP, LOAD product1

ADD a STORE product1 LOAD b SUBT one STORE b SKIPCOND 400 JUMP LOOP

LOOP2, LOAD product2

ADD product1 STORE product2 LOAD c SUBT one STORE c SKIPCOND 400 JUMP LOOP

LOAD product1 OUTPUT HALT

a, DEC 0 b, DEC 0 c, DEC 0

one, DEC 1 product1, DEC 0 product2, DEC 0

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!