Gregor N. Purdy:
# Dan --
#
# > Here's something for someone looking to do something
# interesting while the
# > code freeze is on.
# >
# > Write yourself a program that takes a .pasm file and,
# rather than spitting
# > out bytecode, spits out the bodies of the opcode functions with the
# > appropriate replacements done on the parameters. The output
# should be
# > suitable for stuffing into the guts of test_main.c in the
# place of the call
# > to the runops loop.
#
# My first cut is pretty sloppy, but it does generate this C file, which
# compiles, but I don't have the time to figure out how to get
# it all the
# stuff it needs to link to. If someones gets it running, I'd

Parrot::Config may come in handy, especially @PConfig{qw(cc ccflags
libs)}.

# like to see
# how many Mops they get vs. regular.
#
# This is generated from t/test.pbc (not t/test.pasm).
#
# The code is a total hack job, but you are welcome to look at it
# (compile.pl and Parrot/OpFunc.pm).

I modified my Makefile:

--- ..\..\parrot-cvs\parrot\Makefile    Fri Sep 21 16:41:52 2001
+++ Makefile    Fri Sep 21 16:39:18 2001
@@ -15,7 +15,7 @@
 CC = cl
 LD = link
 PERL = C:\Perl\bin\perl.exe
-TEST_PROG = test_prog.exe
+TEST_PROG = test.exe
 PDUMP = pdump.exe

 .c.o:
@@ -29,12 +29,12 @@
        $(CC) -shared $(C_LIBS) -o $@ $(O_FILES)

 $(TEST_PROG): test_main$(O) $(O_FILES)
-       $(CC) $(CFLAGS) -o $(TEST_PROG) $(O_FILES) test_main$(O)
$(C_LIBS)
+       $(CC) $(CFLAGS) -o $(TEST_PROG) $(O_FILES) test$(O) $(C_LIBS)

 $(PDUMP): pdump$(O) $(O_FILES)
        $(CC) $(CFLAGS) -o $(PDUMP) $(O_FILES) pdump$(O) $(C_LIBS)

-test_main$(O): $(H_FILES)
+test$(O): $(H_FILES) test.c

 global_setup$(O): $(H_FILES)

and it built, but gave me a GPF (from trying to read memory at 0x4) when
I ran the resulting program.  Make sure that you delete test$(O) before
trying this--it's a remnant from the Configure process I never thought
of.  I'll patch Configure to delete it soon.

--Brent Dax
[EMAIL PROTECTED]

They *will* pay for what they've done.

Reply via email to