Re: My submission fails although tests are passing when run them manually

Posted by Asya on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/My-submission-fails-although-tests-are-passing-when-run-them-manually-tp4038316p4038318.html

Oh, sorry, of course.. Let's start with Mult.asm. Here is the contents:

  @i
  M=1 //i = 1
  @mult
  M=0 //mult = 0

(LOOP)
  @i
  D=M
  @R1
  D=D-M //now D contains i-R1
  @STOP
  D;JGT //if i > R1 goto STOP

  @R0
  D=M
  @mult
  M=D+M //mult = mult + R0
  @i
  M=M+1 //i = i + 1
  @LOOP
  0;JMP

(STOP)
  @mult
  D=M
  @R2
  M=D //RAM[2] = mult

(END)
  @END
  0;JMP

I understand that it's not efficient, but now we talk about correctness.
I thought that the grader on your side simply runs provided tests, but probably it's smth else.