What is stack used for in "Hello World" example?
mydoghasworms opened this issue · comments
Martin Ceronio commented
Hello, thanks for this very entertaining piece of work! I am new to assembly, so I was wondering why the A and B registers are pushed on to the stack before the print and then popped off at the end.
Steve Clay commented
From what I can tell, print uses A and B as local storage, and just to be nice it restores them to their previous values after it ends. StackOverflow might be a better place for this discussion.
Martin Ceronio commented
Thanks! Sorry, you are right, this is not really an issue :-/