gnupic: gpasm - how to get address of variable ?
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