newasm now handles constants, macros, and local labels within. Here's a short test program that exercises all three featurs. Doesn't do much, but here it is:
print "Everything else is as usual.\n" ..macro MyMacro ( FOO, Bar ) # Macros are now prepended with '.'. print .FOO # . also prepends our arguments add I3,I3,.BAR ..local $MyLabel: print "Label\n" # And label definitions if I3,.$MyLabel branch GlobalLabel ..endm print "Some stuff\n" .constant HelloWorld "Hello, World!\n" set S0,.HelloWorld GlobalLabel: print "Infinite loop here.\n" print "About to call the macro.\n" .MyMacro(S0,I3) # Invoke the macro. Note that the macro branches # to -before- this macro, so it's an infinite loop. print "We'll never get here, but here's the value of PerlArray: " print .PerlArray # It's a constant, but predefined. new P0,.PerlArray set P0[I1],.HelloWorld # Of course, keyed access still works. end Documentation in newasm has been updated, and the documentation should help explain things. Macros are not allowed to be recursive, and must be defined before they can be used. Same thing with constants. Also, note that -any- text of the form '.Foo' is a fair candidate for expansion. Also, they don't expand recursively. '.constant FOO "blah"\n.constant BAR "Hey, .FOO"' won't do what you want, sadly. It's passed the tests that I managed to change over to the new style. Feel free to report bugs and make your own changes. The most clamor that I've heard after this seems to be an all-Perl bytecode generator, so that's what I'll work on next. -- Jeff <[EMAIL PROTECTED]>