|
I am looking at the convert to bin code and my compiler so far so good until i reach this vm code. Ill try to make it ease
jack code
let loop = true;
vm code produced by supplied compiler
push constant 0
not
pop local 2
my vm code for true
push constant 1
neg
pop local 2
excerpt from book on constant values chapter 11 under constants under standard mapping
sorry i have the e-book no page numbers
Null and false are mapped to the constant 0
true is mapped to the constant -1 which is obtained by
pushing the constant 1 followed by neg
so my question is am i doing some thing wrong or is there another problem here
|