I am learning about Hack Assembly Language and Jump Instructions. Could anyone please give me elaborate explanations of how you could calculate the jump instructions for a given virtual machine code. I would like to understand how to find the Jump Instructions if I had the Virtual Machine Command of, for example, push constant 0.
Please give me detailed explanations so I can learn!
Example: VIRTUAL MACHINE COMMAND is 'push constant 0
'.
How to get from THAT COMMAND to the following written JUMP INSTRUCTIONS:
@SP
A = M
M = 0
@SP
M=M+1
The jump instruction above is just an example, not the answer.