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
a124c41
  • 21
  • 1
  • 4

1 Answers1

0

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

Johan Bezem
  • 2,582
  • 1
  • 20
  • 47