What does the following code snippet taken from the Hack machine language to sum up 1 to 100 do?
M = 1
M = 0
From my understanding, @value sets the A register to value. So the A register gets the memory address right? Example: @7 would store 0000000000000111 in the A register, (which is an address in the data memory)
So, what does @i mean? We haven't even specified what i is, how does A store any address?
And when M = 1 is executed, the explanation is i = 1. What exactly happens here? Does the memory location referenced by i in the data memory store the value 1?
I'm really confused! I think that the tutorial should have been more comprehensive