-
assembly language loop
Can anyone tell me what is wrong with this simple program, I want it to loop 5 times and add the total amount of inputs together then output the total.
Code:
begin, input
store x
load x
add total
store total
load count
subt one
store count
skipcond 000
jump begin
output total
halt
x, dec 0
count, dec 4
one, dec 1
total, dec 0
-
So what does it do at the moment.
Not loop at all?
Loop, but not 5 times?
Not input?
Wrong sum?
-
Edit never mind I got it too work, for some reason I think I had to load total before I could output it.