开发者

MARIE: My Skipcond 400 doesn't seem to stop the program from barreling through the loop =C What is wrong here, I do not even know?

    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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜