#### Test program for set-word

section data
format:
string "%d\x0a\x00"

data:
word 0
word 1

section functions
import printf
export main

main:
function argc argv
    let x get-word data 0
    call printf format x
    set x get-word data 1
    call printf format x

    set-word data 0 12
    set-word data 1 42

    set x get-word data 0
    call printf format x
    set x get-word data 1
    call printf format x

    set x 42
    let i 0
    set-word data i x
    set x add x 1
    set i add i 1
    set-word data i x

    set x get-word data i
    call printf format x
    set i sub i 1
    set x get-word data i
    call printf format x

    return 0
end function
