gnupic: Re: [gnupic] Nice to have: GPASM extensions
Subject:
Re: [gnupic] Nice to have: GPASM extensions
From:
Ralph Corderoy ####@####.####
Date:
21 Mar 2008 12:29:12 -0000
Message-Id: <20080321122915.169C214A102@blake.inputplus.co.uk>
Hi,
Mauricio Giovagnini wrote:
> Vaclav Peroutka escribió:
> > I use gpasm and found that it would be nice to have following
> > features:
> > - Message [302] to display which register name is not in Bank0 - no
> > need to look back into ASM source (ideal state would be if gpasm can
> > check the RP0 and RP1 bits)
>
> I think checking the RP0 and RP1 bits itself to check if the code is
> ok or not can be tricky, and could cause more harm than what it could
> help.
>
> For example your code could set those bits in other routines and then
> you call a subroutine where you don't have those bits set. Should it
> display a warning? How can it be sure about the RP0 and RP1 status?
You're right.
What's needed, and I think I've suggested this before, is a way for the
author to indicate the bank that's intended to always be accessed by a
particular instruction and this extra "debug" data be passed through to
a simulator so it can always make that check every time the instruction
is executed. Obviously, the code running on the real metal wouldn't be
doing the check.
Cheers,
Ralph.