Write a LMC assembly program that multiplies two integer num

Write a LMC assembly program that multiplies two integer numbers that are provided by the user.

1.Two integer numbers are entered by the user through keyboard.
2. The two numbers are multiplied.
3.The multiplication result is printed on the console screen.

This is what I have so far:

Solution

INP

STA FIRST

INP

STA SECOND

LOOP LDA SECOND

BRZ ENDTHIS

SUB ONE

STA SECOND

LDA ANS

ADD FIRST

STA ANS

BRA LOOP

ENDTHIS LDA ANS

OUT

SUB ANS

STA ANS

HLT

FIRST DAT

SECOND DAT

ONE DAT 1

ANS DAT 0

Write a LMC assembly program that multiplies two integer numbers that are provided by the user. 1.Two integer numbers are entered by the user through keyboard.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site