Here is a sample run:
$ cat hello.imc
.pcc_sub _main prototyped
.include "DWIM.imc"
add $I0, 20, 22
print $I0
print "\nHello Parrot!\n"
end
.end
$ parrot hello.imc
42
Hello Parrot!
$ cat hello.imc
.pcc_sub _main prototyped
.include "DWIM.imc"
# DWIM $I0, 20, 22
# DWIM $I0
# DWIM "\nHello Parrot!\n"
# DWIM
.end
$ parrot hello.imc
42
Hello Parrot!
So during the first run, the DWIM lib replaces all these nasty opcodes,
which no one can remember, with the much more handsome DWIM comment.
This makes for much simpler code: just fill in the proper operands.
I should clean up and comment it a bit, then I could submit it - where?
runtime/parrot/lib ?
Have fun,
leo
> > I should clean up and comment it a bit, then I could submit it - where?
> > runtime/parrot/lib ?
Do we have an Acme directory yet?
> Dami^WLeopold Toetsch (as if you couldn't guess)
"Yet another certifiable Austral^H^Hian" :-)
Nicholas Clark
> Do we have an Acme directory yet?
Not even lib. It could go into runtime/parrot/include though, this is at
least searched for :)
>> Dami^WLeopold Toetsch (as if you couldn't guess)
> "Yet another certifiable Austral^H^Hian" :-)
Yeah - and don't mix up these countries ... Austria is the big one
easterly of Liechtenstein.
> Nicholas Clark
leo