Now that you have loaded your program into the debugger, you must select the components to view that are appropriate to your program. HELLO uses the serial port to display the words Hello World, so we will select to view the UART of the 80C52. To do this select HARDWARE from the VIEW menu. Now select UART, the UART window will be displayed.
Now you need to tell the debugger to start executing the program. This is done by selecting RUN from the DEBUG window.
The screen shown here shows you what the WinSim debugger/simulator screen looks like after running HELLO. Note that the UART window displays the text, Hello World.
WinSim with HELLO Loaded and Running.
After HELLO outputs Hello World, it begins executing an endless loop.
You can stop execution of HELLO by selecting STOP from the DEBUG menu..
You may use WinSim to step through HELLO. By using selecting RESET from the DEBUG menu (the reset command instructs WinSim to reset the simulated CPU) and selecting STEP INTO and STEP OVER from the DEBUG menu.
The STEP commands allow you to step through each line of source code. The current instruction is highlighted and the highlight moves each time you step. You may continue stepping through your program by pressing using these commands as many times as you wish. STEP INTO will execute the current statement stepping into function calls, STEP OVER will step over function calls and you will not step through each instruction of the function.