VM code:
push constant 32767
push constant 32766
neg
gt
Pseudocode: if (32767 > -32766) then push -1 else push 0
Expected result: TOS is -1
Actual result of my VMTranslator: TOS is 0
My VMTranslator implementation with this flaw has passed Coursera grader system.
I thought check result of A-B is enough to comparing A and B.
However, 32767 - (-32766) provokes overflow and I got wrong result.
I believe that many VMTranslator implementations, including which is used to create Pong.asm for Project 6, might have similar issue.