gnupic@linuxhacker.org
gnupic@linuxhacker.org
On Sat, 22 Mar 2003, Craig Franklin wrote:
> Craig Franklin wrote:
> >
> > Scott Dattalo wrote:
> > > Instead it should be like this:
> > >
> > > if ((file < 0x80) || (file > 0xf7f)) {
> > > a = 0;
> > > } else {
> > > a = 1;
> > > }
> > >
> >
> > I don't know how I made this mistake, but it is wrong. I will fix it.
> >
>
> It seemed strange that I would make an error like this. So I reviewed
> my old work. I constructed the test file to test for the boundary at
> 0x60, because that is how MPASM was operating. At the time I thought it
> was strange, but I never followed up.
>
> It looks like the boundary changes depending on what 18xx device you are
> using. My test file uses the 18f8720. 0x60 is correct for that
> device. 0x80 is probably correct for the 18f452.
Yes, you're right. The 18fxx20 have the boundary at 0x60, while the 18fxx2
have the boundary at 0x80. Sigh.
looks like we'll need:
if((file <= AccessRAMboundary) || (file>(0xf00+AccessRAMBoundary)))
a = 0;
else
a = 1;
> I need to research this some more, before any changes are made. gpasm
> assumes all 18xx devices are the same, looks like that is incorrect.
Scott
gnupic@linuxhacker.org