gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: gpasm Ensure bank bits are correct
From: Scott Dattalo
Date: Fri, 26 Apr 2002 10:18:44 -0700 (PDT)

On Fri, 26 Apr 2002, Anthony Tekatch wrote:

>
> When assembling with gpasm I get the following:
>
> init.asm:81:Message [302] Register in operand not in bank 0. Ensure bank
> bits are correct.

a trick from Andy Warren:

    movf  (some_reg ^ 0x80), w

If some_reg is in bank1, then the xor will make the msb 0 and the
assembler will be happy. If some_reg is not in bank1, then the msb gets
set and the assembler will complain - which in this case is good.


Scott


gnupic@linuxhacker.org