Re: [Parrot 0.1.2] examples/assembly/ncurses_life.imc error

4 views
Skip to first unread message

Chromatic

unread,
Mar 7, 2005, 6:02:25 PM3/7/05
to Uwe Voelker, perl6-i...@perl.org
On Mon, 2005-03-07 at 20:43 +0100, Uwe Voelker wrote:

> if I try the ncurses_life.imc demo I get the error "Null PMC access in
> invoke()".

> I'm sure it has problems with the ncurses NCI. How can I solve the problem?

Apply this patch, then let me know if it fixes it for you so that I can
check it in.

For what it's worth, I turned on tracing, found the file and the line
with the problem, then removed it.

It might be better to port the demo to use the ncurses.imc file, as it
looks more recent, but this is the quickest patch I have.

-- c


ncurses_fix.patch

Leopold Toetsch

unread,
Mar 8, 2005, 3:51:38 AM3/8/05
to Uwe Voelker, perl6-i...@perl.org
Uwe Voelker <uwe.v...@gmx.de> wrote:

> if I try the ncurses_life.imc demo I get the error "Null PMC access in
> invoke()".

Thanks for reporting, fixed.

BTW: examples/assembly/ncurses_life.imc is one of the oldest PIR files
in the whole tree and therefore written in quite an antique style.

If someone wants to exercise rewritting it to recent PIR it would become
a better example.

leo

Uwe Voelker

unread,
Mar 8, 2005, 2:29:34 AM3/8/05
to perl6-i...@perl.org, Chromatic, perl6-i...@perl.org
>>if I try the ncurses_life.imc demo I get the error "Null PMC access in
>>invoke()".

> Apply this patch, then let me know if it fixes it for you so that I can
> check it in.

Yes it works!

> It might be better to port the demo to use the ncurses.imc file, as it
> looks more recent, but this is the quickest patch I have.

What is the difference of the .imc file? They both look _very_ similiar.
I could try to port the demo. Do you have a few hints, what needs to be
done.

Thanks.

Good bye, Uwe

Chromatic

unread,
Mar 8, 2005, 3:22:14 PM3/8/05
to Uwe Voelker, perl6-i...@perl.org
On Tue, 2005-03-08 at 08:29 +0100, Uwe Voelker wrote:

> What is the difference of the .imc file? They both look _very_ similiar.
> I could try to port the demo. Do you have a few hints, what needs to be
> done.

PASM is the simplest, most tedious language that Parrot supports. PIR
is nicer. Of course, both have evolved over time, so the example source
files are historically interesting in the same way as low-level geologic
strata.

Editing the example to use the .imc file instead of the .pasm file
should just fix it, but if it doesn't, my favorite way to figure out
what's wrong is to run parrot -t example_file, look for the line of code
where things go wrong, and figure out what the right syntax is.

The most current NCI examples are the SDL bindings in examples/sdl/ and
runtime/parrot/library/SDL/.

-- c

Leopold Toetsch

unread,
Mar 9, 2005, 3:07:54 AM3/9/05
to ma...@diephouse.com, perl6-i...@perl.org
Matt Diephouse <mdd...@gmail.com> wrote:

> Here's a first pass at that. I've changed it to:
> - make use of the shortcuts for calling subroutines
> - use ".sub"
> - use ".local"

Thanks, applied.
leo

Reply all
Reply to author
Forward
0 new messages