CSC103 2011 Assembly Language Examples
--D. Thiebaut 11:37, 15 February 2011 (EST)
Program 1
A program that computes the sum of all the integers between 1 and 5 and stores it into a variable called sum.
start: lod counter
add sum
sto sum
lod counter
sub-c 1
sto counter
jmz done
jmp start
done: hlt
counter: 5
sum: 0