Fatih Sarıkoç wrote
Hi Everybody,
At Chapter-11 test file of ConvertToBin/Main.jack file, it seems that there is not an initial value assigment for local variables "position" and "mask". Is there a rule in the book meaning that default initial value for a local integer variable shall be zero.
In a quick scan of chapters 9-11 I don't see it explicitly stated that local variables ar initialized to zero.
It
is explicitly stated in the VM Specification in chapter 8, that on entry to functions, the local segment is initialized to 0. See section 8.2.3 and figure 8.5.
--Mark