On 3/14/07, Petter Urkedal <[EMAIL PROTECTED]> wrote:
On 2007-03-14, Timothy Normand Miller wrote:
> The things needed are, maybe something like:
>
> - The ability to specify conditional assembly (that gets converted to
> if's in the C code).

The patch below

  * adds directives ".if EXPR", ".elseif EXPR", ".else", and ".endif".

  * checks and filter output with "indent" executable if available to
    make the generated code more reabable.

If this looks ok, I'll commit.  Sample (nonsense) input:

It looks great.  Thank you for taking care of this.

        .arg 0 a
        .arg 0 b
        .define x a - b
    start:
        jump f0
        .if x > 0
            wait x
        .endif

(I already committed a small bug fix, I assumed that was ok without
asking for review.)

We don't need to be overly strict.  You made the right decision.  In
particular, this is a case where you are an expert on what's going on,
so it's best that you make the decision.  Anything non-trivial should
at least be mentioned (for documentation purposes).  Posting to the
list is also an opportunity for people who are still learning to get
their suggestions checked in case they are mistaken about something.

If problems arise, we'll define stricter rules that I and everyone
else will follow carefully.

> - Or the ability to specify arbitrary C code in the assembly
> - And the ability to set the code address at the beginning of a
> routine (which would translate into offset being altered at run-time).

I can see interlaced.asm uses an ".addr = CONST" directive which is not
implemented.  To avoid confusion with the "addr" instruction I'd suggest
".offset CONST".

A common directive for this is "ORG".  How about we use ".org"?  In
fact, gas calls it ".org", but it appears to be relative.  In any
case, let's call it ".org" and make it an absolute program file index.
I think we're using decimal numbers for the indexes.

When you've had a chance to get all of this in, let me know, and we
can see about improving the template.
_______________________________________________
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