INP
STA A
INP
STA B
LDA 99
STA C
loop LDA A
SUB B
STA A
LDA C
ADD Y
STA C
LDA A
BRP loop
LDA C
OUT
HLT
A DAT
B DAT
C DAT
Y DAT 1
Hello I am new to Little Man computer, this number division program should return 6 when A is input as 24 and B as 4, but when I run it, it outputs 7 which makes no sense. I know it loads A into the accumulator at the start and end of the while loop so I didn't include that in the trace table. I'm not a credible user yet it makes me use links for pictures