start:
    move 0
    store CNT
    move DATA
    store ADDR

loop:
    load CNT
    addm ADDR
    store 4 update
update:
    load 0
    addm RESULT
    store RESULT

    load CNT
    add 1
    store CNT
    sub 8
    jumpz exit
    jump loop    

exit:
    jump exit

DATA:
    .data 1
    .data 2
    .data 4
    .data 8
    .data 16
    .data 32
    .data 64
    .data 128

ADDR:
    .data 0
CNT:
    .data 0
RESULT:
    .data 0
