Administrator
|
It's a bit hard to tell, but I think you have the right idea.
What do you mean with the square brackets when you say "@[label]"? That's not a notation I recall seeing in the text, so I'm not exactly sure what you have in mind. But, yes, you create a label at the line of code that you want to return to and then that label is now associated with that address (which is just an integer) and that's what you put on the stack and, eventually, it gets put in the A register and then an unconditional jump is executed.
As for the data types, all of the data types used by this computer (and all of the language types) are all intercompatible in that at the end of the day they are all 16-bit signed integers. That was done very deliberately so that type systems and type checking could be neatly sidestepped, which is important given the course's very broad scope -- depth had to be extremely limited pretty much across the board.
|