Immutable vs Mutable function parameters, i.e. “Pass by value” vs “Pass by reference”
Recall LC3Stack Frames, when you just have normal types in your function signature, within the scope of the function, the parameters are just local variable copies of the actual variables, saved on the stack in the stack frame of the function. Accordingly, when you modify the local variable stack frame parameters, it doesn’t mutate the original variable that was pushed onto the stack by the Caller.
If you actually want to mutate your parameters, you have to pass a pointer to the variable (i.e. pass by reference), as even if the value of the pointer on the stack is a copy, it is still a pointer, and thus you can dereference and mutate the actual value of the variable that it points to.
Does not have printing, I/O, or (dynamic/heap) memory management built in