Newsgroups: perl.perl6.internals Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org Return-Path: Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm Delivered-To: mailing list perl6-intern...@perl.org Delivered-To: perl6-intern...@perl.org Message-ID: <5.1.0.14.2.20030528110131.02739100@mail.geeksalad.org> X-Sender: webmas...@geeksalad.org@mail.geeksalad.org X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 28 May 2003 11:13:45 -0400 To: "Bryan C. Warnock" Subject: Re: IMCC, PASM and constants/macros Cc: perl6-intern...@perl.org In-Reply-To: <1054071918.2211.395.camel@wakko> References: <5.1.0.14.2.20030527080047.027605c8@mail.geeksalad.org> <5.1.0.14.2.20030526183737.027afa68@mail.geeksalad.org> <5.1.0.14.2.20030527080047.027605c8@mail.geeksalad.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-SMTPD: qpsmtpd/0.26-dev, http://develooper.com/code/qpsmtpd/ X-Spam-Check-By: one.develooper.com X-Spam-Status: No, hits=-0.1 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SMTPD_IN_RCVD,SPAM_PHRASE_01_02 version=2.44 X-SMTPD: qpsmtpd/0.26-dev, http://develooper.com/code/qpsmtpd/ Approved: n...@nntp.perl.org From: cli...@geeksalad.org (Clinton A. Pierce) Lines: 39 At 05:45 PM 5/27/2003 -0400, you wrote: >On Tue, 2003-05-27 at 08:01, Clinton A. Pierce wrote: > > At 11:57 PM 5/26/2003 -0400, Will Coleda wrote: > > >Perhaps "macros only work in assembler mode" is the issue? > > > > > >http://www.mail-archive.com/perl6-intern...@perl.org/msg14107.html > > > > > >Regards. > > > > It was, but I was looking for the "why" of it. Leo answered that ("IMCC > > has .const") so I'm all set now. > >Is there is reason not to s/\.constant/.const/g for consistency's sake? And actually, on further consideration, .const isn't what I want either. What I really want is a #define directive for general-purpose (simple) compile-time substitutions. For example, to refer to a Px register that I'm going to need on-and-off through a program's life to manage BASIC's internal stuff. # These are vastly simplified, but give you the idea .define BASICARR $P9999 .sub _DIMENSION # void DIMENSION(string array) saveall .param string array new $P0, .PerlArray BASICARR[array] = $P0 restoreall .end .sub _ARR_LOOKUP # string ARR_LOOKUP(string key) saveall .param string key set $S0, BASICARR[key] .return $S0 restoreall .end