A two-pass assembler reads the program twice. The first pass computes the address of every line and records each label with its address in the symbol table; the second pass encodes every line, looking up in the table the labels used as operands.
sum_array.toy: ten instructions of two bytes, then seven bytes of DATA. Each label of the symbol table points at an address; the rest of memory, from to , is free, and the stack grows down from the top.