multiply two numbers assembly lmc
snippet in assembly

multiply two numbers assembly lmc

user4387

     INP
     STA R0
     INP
     STA R1

LOOP LDA R1
     BRZ END
     SUB ONE
     STA R1
     LDA RES
     ADD R0
     STA RES
     BRA LOOP

END  LDA RES
     OUT

     // Temporary storage
R1   DAT
R0   DAT
RES  DAT

     // Constants
ONE  DAT 1