On 7/10/06, Patrick McNamara <[EMAIL PROTECTED]> wrote:

> I think what we should have is some assembler metadata.  In the
> assembly, we can indicate the polarity of assertion, and the assember
> does the inversion as necessary.
That should be quite doable.  Something like

.polarity v=+, h=-, d=+ ...

Good point.  And since d will always be +, let's make + the default.


For readability sake, I would allow for multiple polarity macros.  In
the case of duplicates, the last one take precedence with a warning.

Is that a warning condition?  Lots of assember directives are repeated
with different settings for different blocks of code.

> For disassembly, we can store some
> metadata past the end of the last instruction of the vertical program
> (inserted after the first instruction that is a JUMP or has the ret
> flag set and before the first subroutine so the disassembler can look
> for it).  This data will indicate the assembler source metadata so
> that on disassembly, the polarities will be right.  (Or, you can
> detect the polarities by scanning the program and determining which
> levels are most common, which is what I did in this one video chip
> that had to automatically detect polarity with no configuration).
>
In the vein of the KISS principle, I would let the user specify polarity
on the disassembler command line and assume all positive if the argument
is missing.  Trying to put it in the binary leads to all sorts of
problems trying to figure out where it is and if we let the disassembler
guess, we have to allow the user to override those guesses anyway as it
will invariably get it wrong at times.

We could do both.  Start with the command-line directive, and if
someone wants to add a heuristic later, that's cool too.
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to