gnupic: gpasm Ensure bank bits are correct


Previous by date: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Scott Dattalo
Next by date: 26 Apr 2002 17:51:27 -0000 MPLAB over WINE and PIC18FX52, Antonio A Todo Bom
Previous in thread: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Scott Dattalo
Next in thread: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Craig Franklin

Subject: Re: gpasm Ensure bank bits are correct
From: Anthony Tekatch ####@####.####
Date: 26 Apr 2002 17:51:27 -0000
Message-Id: <20020426134603.4abc256b.anthony@unihedron.com>

On Fri, 26 Apr 2002 10:18:44 -0700 (PDT), Scott Dattalo ####@####.#### wrote:

> 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.

Oh, that's interesting. Thank you.

Is there a way to do that without extra code of the movf? Here is the code
that gpasm is complaining about:

	BSF     STATUS, RP0
	BCF     STATUS, RP1
	BCF	PIE1,TXIE	;disable the interrupt

The first two lines set the proper bits for bank 1 and the third line
accesses a register in bank 1 yet gpasm thinks bank 0 is still active.


-- 
Anthony Tekatch

Previous by date: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Scott Dattalo
Next by date: 26 Apr 2002 17:51:27 -0000 MPLAB over WINE and PIC18FX52, Antonio A Todo Bom
Previous in thread: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Scott Dattalo
Next in thread: 26 Apr 2002 17:51:27 -0000 Re: gpasm Ensure bank bits are correct, Craig Franklin


Powered by ezmlm-browse 0.20.