gnupic: gpasm - how to get address of variable ?


Previous by date: 7 Sep 2012 08:15:17 -0000 gpasm - how to get address of variable ?, Vaclav Peroutka
Next by date: 7 Sep 2012 08:15:17 -0000 Re:gpasm - how to get address of variable ?, Joe Pfeiffer
Previous in thread: 7 Sep 2012 08:15:17 -0000 gpasm - how to get address of variable ?, Vaclav Peroutka
Next in thread: 7 Sep 2012 08:15:17 -0000 Re: gpasm - how to get address of variable ?, Joe Pfeiffer

Subject: Re: gpasm - how to get address of variable ?
From: Borut ####@####.####
Date: 7 Sep 2012 08:15:17 -0000
Message-Id: <5049AD12.9080204@gmail.com>

Hi Vaclav,

I don't think you can get the address of CBLOCK variable.
The alternative is to use EQUs instead of CBLOCK:

var1            EQU        0x20
var_array    EQU        0x21

                     movlw    var_array
                     movwf    FSR

Borut

On 07. 09. 2012 09:52, Vaclav Peroutka wrote:
> Hello,
>
> I want to use FSR/INDF in assembler. I have defined
>
>      CBLOCK    0x20
>          var1:    1
>          var_array:    1
>      ENDC
>
> In the code, I want to use
>     movlw address_of_var_array
>     movwf FSR
>
> and then to write to var_array through INDF.
>
> How can I do that ? I did not find any expression in gputils manual.
>
> Thank you in advance,
> Vaclav


Previous by date: 7 Sep 2012 08:15:17 -0000 gpasm - how to get address of variable ?, Vaclav Peroutka
Next by date: 7 Sep 2012 08:15:17 -0000 Re:gpasm - how to get address of variable ?, Joe Pfeiffer
Previous in thread: 7 Sep 2012 08:15:17 -0000 gpasm - how to get address of variable ?, Vaclav Peroutka
Next in thread: 7 Sep 2012 08:15:17 -0000 Re: gpasm - how to get address of variable ?, Joe Pfeiffer


Powered by ezmlm-browse 0.20.