ORG 100
Input, Input / Read input value
Store A / Store input value in A
Input / Read input value
Store B / Store input value in B
Input / Read input value
Store C / Store input value in C
Load B / Load value of B
Store Count / Set count for B
LoopA, Load A / Load value of A
Add Z / Add value of Z
Store Z / Store new value of Z
Subt ONE / Decrement count by 1
Store Count / Store new value
Skipcond 400 / Check if Count is negative or zero
Jump LoopA / If Count is positive, repeat loop
Load C / Load value of C
Store Count / Set count for C times
LoopC, Load Z / Load value of Z
Add B / Add value of B
Store Z / Store new value of Z
Subt ONE / Decrement count by 1
Store Count / Store new value of Count
Skipcond 400 / Check if Count is negative or zero
Jump LoopC / Repeat loop if count is positive
Output, Load Z / Load value of Z
Output / Output value of Z
Halt / End program
A, DEC 0 / Variable A
B, DEC 0 / Variable B
C, DEC 0 / Variable C
Z, DEC 0 / Result variable
Count, DEC 0 / Loop counter
ONE, DEC 1 / Constant value 1
END
I keep getting stuck in loop A and cannot get the correct output for z. Any help would be appreciated.