gnupic: Re: [gnupic] Writing regiter in gpsim


Previous by date: 28 Sep 2006 16:40:37 +0100 Writing regiter in gpsim, Nicolas
Next by date: 28 Sep 2006 16:40:37 +0100 Re: [gnupic] Writing regiter in gpsim, Nicolas
Previous in thread:
Next in thread: 28 Sep 2006 16:40:37 +0100 Re: [gnupic] Writing regiter in gpsim, Nicolas

Subject: Re: [gnupic] Writing regiter in gpsim
From: Scott Dattalo ####@####.####
Date: 28 Sep 2006 16:40:37 +0100
Message-Id: <451BECD7.5000709@dattalo.com>

Nicolas wrote:
> Hello,
> 
> I am trying to modify the value of registers in a command-line session
> of gpsim but without success. I use for e.g. the following command:
> "x 0xF81 0x05"
> 
> Note that reading a register works with for example:
> "x 0xF81"

The 'x' command has been deprecated. Check out the command line help:

-----------
gpsim> help x

x examine command -- deprecated
         Instead of the using a special command to examine and modify
         variables, it's possible to directly access them using gpsim's
         expression parsing. For example, to examine a variable:
gpsim> my_variable
my_variable [0x27] = 0x00 = 0b00000000
         To modify a variable
gpsim> my_variable = 10
         It's also possible to assign the value of register to another
gpsim> my_variable = porta
         Or to assign the results of an expression:
gpsim> my_variable = (porta ^ portc) & 0x0f
------------

But, if you want to examine/modify a register I can think of three other 
ways than doing it symbolically like above.

1) reg() operator

gpsim> reg(0xf81)


2) ramData[] operator

gpsim> ramData[0xf81]

3) Use the register window.

> I'm using gpsim 0.21.11.
> 
> Also PORTE and PORTD are missing for at least the 18F452.

gpsim is case sensitive. Ports D and E are lower case portd and porte. 
Also, you may examine individual bits in these ports e.g. portd0. You 
may also monitor them with the scope (this has not been documented btw):

  gpsim> scope.ch0="portd0"

The quotes are necessary.


Scott

Previous by date: 28 Sep 2006 16:40:37 +0100 Writing regiter in gpsim, Nicolas
Next by date: 28 Sep 2006 16:40:37 +0100 Re: [gnupic] Writing regiter in gpsim, Nicolas
Previous in thread:
Next in thread: 28 Sep 2006 16:40:37 +0100 Re: [gnupic] Writing regiter in gpsim, Nicolas


Powered by ezmlm-browse 0.20.