|
I have just finished working on the Math OS module, and tested it, and even though I did exactly as specified, it did not pass the test. Then I noticed a weird translation by the supplied compiler that I believe is wrong.
The line:
if((twoToThe[j] < subX) | (twoToThe[j] = subX)){
in my math.jack, translated to:
push local 0
push static 0
add
pop pointer 1
push that 0
push local 1
lt
push local 0
push static 0
add
pop pointer 1
push that 0
or
push local 1
eq
I believe the or command should switch with the line below it. Why am I wrong?
|