Table of Contents Previous topic Next topic
GettingStarted->Event Handlers->Adding Event Handlers->Adding Code To The Handler
We will write the program counter value to the console from within this function so that we can observe the progress of the simulator. The comments tell us that event.data contains the value of the program counter.
Here is the output generated by the Javascript code as the program runs in the simulator: