At 12:41 PM 8/7/2001 -0400, Uri Guttman wrote:
> >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>
> DS> Not that tricky. (And no, those aren't regex variables. I'm having
> DS> LSI-11 Macro flashbacks here)
> >>
> >> wow, the macro-11 private/lexical labels! one of the very nice features
> >> of macro-11 that is worth stealing (if perl didn't already have loops :)
>
> DS> Yup. I plan on stealing it, more or less, for the parrot assembler.
>
>we do need macros at the assembler level. i actually imagine some
>masochists^Wexperimenters will write hand parrot^Wsantana code.
Got it right the first time. Short of a decree from Larry, or some sort of
summit decision between the dynamic language folks, Parrot Is It.
And we'll definitely have folks hand-writing assembly code. Us, if nobody
else--we'll need to do so for bootstrapping and testing reasons, if nothing
else.
>there
>might even be a good use for it if the optimizor can't really tweak it
>right. so we will need many of the faetures that the classic macro
>assemblers had. i think the assembler could be written in perl(5) with
>no trouble.
>
>so here is a partial list of useful features:
>
>label support for sub calls, branching, etc.
Yup.
>immediate values (constants, strings, etc.)
Yup.
>macros with positional or named params, local label generation,
> conditionals (which execute when the macro is expanded), etc.
Not sure about that. I know it's useful, but I'm not sure how useful
relative to other things that need doing instead. (I many recant that once
I start pounding out Parrot code...)
> DS> Parrot won't care--if you want to branch someplace, go for
> DS> it. It's your responsibility as a programmer (or programmer
> DS> writing code generators) to make sure that the destination's a
> DS> valid place to branch to.
>
>and having label support will make that easier. we don't want santana
>coders to count bytes to branch. this will require 2 passes which isn't
>a major problem
Exactly. We can make multiple passes easily enough. Not like we're swapping
to tape or anything here.
> >> and pdp-11 had BR and MOV op codes, not 'store' and 'branch'.
>
> DS> Sure, but then we don't have to wedge our opcode names into the
> DS> RAD-50 restricted character sets. (We'll be able to have opcode
> DS> names longer than 6 characters, too... :)
>
>nah, i say let's restrict all santana tokens to RAD-50. these young
>whippersnappers don't know how good they have it with long names and
>full character sets.
Heh. We can make all the ASCII folks as uncomfortable as the Unicode
people. :)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk