Back

Little Man Computer and tracing programs

Little Man Computer
There is one way to really understand how assembly programs are written. It is to write them and check them by tracing the program and debugging it, and also to trace programs that others have written. Tracing a program means executing it on paper, and following the logic of the instructions, line by line, to see what happens and to check that what you think is happening is actually happening. As you work through each line in the code, you record wherever there is a change in a register or memory address. Tracing programs is an excellent tool to help you debug (find any errors) in your code. To begin this process, you should spend a few hours using the Little Man Computer simulator. This will allow you to trace programs that you write and see how they work.