Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Something to pass the time.

8 views
Skip to first unread message

Clinton A. Pierce

unread,
Jun 11, 2003, 11:55:46 PM6/11/03
to perl6-i...@perl.org, Dan Sugalski
If you want something to play with, update the languages/BASIC/compiler
tree and run the chess program.

perl compile.pl samples\chess.bas
..\..\imcc\imcc.exe TARG_test.imc

(modify for your path delimiters, executable extensions, etc... use a
recent version of imcc too)

I spent the last three weeks re-writing BASIC to emit IMCC and to do more
at compile-time, less at runtime. It's *very* quick after I took Leo's
hints on how to structure my IMC properly, running at about 1/4 the speed
of the same code under Microsoft's QuickBASIC. (I still need to finish
BASIC's I/O and structures...)

This version runs colorfully under Win32 consoles and Linux using a good
ANSI Terminal. I've had reports that the ANSI stuff works fine under OSX's
Terminal App and cygwin/Win32 so this should look just peachy
everywhere. Instructions on gameplay are onscreen.

The chess logic was written long, long ago by Dieter Steinwender (editor
for Computer-Schach and Spiele) for "didactic purposes". I think it was
originally to solve Checkmate-in-X-Moves problems. I've received
modification and redistribution permission from him under Parrot's terms
for this purpose.

The game is *very* deterministic and doesn't recognize a draw, therefore
autoplay mode will only perform 20 moves at a time.

Enjoy. :)


Leopold Toetsch

unread,
Jun 12, 2003, 6:09:00 AM6/12/03
to Clinton A. Pierce, perl6-i...@perl.org
Clinton A. Pierce <cli...@geeksalad.org> wrote:
> If you want something to play with, update the languages/BASIC/compiler
> tree and run the chess program.

Nice graphics.

> ..\..\imcc\imcc.exe TARG_test.imc

Please check out the latest imcc changes. Spilling performance is vastly
improved now.

leo

Nick Glencross

unread,
Jun 15, 2003, 7:18:04 AM6/15/03
to perl6-i...@perl.org
Clinton A. Pierce wrote:

> If you want something to play with, update the
> languages/BASIC/compiler tree and run the chess program.

This is an amazing milestone in the parrot (and BASIC) development
cycle. Well done!

To the wider community: BTW. For fun, I used imcc to convert the .imc to
a .pasm file, but them imcc couldn't run this file (trouble with
labels). Should this have worked?

Nick

Leopold Toetsch

unread,
Jun 15, 2003, 9:02:36 AM6/15/03
to Nick Glencross, perl6-i...@perl.org
Nick Glencross <ni...@glencros.demon.co.uk> wrote:

> To the wider community: BTW. For fun, I used imcc to convert the .imc to
> a .pasm file, but them imcc couldn't run this file (trouble with
> labels). Should this have worked?

In PASM mode the whole file is compiled at once. IMCC as well as
assemble.pl has troubles with duplicate local labels, which are not a
problem when they are in different compilation units in an .imc source
file.

IMCC could easily mangle local labels, but OTOH I don't see any reason
to compile .imc to .pasm and then compile the latter.

> Nick

leo

Mitchell N Charity

unread,
Jun 15, 2003, 12:29:35 PM6/15/03
to perl6-i...@perl.org
> To the wider community: BTW. For fun, I used imcc to convert the .imc to
> a .pasm file, but them imcc couldn't run this file (trouble with
> labels). Should this have worked?

In PASM mode the whole file is compiled at once. IMCC as well as
assemble.pl has troubles with duplicate local labels, which are not a
problem when they are in different compilation units in an .imc source
file.

IMCC could easily mangle local labels, but OTOH I don't see any reason
to compile .imc to .pasm and then compile the latter.

Wasn't there a thought of renaming the imcc executable to "parrot"?

It would seem rather unfortunate if either
(a) "parrot" creates bogus .pasm files, or
(b) "parrot" chokes on valid .pasm files,
such as those produced by... parrot.

I'm not sure which one is the case, but they both seem undesirable as
anything but a short-term "we know it's really broken and will get to
it" state.

Mitchell

0 new messages