Schweigi / assembler-simulator

Simple 8-bit Assembler Simulator with Angular.js

Home Page:http://schweigi.github.io/assembler-simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is stack used for in "Hello World" example?

mydoghasworms opened this issue · comments

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.

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.

Thanks! Sorry, you are right, this is not really an issue :-/