I'm a bit confused about what symbols are allowed in the hack computer asm. I know the A-instruction can only load a 15-bit value, but what happens if the person puts something else that can't be loaded?
Is there an official definition for a user-defined symbol?
I can't find one...
For example, this is obviously valid for a variable:
@x
M=D
And this is obviously valid for a loop:
(y)
//do stuff
@y
0;JMP
These all do something strange and gives no errors...how does the built-in assembler deal with it?
@65535 //too big a number, I haven't found the pattern of what it does yet
@-1 //doesn't load a negative number, I haven't figured out what it does
@1stVar //can symbol names start with a number?
Either I'm not understanding the definition of the symbols, or I feel like the assembler should abort and throw some sort of error if those aren't allowed.