I want to find the product 2*3 with subroutine but my program goes on infinite loop. Below is the code in MARIE assembly language. I think the logic is okay but I don't know where is the problem that my program goes on infinite loop. Thank you for your consideration
ORG 100
INPUT
STORE A
INPUT
STORE B
JNS subr
JUMP result
subr, HEX 0
loop1, LOAD A
ADD sum1
STORE sum1
LOAD B
SUBT One
STORE B
SKIPCOND 400
JUMP loop1
JUMPI subr
result, LOAD sum1
OUTPUT
HALT
A, DEC 0
B, DEC 0
C, DEC 0
D, DEC 0
One, DEC 1
sum1, DEC 0
sum2, DEC 0
total, DEC 0