Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Okay, since folks are diving into IMCC (assuming we can keep a fight
> from breaking out) it's time to address bytecode loading.

> We've got the need to have subs that get executed when a code segment
> is loaded, a need to have a 'main' sub that gets executed as mainline
> code, and subs that get executed after compilation but before run.
> So, since I *hate* magic name subs, what I want to do is add tags to
> subs to indicate what they should do. So, these tags are what I want,
> to be added to the .pcc_sub line:

> MAIN
> IMMEDIATE
> LOAD
> POSTCOMP

Started that now:

The syntax (proposed and current) is for PASM:

  .pcc_sub @MAIN _main:

and for PIR:

  .sub _main prototyped, @MAIN, @IMMEDIATE, @LOAD, @POSTCOMP

albeit it doesn't make much sense, to through all possible pragmas at
one sub ;)

All these specifiers are optional.

I did choose the '@' prefix because of possible name collisions with
existing labels (like t/op/string_102.pasm). It clearly denotes that
something special is going on here.

Next will be @LOAD and possibly @MAIN functionality.

leo

Reply via email to