1
    Input
    Store   b
    Output
    Input
    Store   c
    Output
Loop,   Load    a
    Add b
    Store   a
    Load    c
    Subt    i
    Store   c
    Output
    Skipcond 400
    Jump Loop
    Load    a
    Output

    Halt

a, DEC 0
b, DEC 0
c, DEC 0
i, DEC 1
z, DEC 0
4

1 回答 1

0

If your subt instruction shall subtract one (1) from c, wouldn't you need to use immediate addressing, like #i?

于 2011-11-29T21:23:44.653 回答