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
