gnupic: Re: [gnupic] gpsim-0.22.0-RC3 led_test questions


Previous by date: 9 Nov 2006 22:28:29 +0000 gpsim-0.22.0-RC3 led_test questions, Maxim Wexler
Next by date: 9 Nov 2006 22:28:29 +0000 Re: [gnupic] gpsim-0.22.0-RC3 led_test questions, Maxim Wexler
Previous in thread:
Next in thread: 9 Nov 2006 22:28:29 +0000 Re: [gnupic] gpsim-0.22.0-RC3 led_test questions, Maxim Wexler

Subject: Re: [gnupic] gpsim-0.22.0-RC3 led_test questions
From: Scott Dattalo ####@####.####
Date: 9 Nov 2006 22:28:29 +0000
Message-Id: <4553AB5C.8010303@dattalo.com>

Maxim Wexler wrote:
> Hi group,
> 
> When I run
> 
> heathen@localhost ~/gpsim-0.22.0-RC3/examples/modules/led_test $ gpsim -c
> led_mod.stc
> 
> gpsim starts OK but will only let me step the program. If I click run it
> won't stop until I <ctrl-c> in the console? Can't even close the various
> gpsim windows on the desktop.

You probably have selected to run gpsim in the "without gui" simulation 
mode. This lets the simulation run as fast as possible, but sacrifices 
gui interaction in the process. I usually select 2,000,000 cycles/gui 
update.


> Also, why is the stack viewer window completely empty until  line 41, 
> "addwf
> PCI, f" is reached, then it displays "#0  0x0008 (decode_segments +-2)"
> which disappears after the following retlw command? Then the same line is
> displayed on the next cycle. I was expecting to see program counter and
> registry info there throughout the operation.

The instruction prior to the addwf is a call. A call pushes a return 
address onto the stack. That address in this example is 0x0008 which is 
2 instructions before the closest label called 'decode_segments'. The 
retlw is a return instruction and pops the return address off of the 
stack, and thus it disappears from the stack viewer!

Scott

Previous by date: 9 Nov 2006 22:28:29 +0000 gpsim-0.22.0-RC3 led_test questions, Maxim Wexler
Next by date: 9 Nov 2006 22:28:29 +0000 Re: [gnupic] gpsim-0.22.0-RC3 led_test questions, Maxim Wexler
Previous in thread:
Next in thread: 9 Nov 2006 22:28:29 +0000 Re: [gnupic] gpsim-0.22.0-RC3 led_test questions, Maxim Wexler


Powered by ezmlm-browse 0.20.