gnupic: Object File Bit Relocation


Previous by date: 26 Jan 2007 19:50:41 +0000 Re: [gnupic] 16f688 undefined _CONFIG1 _CONFIG2, Don Wooton
Next by date: 26 Jan 2007 19:50:41 +0000 Re: [gnupic] Object File Bit Relocation, Robert Pearce
Previous in thread:
Next in thread:

Subject: Object File Bit Relocation
From: "David Barnett" ####@####.####
Date: 26 Jan 2007 19:50:41 +0000
Message-Id: <04ae01c74183$32024800$2001a8c0@barnett2>

I an observation to report and a question.  To start off with, I've found a situation where gpasm acts kind of funny.  If you attempt to relocate a bit offset in a bit-oriented instruction, MPASM will complain, whereas gpasm will silently assume bit 0.  For example:
[asm]
    extern bit_field, bit_offset
my_code code
    bsf bit_field, bit_offset
[/asm]
Will fail with "relocatable symbol too complicated" in MPASM, but will produce "bsf bit_field, 0" without complaint in gpasm, regardless of the value of bit_offset.  I'm sure "silently assuming bit 0" is an oversimplification of what's actually going on inside gpasm, but I haven't checked into it yet.

I'm also wondering if there is some real limitation in the object file format that would actually prevent bit offsets from being relocated, or if it is just not supported in MPASM or gpasm.  I can imagine several uses for bit relocations.  Any idea why Microchip doesn't support them?

David

Previous by date: 26 Jan 2007 19:50:41 +0000 Re: [gnupic] 16f688 undefined _CONFIG1 _CONFIG2, Don Wooton
Next by date: 26 Jan 2007 19:50:41 +0000 Re: [gnupic] Object File Bit Relocation, Robert Pearce
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.