gnupic: Re: [gnupic] Possible gpasm or gplink bug?
Subject:
RE: [gnupic] Possible gpasm or gplink bug?
From:
Julian Green ####@####.####
Date:
14 Nov 2005 08:39:01 +0000
Message-Id: <20051114083818.N39980-100000@pschulz.london.corp.yahoo.com>
movlw msg_to is what I am trying to do. msg_to is at ram addresss 0x20
and I want to put 0x20 into the w reg, then load the FSR so I can do some
indirect addressing. The problem is that the assembler is putting 0xa0
into the w reg and therefore the FSR ends up pointing to nonexistant RAM.
Julian
On Mon, 14 Nov 2005, Chen Xiao Fan wrote:
>
> >From: Julian Green
> >Sent: Saturday, November 12, 2005 9:28 PM
> >To: ####@####.####
> >Subject: [gnupic] Possible gpasm or gplink bug?
>
> >The code Im doing is fairly simple:
> >
> > movlw msg_to
>
> Wait a moment, msg_to should be a literal here.
>
> > addwf RxState, w
> > movwf FSR
> >
> >msg_to - is defined as:
> >
> > serial_u udata_shr
> > msg_to res 1
>
> msg_to is now a ram variable. What should gpasm assume?
> The code is wrong.
>
> I think "movlw msg_to" should be "movf msg_to,w".
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>