gnupic: #pragma for memory maps
Subject:
Re: #pragma for memory maps
From:
Scott Dattalo ####@####.####
Date:
1 Jul 2002 15:09:25 -0000
Message-Id: <Pine.LNX.4.44.0207010753380.14104-100000@ruckus.brouhaha.com>
On 1 Jul 2002, Kevin L. Pauba wrote:
> Ricardo,
>
> After sending out the questions I just couldn't resist and started
> coding.
>
> I have the following working (cut from my p16f873.h):
>
> #pragma maxram 0x1ff
> #pragma memmap 0x20 0x07f 0 RAM 0x100
> #pragma memmap 0xa0 0x1ff 1 RAM 0x100
> #pragma badram 0x8f-0x90 0x95-0x97 0x9a-0x9d
>
> I'm going to change the inc2h.pl script to read the "__MAXRAM", and
> "__BADRAM" directives from the .inc file to write the correct #pragma's.
>
> If the syntax is acceptable, I'll send the diff's to Scott to perform a
> code review (when I make the trivial change to allow the SFR memmap
> entries).
for the memap pragma, I think the bank definition is unnecessary; it can
be inferred from the alias mask.
Isn't this an error:
#pragma memmap 0xa0 0x1ff 1 RAM 0x100
shouldn't it read
#pragma memmap 0xa0 0xff 1 RAM 0x100
(note the 0x1ff should be 0xff)
Scott