On Thu, 31 Jul 2003, Leopold Toetsch wrote:

> You can do that:
> .sub __main__
>    bsr _main
>    end
> .end
> .sub _main
...
> So you have just to emit code, to call your real main at the beginning. 


Well that worked, and even let me get rid of the 
endsub label:

.sub __start__
   call __main__
.end
.sub __main__
    .sub _f
        print ":)"
        ret
   .end
   $I0 = addr _f
   print $I0
   end
.end


That prints ":)", followed by the address,
which is what I wnat. I can't seem to duplicate
the problem I was having now, but somehow last
night, if I commented out the "addr" line, the
_f sub wouldn't run. In other words, it was like
the addr call was actually invoking the routine. 

Maybe I was just tired. :)



> You could also have a look at docs/calling_conventions.pod, which
> currently is being implemented.

Thanks. I hadn't seen the pdd version.
I was going off the other version in imcc/docs
[ in pirate, not in this example :) ]


> > Incidentally, I spent all day working on pirate,
> > and it now generates (and runs!) code for a bunch
> > of python structures:
> 
> Wow.

Actually, between imcc and the python compiler 
module, it's not nearly as hard as I thought it
would be. So far, I think the parrot version is
actually a lot simpler than the python compiler,
just because imcc is doing so much of the work.

Sincerely,
 
Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------



Reply via email to