0 Replies - 1766 Views - Last Post: 07 November 2012 - 09:15 PM Rate Topic: -----

#1 castigero  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 16-October 12

MARIE simulator simple subtraction

Posted 07 November 2012 - 09:15 PM

I'm trying to perform simple subtraction in a MARIE simulator, but for some reason the command for the subtraction is not working. Any help would be greatly appreciated.

Here's the commented code
 clear  /sets accumulator to zero
 store SUM /sum starts at zero
 input  /inputi1 value
 storei 1 
 input  /input i2 value
 storei 2
 loadi 1
 subti 2  /i1 - i2
 store SUM /put new SUM to memory
 load SUM
 output  /output SUM
 halt
SUM, DEC 0
i1,  DEC 0



Is This A Good Question/Topic? 0
  • +

Page 1 of 1