]> thyrsus.com Git - intercal.git/commitdiff
morefiles
authorAlex Smith <ais523@bham.ac.uk>
Sun, 27 Apr 2008 02:50:34 +0000 (22:50 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:34:52 +0000 (20:34 -0400)
114 files changed:
config.ac [new file with mode: 0644]
pit/CATALOG [new file with mode: 0644]
pit/Makefile [new file with mode: 0644]
pit/beer.doc [new file with mode: 0644]
pit/beer.i [new file with mode: 0644]
pit/blinkers [new file with mode: 0644]
pit/bubble.doc [new file with mode: 0644]
pit/bubble.i [new file with mode: 0644]
pit/change.doc [new file with mode: 0644]
pit/change.i [new file with mode: 0644]
pit/continuation.doc [new file with mode: 0644]
pit/continuation.i [new file with mode: 0644]
pit/delta.fft [new file with mode: 0644]
pit/explib/compunex.c [new file with mode: 0644]
pit/explib/syslibc.c [new file with mode: 0644]
pit/explib/syslibc.doc [new file with mode: 0644]
pit/fft.doc [new file with mode: 0644]
pit/fft.i [new file with mode: 0644]
pit/flonck.doc [new file with mode: 0644]
pit/flonck.i [new file with mode: 0644]
pit/glider [new file with mode: 0644]
pit/gun [new file with mode: 0644]
pit/hail_mary.3i [new file with mode: 0644]
pit/hail_mary.doc [new file with mode: 0644]
pit/icat.i [new file with mode: 0644]
pit/iching.doc [new file with mode: 0644]
pit/iching1.i [new file with mode: 0644]
pit/iching2.i [new file with mode: 0644]
pit/ins.doc [new file with mode: 0644]
pit/ins.i [new file with mode: 0644]
pit/interfunge.i [new file with mode: 0644]
pit/lib/1910.doc [new file with mode: 0644]
pit/lib/floatlib.doc [new file with mode: 0644]
pit/lib/floatlib.i [new file with mode: 0644]
pit/lib/lib2.doc [new file with mode: 0644]
pit/lib/lib2.i [new file with mode: 0644]
pit/lib/numio.doc [new file with mode: 0644]
pit/lib/numio.i [new file with mode: 0644]
pit/lib/plus.i [new file with mode: 0644]
pit/lib/syslib-orig.i [new file with mode: 0644]
pit/lib/syslib.3i [new file with mode: 0644]
pit/lib/syslib.4i [new file with mode: 0644]
pit/lib/syslib.5i [new file with mode: 0644]
pit/lib/syslib.6i [new file with mode: 0644]
pit/lib/syslib.7i [new file with mode: 0644]
pit/lib/syslib.doc [new file with mode: 0644]
pit/lib/syslib.i [new file with mode: 0644]
pit/lib/syslib3-7.doc [new file with mode: 0644]
pit/life.doc [new file with mode: 0644]
pit/life.i [new file with mode: 0644]
pit/life2.doc [new file with mode: 0644]
pit/life2.i [new file with mode: 0644]
pit/pass.i [new file with mode: 0644]
pit/pi.doc [new file with mode: 0644]
pit/pi.i [new file with mode: 0644]
pit/pow.i [new file with mode: 0644]
pit/primes.doc [new file with mode: 0644]
pit/primes.i [new file with mode: 0644]
pit/quine.i [new file with mode: 0644]
pit/random.doc [new file with mode: 0644]
pit/random.i [new file with mode: 0644]
pit/random2.i [new file with mode: 0644]
pit/rot13.doc [new file with mode: 0644]
pit/rot13.i [new file with mode: 0644]
pit/rot13b.doc [new file with mode: 0644]
pit/rot13b.i [new file with mode: 0644]
pit/sample.i [new file with mode: 0644]
pit/sort.i [new file with mode: 0644]
pit/syslib.i [new file with mode: 0644]
pit/t_tet [new file with mode: 0644]
pit/tests/ais1.i [new file with mode: 0644]
pit/tests/ais2.i [new file with mode: 0644]
pit/tests/arrtest.doc [new file with mode: 0644]
pit/tests/arrtest.i [new file with mode: 0644]
pit/tests/compucome.i [new file with mode: 0644]
pit/tests/count.3i [new file with mode: 0644]
pit/tests/count.doc [new file with mode: 0644]
pit/tests/hello.i [new file with mode: 0644]
pit/tests/ignorret.doc [new file with mode: 0644]
pit/tests/ignorret.i [new file with mode: 0644]
pit/tests/iogerunds.doc [new file with mode: 0644]
pit/tests/iogerunds.i [new file with mode: 0644]
pit/tests/knuth.i [new file with mode: 0644]
pit/tests/limits.3i [new file with mode: 0644]
pit/tests/limits.i [new file with mode: 0644]
pit/tests/normaldist.i [new file with mode: 0644]
pit/tests/onceagain.i [new file with mode: 0644]
pit/tests/permute.doc [new file with mode: 0644]
pit/tests/permute.i [new file with mode: 0644]
pit/tests/pictest.i [new file with mode: 0644]
pit/tests/sink.doc [new file with mode: 0644]
pit/tests/sink.i [new file with mode: 0644]
pit/tests/test1.i [new file with mode: 0644]
pit/tests/test16bit.i [new file with mode: 0644]
pit/tests/test2.i [new file with mode: 0644]
pit/tests/testarray.i [new file with mode: 0644]
pit/tests/testcf.i [new file with mode: 0644]
pit/tests/testcreate.i [new file with mode: 0644]
pit/tests/testi18n.i [new file with mode: 0644]
pit/tests/testlib2.i [new file with mode: 0644]
pit/tests/testonce.i [new file with mode: 0644]
pit/tests/testops.3i [new file with mode: 0644]
pit/tests/testops.5i [new file with mode: 0644]
pit/tests/testsplat.i [new file with mode: 0644]
pit/tests/version.4i [new file with mode: 0644]
pit/tests/version.doc [new file with mode: 0644]
pit/tests/whileadd.i [new file with mode: 0644]
pit/tophat.fft [new file with mode: 0644]
pit/tpk.doc [new file with mode: 0644]
pit/tpk.i [new file with mode: 0644]
pit/unlambda.doc [new file with mode: 0644]
pit/unlambda.i [new file with mode: 0644]
pit/yapp.doc [new file with mode: 0644]
pit/yapp.i [new file with mode: 0644]

diff --git a/config.ac b/config.ac
new file mode 100644 (file)
index 0000000..239a9d2
--- /dev/null
+++ b/config.ac
@@ -0,0 +1,107 @@
+dnl -*- autoconf -*-
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT
+AC_CONFIG_SRCDIR([src/abcess.h])
+AC_CONFIG_HEADER(temp/config.h:src/configh.in)
+
+dnl Information about this version of INTERCAL.
+PACKAGE_VERSION=1.29
+
+dnl Checks for programs.
+AC_PROG_YACC
+AC_PROG_CC
+AC_PROG_LEX
+AC_PROG_RANLIB
+AC_CHECK_PROGS(INSTALLINFO,install-info,:)
+AC_CHECK_PROGS(MANDB,mandb,:)
+AC_CHECK_PROGS(REALPATH,realpath,echo)
+
+dnl Check the location of the Info dir file if we have install-info
+if test ! $INSTALLINFO = ":"; then
+AC_MSG_CHECKING(the location of the Info dir file)
+# Try the following locations in order:
+INFODIRFILEPREFIXSAVE=$prefix
+if test x$prefix = xNONE; then
+prefix=$ac_default_prefix
+fi
+INFODIRFILELOCATIONGUESSES=$infodir/dir
+INFODIRFILELOCATIONGUESSES="$INFODIRFILELOCATIONGUESSES $infodir/dir.gz"
+INFODIRFILELOCATIONGUESSES="$INFODIRFILELOCATIONGUESSES $prefix/info/dir"
+INFODIRFILELOCATIONGUESSES="$INFODIRFILELOCATIONGUESSES $prefix/info/dir.gz"
+INFODIRFILELOCATIONGUESSES="$INFODIRFILELOCATIONGUESSES $prefix/share/info/dir"
+INFODIRFILELOCATIONGUESSES="$INFODIRFILELOCATIONGUESSES $prefix/share/info/dir.gz"
+for my_ac_temp in 1 2 3 4 5 6; do
+eval "INFODIRFILELOCATIONGUESSES=\"$INFODIRFILELOCATIONGUESSES\""
+done
+prefix=$INFODIRFILEPREFIXSAVE
+for my_ac_infodirfile in ${INFODIRFILELOCATIONGUESSES}
+do
+INFODIRFILE=${my_ac_infodirfile}
+test -e "$INFODIRFILE" && break
+INFODIRFILE=/dev/null
+done
+if test $INFODIRFILE = /dev/null; then
+AC_MSG_RESULT(not found)
+AC_MSG_WARN([Info directory file not found in the --prefix you gave.])
+AC_MSG_WARN([Info documentation will not be installed in the main directory tree.])
+AC_MSG_WARN([If you want to install in the main directory tree even though it's])
+AC_MSG_WARN([outside your --prefix, place a symlink to the directory file from])
+AC_MSG_WARN([(your prefix)/share/info/dir and reconfigure.])
+INSTALLINFO=:
+else
+AC_MSG_RESULT($INFODIRFILE)
+fi
+else
+INFODIRFILE=irrelevant
+fi
+AC_SUBST(INFODIRFILE)
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS(sys/time.h unistd.h stdarg.h)
+AC_CHECK_HEADERS(stdint.h,[HAVE_STDINT_H=1])
+AC_SUBST(HAVE_STDINT_H)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+dnl This Autoconf input is compatible with pre-C99 Autoconf, so to
+dnl check for long long AC_CHECK_SIZEOF is used to test for a nonzero result,
+dnl likewise for _Bool.
+AC_C_CONST
+AC_CHECK_SIZEOF(long long int,0)
+AC_CHECK_SIZEOF(_Bool,0)
+AC_HEADER_TIME
+AC_EXEEXT
+AC_OBJEXT
+AC_SYS_INTERPRETER
+
+AC_MSG_CHECKING(whether yyrestart() is needed)
+# Write a lex program that will cause an error if yyrestart exists.
+echo '%%
+%%
+float yyrestart(int, ...);' | $LEX
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "${LEX_OUTPUT_ROOT}.c"
+]], [[exit(0);]])],[AC_MSG_RESULT(no)],[AC_DEFINE(NEED_YYRESTART)
+AC_MSG_RESULT(yes)])
+rm -f ${LEX_OUTPUT_ROOT}.c
+
+if test "$interpval" != "no"; then
+AC_DEFINE([HAVE_SYS_INTERPRETER])
+fi
+AC_DEFINE_UNQUOTED(EXEEXT,"$EXEEXT")
+
+dnl Checks for library functions.
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(gettimeofday gethrtime strdup strtol strtoul snprintf asprintf)
+ICK_SAVECFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -lrt"
+AC_CHECK_FUNCS(clock_gettime)
+CFLAGS=$ICK_SAVECFLAGS
+
+AC_SUBST(PACKAGE_VERSION)
+
+AC_CONFIG_FILES([Makefile temp/coopt.sh:src/cooptsh.in])
+AC_OUTPUT
+dnl After the output, chmod coopt.sh to be executable.
+chmod a+x temp/coopt.sh
diff --git a/pit/CATALOG b/pit/CATALOG
new file mode 100644 (file)
index 0000000..7873d9a
--- /dev/null
@@ -0,0 +1,158 @@
+This is the directory of programs written in INTERCAL.  Most of these\r
+are no doubt full of bugs.  Don't complain, you're lucky if anything\r
+written in INTERCAL works at all.\r
+\r
+Some of these programs are explicitly licenced under the GNU GPL, just\r
+like the C-INTERCAL compiler is; therefore, remember to include\r
+COPYING.txt from the main installation directory if you want to\r
+redistribute these separately from that compiler.\r
+\r
+The subdirectory lib contains code fragments that are not complete\r
+programs.\r
+\r
+Contents:\r
+\r
+from original manual:\r
+  sample.i             Returns absolute value of a 16-bit 2s-complement number\r
+  lib/syslib.i         Standard library, with bugs fixed\r
+  lib/syslib-orig.i    Standard library (original buggy version)\r
+\r
+by Jon Blow <jon@sampo.com>\r
+  tests/sink.i  Simple test program\r
+  random.i      Random number program\r
+  lib/plus.i    Increment .1\r
+\r
+by Hans Olsson <f88ho@efd.lth.se>\r
+  lib/1910.doc  Listing of a random number routine.  Hans said he wrote this\r
+               because he couldn't find (1910) in the system library, but\r
+               it's there in our lib/syslib.i.  We keep this around as an\r
+               example.  (What? Throw away INTERCAL code? Perish the thought!)\r
+\r
+by Louis Howell <nazgul@netcom.com>\r
+  life.i        Conway's game of Life, standard INTERCAL version\r
+  life2.i       This version uses COME FROM and character output\r
+    blinkers\r
+    t_tet\r
+    glider\r
+    gun         Input files for both Life programs\r
+  bubble.i      Bubble sort\r
+  icat.i        Sends input to output\r
+  lib/lib2.i   New library routines: decrement, decrement and branch on 0,\r
+                add bit, 16-bit division with remainder, exponentiation\r
+  pi.i         Calculate pi\r
+  primes.i     Find prime numbers\r
+  pow.i                Prints a list of nth powers using old exponentiation routine\r
+  lib/syslib.i Corrected version of system library\r
+  iching1.i     Generates I Ching hexagrams\r
+  iching2.i     This version uses a lookup table to find the sequence number\r
+  iching.doc    Description of the two I Ching programs\r
+  change.i      Count up different ways to make change\r
+  change.doc    Description of change.i\r
+\r
+by Matt Dimeo <mdimeo@brooktree.com>\r
+  beer.i        Print out the lyrics to "99 Bottles of Beer On The Wall"\r
+\r
+by Stinglai Ka'abi <stinglai@bureau.World.GOV>:\r
+  random2.i    Another random-number generator\r
+\r
+by Jacob Mandelson <jlm@cco.caltech.edu>\r
+  rot13.i      Prints ROT-13 of its input\r
+\r
+by Jan-Pieter Cornet <johnpc@xs4all.nl>\r
+  hail_mary.3i         Print 1,000,000 Hail Marys\r
+  tests/count.3i        Count from 1 to 10 in TriINTERCAL\r
+  tests/iogerunds.i    Demonstrate gerund abstention\r
+\r
+by Clemens Meier <clmeier@lili.uni-bielefeld.de>\r
+  rot13b.i      Another ROT-13 program\r
+\r
+By Brian Raiter <breadbox@muppetlabs.com>\r
+  lib/numio.i      I/O routines\r
+  lib/numio.doc            Description of the I/O routines\r
+  lib/syslib.3i\r
+  lib/syslib.4i\r
+  lib/syslib.5i\r
+  lib/syslib.6i     Translations of the standard library to\r
+  lib/syslib.7i     C-INTERCAL's other bases.\r
+  lib/syslib3-7.doc Documentation for same\r
+  hello.i           The traditional hello world program\r
+  ins.i             Intersections & Splats, a Mastermind-style game\r
+  ins.doc           Documentation for I&S\r
+  yapp.i            Prints an INTERCAL program that prints\r
+  yapp.doc          Description of yapp.i\r
+  quine.i           Prints itself\r
+  lib/floatlib.i    Floating-point routines\r
+  lib/floatlib.doc  Documentation for the floating-point routines\r
+  flonck.i          An RPN calculator\r
+  flonck.doc        Documentation for flonck.i\r
+  fft.i             Fast Fourier Transform\r
+  fft.doc           Description of fft.i\r
+    delta.fft\r
+    tophat.fft      Sample input for FFT\r
+\r
+by Donald Knuth\r
+  tpk.i         Don Knuth's implementation of the TPK algorithm\r
+  tpk.doc       Don's note about the algorithm\r
+\r
+by Oerjan Johansen\r
+  unlambda.i    An Unlambda interpreter in INTERCAL\r
+  unlambda.doc  Better-commented version of the above\r
+\r
+by Jeffrey Lee\r
+  interfunge.i  A Befunge-93 interpreter in INTERCAL\r
+\r
+The subdirectory tests contains some programs written only to test the\r
+compiler.\r
+\r
+by David Moews\r
+  tests/test1.i        Prints DO THIS TEST HAS BEEN SUCCESSFULLY COMPLETED\r
+  tests/test2.i        Reads in two numbers and multiplies their product\r
+\r
+David Moews wrote of the latter (test2.i):\r
+\r
+The following program reads in two numbers and then prints their product.\r
+It consists of a trivial calling program followed by a cleaned-up version\r
+of a portion of the INTERCAL subroutine library.  (Only a portion of\r
+the INTERCAL subroutine library is present in the posted manual, and\r
+that portion is full of typos.)\r
+\r
+by Alex Smith\r
+  tests/ais1.i       A very simple test program\r
+  tests/ais2.i        A demonstration of computed ABSTAIN's power\r
+  tests/compucome.i   A program to test computed COME FROM\r
+  tests/onceagain.i   A single-threaded program testing ONCE and AGAIN\r
+  tests/arrtest.i     A program to test some changes I made to the grammar\r
+  tests/arrtest.doc   The history behind those changes\r
+  tests/permute.i     A permutation-printing program to test backtracking\r
+  tests/permute.doc   Information about the permutation-printer\r
+  tests/whileadd.i    Adds two input numbers with a single WHILE statement\r
+  tests/ignorret.i    Testing interactions of IGNORE and RETRIEVE\r
+  tests/ignorret.doc  What ignorret does on several compilers\r
+  tests/normaldist.i  Checking the standard deviation of (1910)\r
+  tests/testcreate.i  A test for the CREATE statement\r
+  explib/syslibc.c    The INTERCAL base 2 syslib, optimised version in C\r
+  explib/compunex.c   An example flow-control routine (computed NEXT)\r
+  sort.i              An insertion-sort program testing computed ABSTAIN\r
+  continuation.i      A continuation library and example program\r
+  continuation.doc    About usage and internals of the continuation library\r
+\r
+by Malcom Ryan\r
+  tests/testonce.i    A single-threaded program testing ONCE and AGAIN\r
+  pass.i              A multithread program illustrating communications\r
+                     between threads\r
+\r
+by Jeffrey Lee\r
+  interfunge.i        A Befunge-93 interpreter written in INTERCAL\r
+\r
+The programs test16bit.i, testarray.i, testcf.i, testlib2.i, mult.i,\r
+limits.{i,3i}, testops.{3i,5i}, testsplat.i, were all written by Louis\r
+Howell.  Of these, testcf.i might be considered an interesting\r
+puzzle---try to figure out what it's doing.  The others are pretty\r
+boring, but are included as diagnostics and because so few other\r
+example programs exist.  Not all of these even produce interesting\r
+diagnostic output; it may be necessary to look at the degenerated C\r
+code to determine if the compiler is doing the right thing.\r
+\r
+\r
+End of file CATALOG\r
+-------------------\r
diff --git a/pit/Makefile b/pit/Makefile
new file mode 100644 (file)
index 0000000..e500c8c
--- /dev/null
@@ -0,0 +1,147 @@
+#\r
+# Torture-tester for the INTERCAL compiler\r
+#\r
+\r
+ICK = ../ick -b\r
+\r
+SOURCES = \\r
+       ./sample.i \\r
+       ./beer.i \\r
+       ./bubble.i \\r
+       ./count.3i \\r
+       ./hail_mary.3i \\r
+       ./icat.i \\r
+       ./tests/test1.i \\r
+       ./tests/limits.i \\r
+       ./tests/limits.3i \\r
+       ./tests/test16bit.i \\r
+       ./tests/testarray.i \\r
+       ./tests/testcf.i \\r
+       ./tests/testlib2.i \\r
+       ./tests/test2.i \\r
+       ./tests/testops.3i \\r
+       ./tests/testops.5i \\r
+       ./tests/testsplat.i \\r
+       ./pow.i \\r
+       ./random.i \\r
+       ./random2.i \\r
+       ./rot13.i \\r
+       ./rot13b.i \\r
+       ./iogerunds.i \\r
+       ./pi.i \\r
+       ./lib/lib2.i \\r
+       ./lib/numio.i \\r
+       ./lib/syslib.i \\r
+       ./lib/syslib3.i \\r
+       ./lib/syslib4.i \\r
+       ./lib/syslib5.i \\r
+       ./lib/syslib6.i \\r
+       ./lib/syslib7.i \\r
+       ./lib/plus.i \\r
+       ./primes.i \\r
+       ./life.i \\r
+       ./life2.i \\r
+       ./sink.i \\r
+       ./change.i \\r
+       ./iching1.i \\r
+       ./iching2.i \\r
+       ./hello.i \\r
+       ./ins.i \\r
+       ./yapp.i\r
+\r
+TARGETS = \\r
+       ./sample \\r
+       ./beer \\r
+       ./bubble \\r
+       ./count \\r
+       ./hail_mary \\r
+       ./icat \\r
+       ./tests/test1 \\r
+       ./tests/limits \\r
+       ./tests/limits3 \\r
+       ./tests/test16bit \\r
+       ./tests/testarray \\r
+       ./tests/testcf \\r
+       ./tests/testlib2 \\r
+       ./tests/test2 \\r
+       ./tests/testops \\r
+       ./tests/testops \\r
+       ./tests/testsplat \\r
+       ./pow \\r
+       ./random \\r
+       ./random2 \\r
+       ./rot13 \\r
+       ./rot13b \\r
+       ./iogerunds \\r
+       ./pi \\r
+       ./lib/lib2 \\r
+       ./lib/numio \\r
+       ./lib/syslib \\r
+       ./lib/syslib3 \\r
+       ./lib/syslib4 \\r
+       ./lib/syslib5 \\r
+       ./lib/syslib6 \\r
+       ./lib/syslib7 \\r
+       ./lib/plus \\r
+       ./primes \\r
+       ./life \\r
+       ./life2 \\r
+       ./sink \\r
+       ./change \\r
+       ./iching1 \\r
+       ./iching2 \\r
+       ./hello \\r
+       ./ins \\r
+       ./yapp\r
+\r
+.SUFFIXES:     .i .3i .4i .5i .6i .7i\r
+\r
+.i:\r
+       $(ICK) $<\r
+\r
+.3i:\r
+       $(ICK) $<\r
+\r
+.4i:\r
+       $(ICK) $<\r
+\r
+.5i:\r
+       $(ICK) $<\r
+\r
+.6i:\r
+       $(ICK) $<\r
+\r
+.7i:\r
+       $(ICK) $<\r
+\r
+test: $(TARGETS)\r
+\r
+./lib/syslib3: ./lib/syslib.3i\r
+       cp ./lib/syslib.3i ./lib/syslib3.3i\r
+       $(ICK) ./lib/syslib3.3i\r
+\r
+./lib/syslib4: ./lib/syslib.4i\r
+       cp ./lib/syslib.4i ./lib/syslib4.4i\r
+       $(ICK) ./lib/syslib4.4i\r
+\r
+./lib/syslib5: ./lib/syslib.5i\r
+       cp ./lib/syslib.5i ./lib/syslib5.5i\r
+       $(ICK) ./lib/syslib5.5i\r
+\r
+./lib/syslib6: ./lib/syslib.6i\r
+       cp ./lib/syslib.6i ./lib/syslib6.6i\r
+       $(ICK) ./lib/syslib6.6i\r
+\r
+./lib/syslib7: ./lib/syslib.7i\r
+       cp ./lib/syslib.7i ./lib/syslib7.7i\r
+       $(ICK) ./lib/syslib7.7i\r
+\r
+./tests/limits3: ./tests/limits.3i\r
+       cp ./tests/limits.3i ./tests/limits3.3i\r
+       $(ICK) ./tests/limits3.3i\r
+\r
+lines:\r
+       wc -l $(SOURCES)\r
+\r
+clean:\r
+       rm -f $(TARGETS) *.c *.o *~ lib/syslib?.?i tests/limits3.3i\r
diff --git a/pit/beer.doc b/pit/beer.doc
new file mode 100644 (file)
index 0000000..4bc1361
--- /dev/null
@@ -0,0 +1,368 @@
+// This is beer.doc.  Strip out all comments to have a valid INTERCAL
+// program beer.i that prints out the complete lyrics to 99 Bottles of Beer
+// on the Wall.  The string arrays were computed by a 115 line perl
+// program.
+// It cops out and relies on the standard library routines for 
+// addition and subtraction to do the x++ operation.
+// -Matt DiMeo
+// -mdimeo@brooktree.com
+
+// ,10 is a bare newline from scratch.
+PLEASE DO ,10 <- #1
+PLEASE DO ,10SUB#1 <- #176
+// ,11 is bottles of beer on the wall,
+PLEASE DO ,11 <- #30
+PLEASE DO ,11SUB#1 <- #76
+       DO ,11SUB#2 <- #190
+       DO ,11SUB#3 <- #80
+       DO ,11SUB#4 <- #200
+PLEASE DO ,11SUB#5 <- #256
+       DO ,11SUB#6 <- #248
+       DO ,11SUB#7 <- #144
+       DO ,11SUB#8 <- #216
+PLEASE DO ,11SUB#9 <- #202
+       DO ,11SUB#10 <- #14
+       DO ,11SUB#11 <- #144
+       DO ,11SUB#12 <- #98
+PLEASE DO ,11SUB#13 <- #190
+       DO ,11SUB#14 <- #160
+       DO ,11SUB#15 <- #256
+       DO ,11SUB#16 <- #88
+PLEASE DO ,11SUB#17 <- #74
+       DO ,11SUB#18 <- #14
+       DO ,11SUB#19 <- #128
+       DO ,11SUB#20 <- #114
+PLEASE DO ,11SUB#21 <- #214
+       DO ,11SUB#22 <- #24
+       DO ,11SUB#23 <- #112
+       DO ,11SUB#24 <- #162
+PLEASE DO ,11SUB#25 <- #22
+       DO ,11SUB#26 <- #104
+       DO ,11SUB#27 <- #80
+       DO ,11SUB#28 <- #256
+PLEASE DO ,11SUB#29 <- #2
+       DO ,11SUB#30 <- #228
+// ,12 is bottles of beer.\nTake one down, pass it around,
+PLEASE DO ,12 <- #49
+PLEASE DO ,12SUB#1 <- #76
+       DO ,12SUB#2 <- #190
+       DO ,12SUB#3 <- #80
+       DO ,12SUB#4 <- #200
+PLEASE DO ,12SUB#5 <- #256
+       DO ,12SUB#6 <- #248
+       DO ,12SUB#7 <- #144
+       DO ,12SUB#8 <- #216
+PLEASE DO ,12SUB#9 <- #202
+       DO ,12SUB#10 <- #14
+       DO ,12SUB#11 <- #144
+       DO ,12SUB#12 <- #98
+PLEASE DO ,12SUB#13 <- #190
+       DO ,12SUB#14 <- #160
+       DO ,12SUB#15 <- #256
+       DO ,12SUB#16 <- #88
+PLEASE DO ,12SUB#17 <- #218
+       DO ,12SUB#18 <- #36
+       DO ,12SUB#19 <- #38
+       DO ,12SUB#20 <- #164
+PLEASE DO ,12SUB#21 <- #176
+       DO ,12SUB#22 <- #48
+       DO ,12SUB#23 <- #162
+       DO ,12SUB#24 <- #14
+PLEASE DO ,12SUB#25 <- #128
+       DO ,12SUB#26 <- #208
+       DO ,12SUB#27 <- #162
+       DO ,12SUB#28 <- #222
+PLEASE DO ,12SUB#29 <- #48
+       DO ,12SUB#30 <- #8
+       DO ,12SUB#31 <- #120
+       DO ,12SUB#32 <- #66
+PLEASE DO ,12SUB#33 <- #48
+       DO ,12SUB#34 <- #246
+       DO ,12SUB#35 <- #136
+       DO ,12SUB#36 <- #184
+PLEASE DO ,12SUB#37 <- #256
+       DO ,12SUB#38 <- #202
+       DO ,12SUB#39 <- #110
+       DO ,12SUB#40 <- #104
+PLEASE DO ,12SUB#41 <- #42
+       DO ,12SUB#42 <- #126
+       DO ,12SUB#43 <- #56
+       DO ,12SUB#44 <- #88
+PLEASE DO ,12SUB#45 <- #72
+       DO ,12SUB#46 <- #56
+       DO ,12SUB#47 <- #80
+       DO ,12SUB#48 <- #242
+PLEASE DO ,12SUB#49 <- #228
+// ,13 is bottles of beer on the wall.
+PLEASE DO ,13 <- #31
+PLEASE DO ,13SUB#1 <- #76
+       DO ,13SUB#2 <- #190
+       DO ,13SUB#3 <- #80
+       DO ,13SUB#4 <- #200
+PLEASE DO ,13SUB#5 <- #256
+       DO ,13SUB#6 <- #248
+       DO ,13SUB#7 <- #144
+       DO ,13SUB#8 <- #216
+PLEASE DO ,13SUB#9 <- #202
+       DO ,13SUB#10 <- #14
+       DO ,13SUB#11 <- #144
+       DO ,13SUB#12 <- #98
+PLEASE DO ,13SUB#13 <- #190
+       DO ,13SUB#14 <- #160
+       DO ,13SUB#15 <- #256
+       DO ,13SUB#16 <- #88
+PLEASE DO ,13SUB#17 <- #74
+       DO ,13SUB#18 <- #14
+       DO ,13SUB#19 <- #128
+       DO ,13SUB#20 <- #114
+PLEASE DO ,13SUB#21 <- #214
+       DO ,13SUB#22 <- #24
+       DO ,13SUB#23 <- #112
+       DO ,13SUB#24 <- #162
+PLEASE DO ,13SUB#25 <- #22
+       DO ,13SUB#26 <- #104
+       DO ,13SUB#27 <- #80
+       DO ,13SUB#28 <- #256
+PLEASE DO ,13SUB#29 <- #194
+       DO ,13SUB#30 <- #36
+       DO ,13SUB#31 <- #256
+
+// ,20 MAPS NEWLINES TO DIGITS
+PLEASE DO ,20 <- #10
+PLEASE DO ,20 SUB #1 <- #76
+       DO ,20 SUB #2 <- #196
+       DO ,20 SUB #3 <- #4
+       DO ,20 SUB #4 <- #132
+PLEASE DO ,20 SUB #5 <- #36
+       DO ,20 SUB #6 <- #164
+       DO ,20 SUB #7 <- #228
+       DO ,20 SUB #8 <- #100
+PLEASE DO ,20 SUB #9 <- #52
+       DO ,20 SUB #10 <- #180
+
+// ,21 MAPS DIGITS TO DIGITS
+PLEASE DO ,21 <- #10 BY #10
+PLEASE DO ,21SUB#1#1 <- #248
+PLEASE DO ,21SUB#1#2 <- #120
+PLEASE DO ,21SUB#1#3 <- #184
+PLEASE DO ,21SUB#1#4 <- #56
+PLEASE DO ,21SUB#1#5 <- #216
+PLEASE DO ,21SUB#1#6 <- #88
+PLEASE DO ,21SUB#1#7 <- #152
+PLEASE DO ,21SUB#1#8 <- #24
+PLEASE DO ,21SUB#1#9 <- #232
+PLEASE DO ,21SUB#1#10 <- #104
+       DO ,21SUB#2#1 <- #128
+       DO ,21SUB#2#2 <- #256
+       DO ,21SUB#2#3 <- #64
+       DO ,21SUB#2#4 <- #192
+       DO ,21SUB#2#5 <- #96
+       DO ,21SUB#2#6 <- #224
+       DO ,21SUB#2#7 <- #32
+       DO ,21SUB#2#8 <- #160
+       DO ,21SUB#2#9 <- #112
+       DO ,21SUB#2#10 <- #240
+       DO ,21SUB#3#1 <- #64
+       DO ,21SUB#3#2 <- #192
+       DO ,21SUB#3#3 <- #256
+       DO ,21SUB#3#4 <- #128
+       DO ,21SUB#3#5 <- #32
+       DO ,21SUB#3#6 <- #160
+       DO ,21SUB#3#7 <- #224
+       DO ,21SUB#3#8 <- #96
+       DO ,21SUB#3#9 <- #48
+       DO ,21SUB#3#10 <- #176
+       DO ,21SUB#4#1 <- #192
+       DO ,21SUB#4#2 <- #64
+       DO ,21SUB#4#3 <- #128
+       DO ,21SUB#4#4 <- #256
+       DO ,21SUB#4#5 <- #160
+       DO ,21SUB#4#6 <- #32
+       DO ,21SUB#4#7 <- #96
+       DO ,21SUB#4#8 <- #224
+       DO ,21SUB#4#9 <- #176
+       DO ,21SUB#4#10 <- #48
+PLEASE DO ,21SUB#5#1 <- #32
+PLEASE DO ,21SUB#5#2 <- #160
+PLEASE DO ,21SUB#5#3 <- #224
+PLEASE DO ,21SUB#5#4 <- #96
+PLEASE DO ,21SUB#5#5 <- #256
+PLEASE DO ,21SUB#5#6 <- #128
+PLEASE DO ,21SUB#5#7 <- #192
+PLEASE DO ,21SUB#5#8 <- #64
+PLEASE DO ,21SUB#5#9 <- #16
+PLEASE DO ,21SUB#5#10 <- #144
+       DO ,21SUB#6#1 <- #160
+       DO ,21SUB#6#2 <- #32
+       DO ,21SUB#6#3 <- #96
+       DO ,21SUB#6#4 <- #224
+       DO ,21SUB#6#5 <- #128
+       DO ,21SUB#6#6 <- #256
+       DO ,21SUB#6#7 <- #64
+       DO ,21SUB#6#8 <- #192
+       DO ,21SUB#6#9 <- #144
+       DO ,21SUB#6#10 <- #16
+       DO ,21SUB#7#1 <- #96
+       DO ,21SUB#7#2 <- #224
+       DO ,21SUB#7#3 <- #32
+       DO ,21SUB#7#4 <- #160
+       DO ,21SUB#7#5 <- #64
+       DO ,21SUB#7#6 <- #192
+       DO ,21SUB#7#7 <- #256
+       DO ,21SUB#7#8 <- #128
+       DO ,21SUB#7#9 <- #80
+       DO ,21SUB#7#10 <- #208
+       DO ,21SUB#8#1 <- #224
+       DO ,21SUB#8#2 <- #96
+       DO ,21SUB#8#3 <- #160
+       DO ,21SUB#8#4 <- #32
+       DO ,21SUB#8#5 <- #192
+       DO ,21SUB#8#6 <- #64
+       DO ,21SUB#8#7 <- #128
+       DO ,21SUB#8#8 <- #256
+       DO ,21SUB#8#9 <- #208
+       DO ,21SUB#8#10 <- #80
+PLEASE DO ,21SUB#9#1 <- #16
+PLEASE DO ,21SUB#9#2 <- #144
+PLEASE DO ,21SUB#9#3 <- #208
+PLEASE DO ,21SUB#9#4 <- #80
+PLEASE DO ,21SUB#9#5 <- #240
+PLEASE DO ,21SUB#9#6 <- #112
+PLEASE DO ,21SUB#9#7 <- #176
+PLEASE DO ,21SUB#9#8 <- #48
+PLEASE DO ,21SUB#9#9 <- #256
+PLEASE DO ,21SUB#9#10 <- #128
+       DO ,21SUB#10#1 <- #144
+       DO ,21SUB#10#2 <- #16
+       DO ,21SUB#10#3 <- #80
+       DO ,21SUB#10#4 <- #208
+       DO ,21SUB#10#5 <- #112
+       DO ,21SUB#10#6 <- #240
+       DO ,21SUB#10#7 <- #48
+       DO ,21SUB#10#8 <- #176
+       DO ,21SUB#10#9 <- #128
+       DO ,21SUB#10#10 <- #256
+
+// ,22 MAPS DIGITS TO SPACES
+PLEASE DO ,22 <- #10
+PLEASE DO ,22 SUB #1 <- #8
+       DO ,22 SUB #2 <- #136
+       DO ,22 SUB #3 <- #72
+       DO ,22 SUB #4 <- #200
+PLEASE DO ,22 SUB #5 <- #40
+       DO ,22 SUB #6 <- #168
+       DO ,22 SUB #7 <- #104
+       DO ,22 SUB #8 <- #232
+PLEASE DO ,22 SUB #9 <- #24
+       DO ,22 SUB #10 <- #152
+
+// ,10 ,11 ,12 ,20 ,21 and ,22 are defined by the makestrings script
+    
+// .10 contains first digit, .11 contains second.
+       DO .10 <- #9
+       DO .11 <- #9
+
+// ,10 prints a newline from scratch
+PLEASE DO ,10 <- #1
+PLEASE DO ,10SUB#1 <- #176
+       DO READ OUT ,10         // print a bare newline.
+
+       DO COME FROM (999)      // main loop.
+       DO (500) NEXT           // print the two digit number .10 .11
+                               //   returning the offset to get to a space
+                               //   in .5.
+PLEASE DO ,11SUB#1 <- .5       // bottles of beer on the wall
+       DO READ OUT ,11
+
+       DO (500) NEXT           // print the two digit number .10 .11
+       DO ,12SUB#1 <- .5       // bottles of beer. Take...around,
+PLEASE DO READ OUT ,12
+
+       // .6 = (.10 == 0 ? 1 : 2) snagged from line 54 of library.
+PLEASE DO .6 <- '?"!10~.10'~#1"$#1'~#3
+       // this line, line 50, and line 51 form a conditional.
+       DO (50) NEXT
+       // end up here if .10 != 0
+
+       // conditional on .11==0?
+PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3         // same for .7
+       DO (70) NEXT
+       // .11 != 0
+
+       // subtract 1 from .11 (second digit).
+       DO .2 <- #1
+       DO .1 <- .11
+PLEASE DO (1010) NEXT          // .3 = .1 - .2 = .11 - 1
+       DO .11 <- .3
+       DO (600) NEXT           // print last verse line
+       DO (101) NEXT           // jump out of loop.
+
+(70)   DO (71) NEXT
+       // .11 == 0
+       DO .11 <- #9            // roll over second digit
+
+       // subtract 1 from first digit
+       DO .2 <- #1
+PLEASE DO .1 <- .10
+       DO (1010) NEXT          // .3 = .1 - .2 = .10 - 1
+       DO .10 <- .3
+
+       DO (600) NEXT           // print last verse line
+       DO (101) NEXT           // jump out of loop.
+(71)   DO RESUME .7            // end if .11 == 0
+
+(50)   DO (51) NEXT
+PLEASE DO FORGET #1
+       // end up here if .10 == 0.  
+
+       // subtract 1 from .11 (second digit).
+       DO .2 <- #1
+       DO .1 <- .11
+PLEASE DO (1010) NEXT          // .3 = .1 - .2 = .11 - 1
+       DO .11 <- .3
+
+       DO (600) NEXT           // print last verse line
+PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3         // same for .7
+       DO (80) NEXT
+       // .10 == 0, .11 != 0
+       DO (101) NEXT
+
+
+(80)   DO (81) NEXT
+       // .10 == 0, .11 == 0
+
+       DO GIVE UP
+
+(81)   DO RESUME .7
+
+
+(51)   DO RESUME .6            // end if .10 == 0 
+
+(101) DO FORGET #1
+
+(999) DO FORGET #1             // dummy statement
+
+// subroutine to print last line of a verse.
+(600)  DO (500) NEXT           // print the two digit number .10 .11
+       DO ,13SUB#1 <- .5       // bottles of beer on the wall.
+       DO READ OUT ,13 
+       DO RESUME #1
+
+// subroutine to print a two digit number.  The first digit is in .10,
+// the second is in .11.  Returns the index to be READ OUT to get to a
+// space in .5.
+(500)  DO ,30 <- #1            // 1 elt array for printing. 
+       DO .1 <- .10            // .1 gets first digit.
+       DO (1020) NEXT          // .1++
+PLEASE DO ,30SUB#1 <- ,20SUB.1  // map from newline to digit
+       DO READ OUT ,30         // print the digit.
+
+       // now we map from the first digit to the second digit.
+       DO .3 <- .1             // stash array index away.
+       DO .1 <- .11            // .1 gets second digit.
+       DO (1020) NEXT          // .1++
+PLEASE DO ,30SUB#1 <- ,21SUB .3 .1  // map from first digit to second digit
+       DO READ OUT ,30         // print the digit.
+       DO .5 <- ,22SUB.1       // map to space and return that value.
+
+PLEASE DO RESUME #1            // return from (500) subrtn.
diff --git a/pit/beer.i b/pit/beer.i
new file mode 100644 (file)
index 0000000..4f5faaf
--- /dev/null
@@ -0,0 +1,301 @@
+PLEASE DO ,10 <- #1
+PLEASE DO ,10SUB#1 <- #176
+PLEASE DO ,11 <- #30
+PLEASE DO ,11SUB#1 <- #76
+       DO ,11SUB#2 <- #190
+       DO ,11SUB#3 <- #80
+       DO ,11SUB#4 <- #200
+PLEASE DO ,11SUB#5 <- #256
+       DO ,11SUB#6 <- #248
+       DO ,11SUB#7 <- #144
+       DO ,11SUB#8 <- #216
+PLEASE DO ,11SUB#9 <- #202
+       DO ,11SUB#10 <- #14
+       DO ,11SUB#11 <- #144
+       DO ,11SUB#12 <- #98
+PLEASE DO ,11SUB#13 <- #190
+       DO ,11SUB#14 <- #160
+       DO ,11SUB#15 <- #256
+       DO ,11SUB#16 <- #88
+PLEASE DO ,11SUB#17 <- #74
+       DO ,11SUB#18 <- #14
+       DO ,11SUB#19 <- #128
+       DO ,11SUB#20 <- #114
+PLEASE DO ,11SUB#21 <- #214
+       DO ,11SUB#22 <- #24
+       DO ,11SUB#23 <- #112
+       DO ,11SUB#24 <- #162
+PLEASE DO ,11SUB#25 <- #22
+       DO ,11SUB#26 <- #104
+       DO ,11SUB#27 <- #80
+       DO ,11SUB#28 <- #256
+PLEASE DO ,11SUB#29 <- #2
+       DO ,11SUB#30 <- #228
+PLEASE DO ,12 <- #49
+PLEASE DO ,12SUB#1 <- #76
+       DO ,12SUB#2 <- #190
+       DO ,12SUB#3 <- #80
+       DO ,12SUB#4 <- #200
+PLEASE DO ,12SUB#5 <- #256
+       DO ,12SUB#6 <- #248
+       DO ,12SUB#7 <- #144
+       DO ,12SUB#8 <- #216
+PLEASE DO ,12SUB#9 <- #202
+       DO ,12SUB#10 <- #14
+       DO ,12SUB#11 <- #144
+       DO ,12SUB#12 <- #98
+PLEASE DO ,12SUB#13 <- #190
+       DO ,12SUB#14 <- #160
+       DO ,12SUB#15 <- #256
+       DO ,12SUB#16 <- #88
+PLEASE DO ,12SUB#17 <- #218
+       DO ,12SUB#18 <- #36
+       DO ,12SUB#19 <- #38
+       DO ,12SUB#20 <- #164
+PLEASE DO ,12SUB#21 <- #176
+       DO ,12SUB#22 <- #48
+       DO ,12SUB#23 <- #162
+       DO ,12SUB#24 <- #14
+PLEASE DO ,12SUB#25 <- #128
+       DO ,12SUB#26 <- #208
+       DO ,12SUB#27 <- #162
+       DO ,12SUB#28 <- #222
+PLEASE DO ,12SUB#29 <- #48
+       DO ,12SUB#30 <- #8
+       DO ,12SUB#31 <- #120
+       DO ,12SUB#32 <- #66
+PLEASE DO ,12SUB#33 <- #48
+       DO ,12SUB#34 <- #246
+       DO ,12SUB#35 <- #136
+       DO ,12SUB#36 <- #184
+PLEASE DO ,12SUB#37 <- #256
+       DO ,12SUB#38 <- #202
+       DO ,12SUB#39 <- #110
+       DO ,12SUB#40 <- #104
+PLEASE DO ,12SUB#41 <- #42
+       DO ,12SUB#42 <- #126
+       DO ,12SUB#43 <- #56
+       DO ,12SUB#44 <- #88
+PLEASE DO ,12SUB#45 <- #72
+       DO ,12SUB#46 <- #56
+       DO ,12SUB#47 <- #80
+       DO ,12SUB#48 <- #242
+PLEASE DO ,12SUB#49 <- #228
+PLEASE DO ,13 <- #31
+PLEASE DO ,13SUB#1 <- #76
+       DO ,13SUB#2 <- #190
+       DO ,13SUB#3 <- #80
+       DO ,13SUB#4 <- #200
+PLEASE DO ,13SUB#5 <- #256
+       DO ,13SUB#6 <- #248
+       DO ,13SUB#7 <- #144
+       DO ,13SUB#8 <- #216
+PLEASE DO ,13SUB#9 <- #202
+       DO ,13SUB#10 <- #14
+       DO ,13SUB#11 <- #144
+       DO ,13SUB#12 <- #98
+PLEASE DO ,13SUB#13 <- #190
+       DO ,13SUB#14 <- #160
+       DO ,13SUB#15 <- #256
+       DO ,13SUB#16 <- #88
+PLEASE DO ,13SUB#17 <- #74
+       DO ,13SUB#18 <- #14
+       DO ,13SUB#19 <- #128
+       DO ,13SUB#20 <- #114
+PLEASE DO ,13SUB#21 <- #214
+       DO ,13SUB#22 <- #24
+       DO ,13SUB#23 <- #112
+       DO ,13SUB#24 <- #162
+PLEASE DO ,13SUB#25 <- #22
+       DO ,13SUB#26 <- #104
+       DO ,13SUB#27 <- #80
+       DO ,13SUB#28 <- #256
+PLEASE DO ,13SUB#29 <- #194
+       DO ,13SUB#30 <- #36
+       DO ,13SUB#31 <- #256
+PLEASE DO ,20 <- #10
+PLEASE DO ,20 SUB #1 <- #76
+       DO ,20 SUB #2 <- #196
+       DO ,20 SUB #3 <- #4
+       DO ,20 SUB #4 <- #132
+PLEASE DO ,20 SUB #5 <- #36
+       DO ,20 SUB #6 <- #164
+       DO ,20 SUB #7 <- #228
+       DO ,20 SUB #8 <- #100
+PLEASE DO ,20 SUB #9 <- #52
+       DO ,20 SUB #10 <- #180
+PLEASE DO ,21 <- #10 BY #10
+PLEASE DO ,21SUB#1#1 <- #248
+PLEASE DO ,21SUB#1#2 <- #120
+PLEASE DO ,21SUB#1#3 <- #184
+PLEASE DO ,21SUB#1#4 <- #56
+PLEASE DO ,21SUB#1#5 <- #216
+PLEASE DO ,21SUB#1#6 <- #88
+PLEASE DO ,21SUB#1#7 <- #152
+PLEASE DO ,21SUB#1#8 <- #24
+PLEASE DO ,21SUB#1#9 <- #232
+PLEASE DO ,21SUB#1#10 <- #104
+       DO ,21SUB#2#1 <- #128
+       DO ,21SUB#2#2 <- #256
+       DO ,21SUB#2#3 <- #64
+       DO ,21SUB#2#4 <- #192
+       DO ,21SUB#2#5 <- #96
+       DO ,21SUB#2#6 <- #224
+       DO ,21SUB#2#7 <- #32
+       DO ,21SUB#2#8 <- #160
+       DO ,21SUB#2#9 <- #112
+       DO ,21SUB#2#10 <- #240
+       DO ,21SUB#3#1 <- #64
+       DO ,21SUB#3#2 <- #192
+       DO ,21SUB#3#3 <- #256
+       DO ,21SUB#3#4 <- #128
+       DO ,21SUB#3#5 <- #32
+       DO ,21SUB#3#6 <- #160
+       DO ,21SUB#3#7 <- #224
+       DO ,21SUB#3#8 <- #96
+       DO ,21SUB#3#9 <- #48
+       DO ,21SUB#3#10 <- #176
+       DO ,21SUB#4#1 <- #192
+       DO ,21SUB#4#2 <- #64
+       DO ,21SUB#4#3 <- #128
+       DO ,21SUB#4#4 <- #256
+       DO ,21SUB#4#5 <- #160
+       DO ,21SUB#4#6 <- #32
+       DO ,21SUB#4#7 <- #96
+       DO ,21SUB#4#8 <- #224
+       DO ,21SUB#4#9 <- #176
+       DO ,21SUB#4#10 <- #48
+PLEASE DO ,21SUB#5#1 <- #32
+PLEASE DO ,21SUB#5#2 <- #160
+PLEASE DO ,21SUB#5#3 <- #224
+PLEASE DO ,21SUB#5#4 <- #96
+PLEASE DO ,21SUB#5#5 <- #256
+PLEASE DO ,21SUB#5#6 <- #128
+PLEASE DO ,21SUB#5#7 <- #192
+PLEASE DO ,21SUB#5#8 <- #64
+PLEASE DO ,21SUB#5#9 <- #16
+PLEASE DO ,21SUB#5#10 <- #144
+       DO ,21SUB#6#1 <- #160
+       DO ,21SUB#6#2 <- #32
+       DO ,21SUB#6#3 <- #96
+       DO ,21SUB#6#4 <- #224
+       DO ,21SUB#6#5 <- #128
+       DO ,21SUB#6#6 <- #256
+       DO ,21SUB#6#7 <- #64
+       DO ,21SUB#6#8 <- #192
+       DO ,21SUB#6#9 <- #144
+       DO ,21SUB#6#10 <- #16
+       DO ,21SUB#7#1 <- #96
+       DO ,21SUB#7#2 <- #224
+       DO ,21SUB#7#3 <- #32
+       DO ,21SUB#7#4 <- #160
+       DO ,21SUB#7#5 <- #64
+       DO ,21SUB#7#6 <- #192
+       DO ,21SUB#7#7 <- #256
+       DO ,21SUB#7#8 <- #128
+       DO ,21SUB#7#9 <- #80
+       DO ,21SUB#7#10 <- #208
+       DO ,21SUB#8#1 <- #224
+       DO ,21SUB#8#2 <- #96
+       DO ,21SUB#8#3 <- #160
+       DO ,21SUB#8#4 <- #32
+       DO ,21SUB#8#5 <- #192
+       DO ,21SUB#8#6 <- #64
+       DO ,21SUB#8#7 <- #128
+       DO ,21SUB#8#8 <- #256
+       DO ,21SUB#8#9 <- #208
+       DO ,21SUB#8#10 <- #80
+PLEASE DO ,21SUB#9#1 <- #16
+PLEASE DO ,21SUB#9#2 <- #144
+PLEASE DO ,21SUB#9#3 <- #208
+PLEASE DO ,21SUB#9#4 <- #80
+PLEASE DO ,21SUB#9#5 <- #240
+PLEASE DO ,21SUB#9#6 <- #112
+PLEASE DO ,21SUB#9#7 <- #176
+PLEASE DO ,21SUB#9#8 <- #48
+PLEASE DO ,21SUB#9#9 <- #256
+PLEASE DO ,21SUB#9#10 <- #128
+       DO ,21SUB#10#1 <- #144
+       DO ,21SUB#10#2 <- #16
+       DO ,21SUB#10#3 <- #80
+       DO ,21SUB#10#4 <- #208
+       DO ,21SUB#10#5 <- #112
+       DO ,21SUB#10#6 <- #240
+       DO ,21SUB#10#7 <- #48
+       DO ,21SUB#10#8 <- #176
+       DO ,21SUB#10#9 <- #128
+       DO ,21SUB#10#10 <- #256
+PLEASE DO ,22 <- #10
+PLEASE DO ,22 SUB #1 <- #8
+       DO ,22 SUB #2 <- #136
+       DO ,22 SUB #3 <- #72
+       DO ,22 SUB #4 <- #200
+PLEASE DO ,22 SUB #5 <- #40
+       DO ,22 SUB #6 <- #168
+       DO ,22 SUB #7 <- #104
+       DO ,22 SUB #8 <- #232
+PLEASE DO ,22 SUB #9 <- #24
+       DO ,22 SUB #10 <- #152
+       DO .10 <- #9
+       DO .11 <- #9
+PLEASE DO ,10 <- #1
+PLEASE DO ,10SUB#1 <- #176
+       DO READ OUT ,10         
+       DO COME FROM (999)      
+       DO (500) NEXT           
+PLEASE DO ,11SUB#1 <- .5       
+       DO READ OUT ,11
+       DO (500) NEXT           
+       DO ,12SUB#1 <- .5       
+PLEASE DO READ OUT ,12
+PLEASE DO .6 <- '?"!10~.10'~#1"$#1'~#3
+       DO (50) NEXT
+PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3         
+       DO (70) NEXT
+       DO .2 <- #1
+       DO .1 <- .11
+PLEASE DO (1010) NEXT          
+       DO .11 <- .3
+       DO (600) NEXT           
+       DO (101) NEXT           
+(70)   DO (71) NEXT
+       DO .11 <- #9            
+       DO .2 <- #1
+PLEASE DO .1 <- .10
+       DO (1010) NEXT          
+       DO .10 <- .3
+       DO (600) NEXT           
+       DO (101) NEXT           
+(71)   DO RESUME .7            
+(50)   DO (51) NEXT
+PLEASE DO FORGET #1
+       DO .2 <- #1
+       DO .1 <- .11
+PLEASE DO (1010) NEXT          
+       DO .11 <- .3
+       DO (600) NEXT           
+PLEASE DO .7 <- '?"!11~.11'~#1"$#1'~#3         
+       DO (80) NEXT
+       DO (101) NEXT
+(80)   DO (81) NEXT
+       DO GIVE UP
+(81)   DO RESUME .7
+(51)   DO RESUME .6            
+(101) DO FORGET #1
+(999) DO FORGET #1             
+(600)  DO (500) NEXT           
+       DO ,13SUB#1 <- .5       
+       DO READ OUT ,13 
+       DO RESUME #1
+(500)  DO ,30 <- #1            
+       DO .1 <- .10            
+       DO (1020) NEXT          
+PLEASE DO ,30SUB#1 <- ,20SUB.1  
+       DO READ OUT ,30         
+       DO .3 <- .1             
+       DO .1 <- .11            
+       DO (1020) NEXT          
+PLEASE DO ,30SUB#1 <- ,21SUB .3 .1  
+       DO READ OUT ,30         
+       DO .5 <- ,22SUB.1       
+PLEASE DO RESUME #1            
diff --git a/pit/blinkers b/pit/blinkers
new file mode 100644 (file)
index 0000000..b1ea1fc
--- /dev/null
@@ -0,0 +1,16 @@
+NINE\r
+FIVE\r
+THREE\r
+TWO\r
+THREE\r
+THREE\r
+THREE\r
+FOUR\r
+THREE\r
+SIX\r
+THREE\r
+SEVEN\r
+THREE\r
+EIGHT\r
+THREE\r
+ZERO\r
diff --git a/pit/bubble.doc b/pit/bubble.doc
new file mode 100644 (file)
index 0000000..c847f63
--- /dev/null
@@ -0,0 +1,109 @@
+
+As documentation for the program bubble.i, I am including below the
+original posting message, with the program itself deleted.  The
+present program bubble.i is nearly identical to the one that was
+posted.  The only difference is that I have now fixed the compiler
+bug that made the temporary variable .4 necessary, so that variable
+has been eliminated from the current version of the program.  The
+old version of the compare-and-exchange routine, where this variable
+was used, is included at the end of the file.
+
+                           Louis Howell
+                           November 24, 1991
+
+-----------------------------------------------------------------------------
+
+Subject: Bubble sort routine
+Newsgroups: alt.lang.intercal
+From: Louis Howell
+Date: Thu, 7 Feb 91 18:56:34 PST
+
+I am including below an Intercal bubble sort routine along with a
+program to call it, which you may find amusing.  The program first
+reads the number of elements to be sorted, then reads that many
+numbers, then sorts those numbers and prints them out from highest
+to lowest.  There must be at least two elements to be sorted.
+
+There are several interesting things about this program.  First, it
+uses a new version of the (2000) and (2010) decrement routine.  This
+one is functionally identical to the one included with the Life program,
+but is streamlined by eliminating the need for the temporary variable .3,
+and thus should run significantly faster.
+
+The program itself uses my best effort towards passing a routine as an
+argument to another routine.  I have separated out the compare-and-exchange
+routine from the rest of the bubble sort on the assumption that people
+might want to sort different things in different ways.  You could also
+use this bubble sort to sort 32 bit arrays, for example, or to sort arrays
+in the opposite order, or to sort arrays starting at some index other
+than 1.  It was therefore desirable to not only separate out the
+compare-and-exchange function, but avoid telling the bubble sort routine
+where this function is, or even what array it is sorting.  (This reduces
+the bubble sort to nothing more than a nested pair of loops, but one
+can easily envision wanting to do something similar with more complicated
+routines.)
+
+The program therefore operates as follows:  Main program initializes array,
+then jumps to head of c-and-e routine, which immediately jumps to bubble
+sort.  Return addresses for both the main program and the subroutine are
+now available on the RESUME stack.  The bubble sort expects .1 to contain
+the number of elements to be sorted, and proceeds to go through the
+necessary loops.  Each time through the loop, the bubble sort returns to
+the c-and-e routine with the indices of the elements to be compared
+stored in .1 and .2; the c-and-e routine does its job then jumps back
+into the bubble sort.  When the bubble sort finishes its loops it jumps
+back to the main program using the return address which has been sitting
+on the bottom of the stack all this time.  Main program prints out results.
+
+The loops used by the bubble sort are equivalent to the Fortran
+       DO 20 I = N,2,-1
+          DO 10 J = N-1,1,-1
+The way this is accomplished is pretty incomprehensible, as the loop
+tests aren't independent---they share some code between them.  See how
+fast you can figure out how they work.  Hint:  If you can't see why the
+last statement is DO RESUME #4 (instead of #3), you have not yet
+achieved enlightenment.
+
+In the c-and-e routine the temporary variable .4 is not really necessary.
+It is used to work around a bug in the array implementation which prevents
+you from using two different subscripts on the same array in the same
+statement.  Chances are this will be fixed before the array stuff is
+released, in which case .4 should be eliminated by folding the pairs of
+statements together in the obvious way.
+
+On with the program---
+
+
+  [Program deleted, see bubble.i for the current version.]
+
+
+This is the original version of the compare-and-exchange routine:
+
+       PLEASE NOTE COMPARE AND EXCHANGE ROUTINE
+(500)  PLEASE ABSTAIN FROM (502)
+       DO (3000) NEXT
+       DO (501) NEXT
+(501)   PLEASE FORGET #1
+(502)   DO (3010) NEXT
+       PLEASE REINSTATE (502)
+       DO .4 <- ",1SUB.1"
+        DO .3 <- '?.4$,1SUB.2'~'#0$#65535'
+        DO .3 <- '?"'& "'",1SUB.1"~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'" $
+                       ".3~.3"'~#1" $
+                  #1'~#3
+       DO (503) NEXT
+       DO .3 <- ,1 SUB .1
+       DO .4 <- ,1 SUB .2
+       DO ,1 SUB .1 <- .4
+       DO ,1 SUB .2 <- .3
+       DO (501) NEXT
+(504)   PLEASE RESUME .3
+(503)   DO (504) NEXT
+       PLEASE FORGET #1
+       DO (501) NEXT
+
+-- 
+Louis Howell
+
+  "But when we got into the street I viddied that thinking is for the gloopy
+ones and that the oomny ones use like inspiration and what Bog sends."
diff --git a/pit/bubble.i b/pit/bubble.i
new file mode 100644 (file)
index 0000000..deba08e
--- /dev/null
@@ -0,0 +1,94 @@
+
+       DO WRITE IN .2
+       DO ,1 <- .2
+
+       PLEASE NOTE INITIAL SEQUENCE INPUT
+       DO .1 <- .2
+        DO (110) NEXT
+(110)   DO FORGET #1
+       DO WRITE IN ,1 SUB .1
+       DO (111) NEXT
+(112)   DO (2010) NEXT
+       DO FORGET #2
+       DO (110) NEXT
+(111)  DO (112) NEXT
+       DO FORGET #1
+
+       PLEASE NOTE CALLING SORT ROUTINE INDIRECTLY
+       DO .1 <- .2
+       DO (500) NEXT
+
+       PLEASE NOTE SORTED SEQUENCE OUTPUT
+       DO .1 <- .2
+        DO (210) NEXT
+(210)   DO FORGET #1
+       DO READ OUT ,1 SUB .1
+       DO (211) NEXT
+(212)   DO (2010) NEXT
+       DO FORGET #2
+       DO (210) NEXT
+(211)  DO (212) NEXT
+       DO FORGET #1
+
+       PLEASE GIVE UP
+
+       PLEASE NOTE COMPARE AND EXCHANGE ROUTINE
+(500)  PLEASE ABSTAIN FROM (502)
+       DO (3000) NEXT
+       DO (501) NEXT
+(501)   DO FORGET #1
+(502)   DO (3010) NEXT
+       PLEASE REINSTATE (502)
+        DO .3 <- '?",1SUB.1"$,1SUB.2'~'#0$#65535'
+        DO .3 <- '?"'& "'",1SUB.1"~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'" $
+                       ".3~.3"'~#1" $
+                  #1'~#3
+       DO (503) NEXT
+       DO .3 <- ,1 SUB .1
+       DO ,1 SUB .1 <- ,1 SUB .2
+       DO ,1 SUB .2 <- .3
+       DO (501) NEXT
+(504)   PLEASE RESUME .3
+(503)   DO (504) NEXT
+       DO FORGET #1
+       DO (501) NEXT
+
+
+       PLEASE NOTE BUBBLE SORT ROUTINE
+       PLEASE NOTE THAT EXCHANGE ROUTINE SHOULD NOT CHANGE .1 OR .2
+(3000) PLEASE STASH .1 + .2
+       DO .2 <- .1
+       DO (2000) NEXT
+       DO (3001) NEXT
+(3001)  DO FORGET #1
+       DO RESUME #1
+(3011) DO (2010) NEXT
+       DO FORGET #1
+       DO (3001) NEXT
+(3010)  DO (3011) NEXT
+       DO (3012) NEXT
+(3013) DO .1 <- .2
+       DO (2010) NEXT
+       DO FORGET #2
+       DO .2 <- .1
+       DO (3010) NEXT
+       DO RESUME #1
+(3012)  DO (3013) NEXT
+       PLEASE RETRIEVE .1 + .2
+       DO RESUME #4
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  DO FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
diff --git a/pit/change.doc b/pit/change.doc
new file mode 100644 (file)
index 0000000..593823f
--- /dev/null
@@ -0,0 +1,31 @@
+The problem is to determine how many different ways there are to make
+change for a given amount using five denominations of US coins
+(including the 50-cent piece). One version -- taken directly from
+section 1.2.2 of Abelson and Sussman (1st edition, 1985) -- recurses
+both towards lower amounts and fewer kinds of coins.  The space
+required by this tree recursion grows rapidly with the size of the
+problem. The other version is a minor modification which makes the
+long ``amount'' direction tail-recursive. The ``kinds'' direction is
+still recursive, but with only five kinds of coins there need be only
+five stack frames for the routine allocated at a time.
+
+In case it isn't obvious, the routine starting at (100) is the
+function ``first-denomination'' (one of the few things INTERCAL can do
+easily), the one at (200) is the recursive version ``cc'', and (300)
+starts the tail-recursive routine ``cc-tail''. The first few lines are
+the main program, which you can change to run the recursive version by
+calling (200) instead of (300). The (2000) routine at the end
+decrements .1, and I make calls to the addition and subtraction
+routines in the standard library.
+
+Two stacks are involved: the variable stack accessed by STASH and
+RETRIEVE, and the call stack accessed by NEXT and RESUME. The former
+is limited only by memory, but the latter is supposed to have a
+built-in limit of 80 pending returns. The tail-recursive routine has
+no problem with this. However, in order to permit the recursive
+routine (200) to run with amounts greater than 70, I had to remake the
+INTERCAL compiler with a larger limit.
+
+
+(To see this program compared with similar programs in other languages,
+visit http://www.webcom.com/nazgul/change.html.)
\ No newline at end of file
diff --git a/pit/change.i b/pit/change.i
new file mode 100644 (file)
index 0000000..a43d102
--- /dev/null
@@ -0,0 +1,92 @@
+        DO WRITE IN .4
+        DO .5 <- #5
+        DO .6 <- #0
+        DO (300) NEXT
+        DO READ OUT .3
+        PLEASE GIVE UP
+
+(100)   DO (110) NEXT
+        DO .2 <- #50
+        PLEASE RESUME #1
+(110)   DO (120) NEXT
+        DO .2 <- #25
+        PLEASE RESUME #2
+(120)   DO (130) NEXT
+        DO .2 <- #10
+        PLEASE RESUME #3
+(130)   DO (140) NEXT
+        DO .2 <- #5
+        PLEASE RESUME #4
+(140)   DO (150) NEXT
+        DO .2 <- #1
+        PLEASE RESUME #5
+(150)   DO RESUME .5
+
+(200)   DO (201) NEXT
+        DO .3 <- #1
+        DO RESUME #1
+(202)   PLEASE RESUME '?"!4~.4'~#1"$#2'~#3
+(201)   DO (202) NEXT
+        DO (203) NEXT
+        DO .3 <- #0
+        DO RESUME #2
+(204)   PLEASE RESUME '?"'&"?!4~#32768'$#1"$".5~.5"'~#1"$#2'~#3
+(203)   DO (204) NEXT
+        PLEASE FORGET #2
+        DO .1 <- .4
+        DO (100) NEXT
+        DO (1010) NEXT
+        PLEASE STASH .4
+        DO .4 <- .3
+        DO (200) NEXT
+        PLEASE RETRIEVE .4
+        PLEASE STASH .5 + .6
+        DO .6 <- .3
+        DO .1 <- .5
+        DO (2000) NEXT
+        DO .5 <- .1
+        DO (200) NEXT
+        DO .1 <- .3
+        DO .2 <- .6
+        PLEASE RETRIEVE .5 + .6
+        DO (1000) NEXT
+        PLEASE RESUME #1
+
+        PLEASE COME FROM (310)
+(300)   DO (301) NEXT
+        DO .1 <- .6
+        DO (1020) NEXT
+        DO .3 <- .1
+        DO RESUME #1
+(302)   PLEASE RESUME '?"!4~.4'~#1"$#2'~#3
+(301)   DO (302) NEXT
+        DO (303) NEXT
+        DO .3 <- .6
+        DO RESUME #2
+(304)   PLEASE RESUME '?"'&"?!4~#32768'$#1"$".5~.5"'~#1"$#2'~#3
+(303)   DO (304) NEXT
+        PLEASE FORGET #2
+        DO .1 <- .5
+        DO (2000) NEXT
+        PLEASE STASH .4 + .5
+        DO .5 <- .1
+        DO (300) NEXT
+        PLEASE RETRIEVE .4 + .5
+        DO .6 <- .3
+        DO .1 <- .4
+        DO (100) NEXT
+        DO (1010) NEXT
+(310)   DO .4 <- .3
+
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004)  PLEASE RESUME #2
diff --git a/pit/continuation.doc b/pit/continuation.doc
new file mode 100644 (file)
index 0000000..29b508d
--- /dev/null
@@ -0,0 +1,120 @@
+Alex Smith, 2008
+
+continuation.i is a continuation library for INTERCAL, and a small
+program at the end to demonstrate how it is used and as a test. (Your
+most likely use of this is to delete the test program at the end and
+use the rest as a library in your own source code.) It requires at
+least the command line options -am to work (so is unfortunately, but
+inevitably, incompatible with -e). All line numbers in the library
+part are in the range 8200-8299; there's a dependence on syslib, but
+only for (1020), so it would be easy to make it a truly independent
+library. I have avoided computed COME FROM in writing it, because its
+performance is bad enough as it is, and NEXT FROM didn't turn up, but
+there is a lot of ABSTAINING, REINSTATING, COMING FROM and NEXTING
+going on in the code, as well as ONCE and AGAIN (this time I used both
+of them; AGAIN is normally more useful but ONCE works better for
+mutexes) and lots and lots of threading.
+
+A continuation is a copy of the internal state of a program, that can
+be rewound back to at a later stage. What exactly is copied depends on
+the language; in INTERCAL, it's everything except the abstention
+status of commands, as you might expect.
+
+As INTERCAL doesn't have first-class functions, continuations are
+represented by onespot numbers; they can send a single one-spot number
+as their return value (and more data can be sent by ABSTAINING FROM
+things in a prearranged pattern).
+
+The library CREATEs three statements:
+
+    GET CONTINUATION IN .1 GETTING .2
+
+This statement creates a continuation, storing a number that can be
+used to access it later in .1, and leaves .2 untouched. If that
+continuation is invoked later, the statement will instead appear to
+be equivalent to a RESUME #1, but after setting the value of .2 to be
+whatever value was sent when invoking the continuation (note that only
+onespot-range values can be sent). So:
+
+    DO (3) NEXT
+(1) DO GET CONTINUATION IN .1 GETTING .2
+    <do things here>
+(2) DO FORGET #1
+(3) DO (1) NEXT
+
+is effectively a call/cc to <do things here>, with .1 being used as
+its argument and .2 as its return value. (There are other equivalent
+ways to properly guard this statement; one simple one is to put the
+GET CONTINUATION call just /inside/ the procedure that's call/ccd.)
+
+    DO CONTINUE WITH .1 SENDING .2
+
+This statement invokes a continuation, returning the program to the
+time that it was created. The first argument is the continuation
+number (not supplying a number that corresponds to a continuation is
+undefined behaviour, but most likely an infinite loop); the second
+argument is a onespot number to send back as 'payload', which will be
+assigned to the second argument of the GET CONTINUATION IN command
+that created the continuation in the first place.
+
+    DO KILL ALL THREADS
+
+Because the continuation system creates a whole load of threads to do
+its work, a normal GIVE UP will not end the program. Instead, this is
+provided as an alternative; it's a horrible hack but will usually work
+if no threads are inside the system library at the time, or after the
+last PLEASE GIVE UP in the program. (I may implement a DO ABSTAIN FROM
+ONCING at some point, which would make it possible to make this sort
+of thing a lot more robust.)
+
+
+There are several interesting features of the program. The start shows
+how to CREATE statements that can take a range of different argument
+types; here I've chosen to cause the GET CONTINUATION statement to
+accept only lvalues that don't require reverse assignment, and the
+CONTINUE statement to accept any expression.
+
+A separate thread is used to keep track of the lowest unused
+continuation number; it shows how to implement a truly global variable
+in INTERCAL, and the relevant code (from 8250 to 8299) may be useful
+in its own right. The routines at (8276) and (8277) are an improvement
+over those in pass.i in terms of length, and show how to implement the
+INTERCAL equivalent of a named pipe (that is, data flows along it when
+one end is being read by one thread and the other end is being read by
+another thread). The ability to stash/retrieve the global variable
+(which is remarkably simple to do the way I've implemented it) is also
+used; see below.
+
+Continuations are themselves implemented as separate threads, each of
+which spends most of its time in an infinite loop at (8211); they're
+created by the simple method of determining a unique number, and
+splitting off a thread. Most of the non-global-variable-implementing
+part of the library is taken up with the code for invoking or
+'unfreezing' a continuation thread. When (8210) is invoked (i.e. the
+implementation of the CONTINUE command), it STASHes the global
+variable and assigns the continuation number to it. It then releases
+the loop at 8211, and all the remaining threads simultaneously (due to
+the timing guarantees) start trying to read the global variable. There
+are two problems to overcome: first, the fact that they can't all read
+the global variable at once (this is solved by the routine (8275),
+which shows how to use ONCE to implement a mutex), and second, the
+fact that each thread needs to wait until all the others have finished
+reading before continuing (because otherwise a fast series of
+continuation operations in the main program could try to access a
+thread before it was ready). The second problem is solved by a limited
+kind of semaphore on the line (8214); its abstention count is
+incremented by each thread before it starts reading (almost
+simultaneously due to the timing restrictions), and decreased once the
+thread has finished. All the threads then block until all of them have
+finished, which they can do by monitoring the semaphore until it
+reaches 0. (Normal semaphores can also block below 0 as well as
+unblocking at 0.) This method means that the threads don't need to
+know how many other threads are available. The thread that is being
+unfrozen then RETRIEVES the global variable, uses (8276) and (8277)
+with the thread that called CONTINUE to get the payload value, then
+the original CONTINUE-calling thread dies and the unfrozen thread
+continues in its place.
+
+Of course, all this thread creation is completely lousy from a
+performance perspective. Maybe some day I should try to optimise
+spinlocks somehow...
diff --git a/pit/continuation.i b/pit/continuation.i
new file mode 100644 (file)
index 0000000..2809d09
--- /dev/null
@@ -0,0 +1,298 @@
+       PLEASE NOTE
+
+Copyright (C) 2008 Alex Smith
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+       PLEASE NOTE Creating the continuation statements
+       DO CREATE (8200) GET CONTINUATION IN .1 GETTING .2
+       DO CREATE (8200) GET CONTINUATION IN ,1 SUB #1 GETTING .2
+       DO CREATE (8200) GET CONTINUATION IN .1 GETTING ,2 SUB #2
+       DO CREATE (8200) GET CONTINUATION IN ,1 SUB #1 GETTING ,2 SUB #2
+       DO CREATE (8210) CONTINUE WITH .1 SENDING .2
+       DO CREATE (8210) CONTINUE WITH .1 SENDING .2~#2
+       DO CREATE (8210) CONTINUE WITH .1 SENDING ,2 SUB #2
+       DO CREATE (8210) CONTINUE WITH .1~#1 SENDING .2
+       DO CREATE (8210) CONTINUE WITH .1~#1 SENDING .2~#2
+       DO CREATE (8210) CONTINUE WITH .1~#1 SENDING ,2 SUB #2
+       DO CREATE (8210) CONTINUE WITH ,1 SUB #1 SENDING .2
+       DO CREATE (8210) CONTINUE WITH ,1 SUB #1 SENDING .2~#2
+       DO CREATE (8210) CONTINUE WITH ,1 SUB #1 SENDING ,2 SUB #2
+       DO CREATE (8205) KILL ALL THREADS
+       PLEASE NOTE Initialising the counting tracker thread
+       PLEASE DO .1 <- #0
+(8201) DO NOTHING
+
+       PLEASE NOTE Definitions of the continuation statements
+(8200) DO STASH .1
+       PLEASE DO (8280) NEXT
+       PLEASE DO (1020) NEXT
+       PLEASE DO (8270) NEXT
+       PLEASE NOTE It's possible for .1 to equal :1601, so we
+                   have to be careful about operating on the
+                   arguments while stashed. So we use the
+                   temporary global variable .8200.
+       DO .8200 <- .1
+       DO RETRIEVE .1
+       DO :1601 <- .8200
+       DO (8202) NEXT
+       DO RESUME #1
+(8202) PLEASE NOTE Fork threads, one dormant, one alive
+       DO COME FROM (8202)
+       DO RESUME #1
+(8213)         DO RESUME '?".1~.1"$#2'~#3
+(8212) DO (8213) NEXT
+       DO RETRIEVE .1 PLEASE NOTE Restoring .1's stash
+       DO COME FROM (8202)
+       PLEASE FORGET #1
+(8211) DO COME FROM (8211)
+       PLEASE NOTE We count how many threads are in 8275 using the
+                   abstention count of 8214 and block until they're
+                   all done.
+       PLEASE DO ABSTAIN #1 FROM (8214)
+       DO STASH .1
+       DO (8275) NEXT
+       DO REINSTATE (8214)
+       DO COME FROM (8215)
+(8216) DO NOTHING
+(8215) DO NOTHING
+(8214)         DO COME FROM (8216)
+       PLEASE DO REINSTATE (8211)
+       PLEASE NOTE If .8200 matches .1, we activate. This uses
+                   a NEXT/NEXT/RESUME-style check because it's
+                   done on multiple threads at once and because
+                   a computed COME FROM would slow down the
+                   program even further.
+       DO .1 <- '?.8200$.1'~'#0$#65535'
+       DO (8212) NEXT
+       PLEASE NOTE that if this point is reached, we've reached
+                   the point where unfreezing the thread is
+                   necessary. First receive one datum from
+                   8277 so we can send something back in the
+                   continuation (this involves signaling using
+                   8217), then the other thread kills itself and
+                   we make a new continuation numbered the same
+                   as the old one, and continue by doubleresuming
+                   (so that an unfreeze can be told apart from an
+                   initial call). As this is a CREATEd statement,
+                   it's important to unstash :1601 and :1602
+                   ourselves when doubleresuming, as the runtime
+                   only does it correctly on a single resume.
+       PLEASE DO ABSTAIN FROM (8217)
+       DO (8260) NEXT
+       DO (8276) NEXT
+       DO .8201 <- .1
+       DO RETRIEVE .1 PLEASE NOTE Restoring .1's stash
+       DO (8202) NEXT PLEASE NOTE .8200 is still correct!
+       DO :1602 <- .8201
+       PLEASE DO :1601 <- .8200
+       DO RETRIEVE :1601
+       DO RETRIEVE :1602
+       DO RESUME #2
+
+(8210) PLEASE NOTE Here we use the timing guarantees. Once we
+                   ABSTAIN FROM 8211, all the threads looping
+                   there become unblocked simultaneously, so
+                   all of them abstain 8214 (which is 2-3 cycles)
+                   before any of them REINSTATES 8211 (which is
+                   way lower down, after the call to 8275), so
+                   we can guarantee that all the threads get a
+                   chance to check to see if they match.
+       DO .8210 <- .1
+       PLEASE DO .1 <- :1601
+       DO (8250) NEXT
+       DO (8270) NEXT
+       PLEASE DO ABSTAIN FROM (8211)
+(8217) DO COME FROM (8217) AGAIN
+       PLEASE NOTE This double assignment is actually correct,
+                   because :1602 is overloaded.
+       PLEASE DO .1 <- .8210
+       DO .1 <- :1602
+       PLEASE DO (8277) NEXT
+       PLEASE GIVE UP
+
+       PLEASE NOTE A communications channel thread.
+                   This acts like one 16-bit variable, where
+              8250 stashes the variable
+              8260 retrieves the variable
+              8270 copies it from .1
+          and 8280 copies it into .1
+
+              8275 is a mutex version of 8280 so that multiple
+                   threads can try to view .1 at once and only
+                   one will get it at a time.
+              8299 is a spinlock that traps until the current
+                   operation is completed, which is needed as
+                   part of the implementation of this, and then
+                   double-resumes
+
+(8299) DO COME FROM (8299) AGAIN
+       PLEASE DO RESUME #2
+
+(8250) DO REINSTATE (8251)
+       PLEASE DO (8299) NEXT
+
+(8260) DO REINSTATE (8261)
+       PLEASE DO (8299) NEXT
+
+(8270) DO REINSTATE (8271)
+       DO (8277) NEXT
+       PLEASE DO (8299) NEXT
+
+(8280) DO REINSTATE (8281)
+       DO (8276) NEXT
+       PLEASE DO (8299) NEXT
+
+(8275) DO COME FROM (8274)
+(8274)         DO (8273) NEXT ONCE
+(8273)         DO (8280) NEXT
+       PLEASE DO REINSTATE (8274)
+       DO RESUME #2
+
+       PLEASE NOTE main part of the communications channel thread
+       DO COME FROM (8201)
+       PLEASE DO COME FROM (8259)
+(8252)  DO NOTHING
+(8262) DO NOTHING
+(8272) DO NOTHING
+(8282)  DO NOTHING
+(8259) PLEASE DO NOTHING
+
+(8251) DON'T NEXT FROM (8252) AGAIN
+       DO STASH .1
+       PLEASE DO ABSTAIN FROM (8299)
+       DO RESUME #1
+
+(8261) DON'T NEXT FROM (8262) AGAIN
+       DO RETRIEVE .1
+       DO ABSTAIN FROM (8299)
+       DO RESUME #1
+
+(8271) DON'T NEXT FROM (8272) AGAIN
+       DO (8276) NEXT
+       DO ABSTAIN FROM (8299)
+       PLEASE DO RESUME #1
+
+(8281) DON'T NEXT FROM (8282) AGAIN
+       DO (8277) NEXT
+       DO ABSTAIN FROM (8299)
+       PLEASE DO RESUME #1
+
+
+       PLEASE NOTE 16-bit communications channel
+               8276 will block until data is sent
+               8277 will send the data
+               data transferred from .1 to .1
+
+(8276) DO COME FROM (8276) AGAIN
+       DO .1 <- #65535
+(8283) DO .1 <- '?.1$#    1'~'#0$#65535' AGAIN
+(8284) DO .1 <- '?.1$#    2'~'#0$#65535' AGAIN
+(8285) DO .1 <- '?.1$#    4'~'#0$#65535' AGAIN
+(8286) DO .1 <- '?.1$#    8'~'#0$#65535' AGAIN
+(8287) DO .1 <- '?.1$#   16'~'#0$#65535' AGAIN
+(8288) DO .1 <- '?.1$#   32'~'#0$#65535' AGAIN
+(8289) DO .1 <- '?.1$#   64'~'#0$#65535' AGAIN
+(8290) DO .1 <- '?.1$#  128'~'#0$#65535' AGAIN
+(8291) DO .1 <- '?.1$#  256'~'#0$#65535' AGAIN
+(8292) DO .1 <- '?.1$#  512'~'#0$#65535' AGAIN
+(8293) DO .1 <- '?.1$# 1024'~'#0$#65535' AGAIN
+(8294) DO .1 <- '?.1$# 2048'~'#0$#65535' AGAIN
+(8295) DO .1 <- '?.1$# 4096'~'#0$#65535' AGAIN
+(8296) DO .1 <- '?.1$# 8192'~'#0$#65535' AGAIN
+(8297) DO .1 <- '?.1$#16384'~'#0$#65535' AGAIN
+(8298) DO .1 <- '?.1$#32768'~'#0$#65535' AGAIN
+       DO ABSTAIN FROM (8278)
+       DO RESUME #1
+
+(8277) DO ABSTAIN .1~#    1 FROM (8283)
+       DO ABSTAIN .1~#    2 FROM (8284)
+       DO ABSTAIN .1~#    4 FROM (8285)
+       DO ABSTAIN .1~#    8 FROM (8286)
+       DO ABSTAIN .1~#   16 FROM (8287)
+       DO ABSTAIN .1~#   32 FROM (8288)
+       DO ABSTAIN .1~#   64 FROM (8289)
+       DO ABSTAIN .1~#  128 FROM (8290)
+       DO ABSTAIN .1~#  256 FROM (8291)
+       DO ABSTAIN .1~#  512 FROM (8292)
+       DO ABSTAIN .1~# 1024 FROM (8293)
+       DO ABSTAIN .1~# 2048 FROM (8294)
+       DO ABSTAIN .1~# 4096 FROM (8295)
+       DO ABSTAIN .1~# 8192 FROM (8296)
+       DO ABSTAIN .1~#16384 FROM (8297)
+       DO ABSTAIN .1~#32768 FROM (8298)
+       DO ABSTAIN FROM (8276)
+(8278) PLEASE DO COME FROM (8278) AGAIN
+       PLEASE DO RESUME #1
+
+       PLEASE NOTE Code for killing all threads. This
+                   is achieved by hoping none of them are
+                   in syslib (which is after the end
+                   of the program), and abstaining from
+                   all flow control operations in the
+                   program, all operations that hold up
+                   execution, and all operations that
+                   could error. Unfortunately, this
+                   can be affected by ONCE/AGAIN, so
+                   each thread will twice more repeat
+                   the abstention in the hope of catching
+                   other threads as it comes past to quit.
+                   Not perfect, but hopefully good enough.
+                    (Of course, a simple E000 would be
+                   better at this job, but it's an error
+                   and non-erroring solutions are better.)
+       PLEASE DO REINSTATE (8205) AGAIN
+       PLEASE DO REINSTATE (8206) AGAIN
+(8205) PLEASE DO ABSTAIN FROM ABSTAINING + REINSTATING +
+       CALCULATING + NEXTING + COMING FROM + RESUMING +
+       FORGETTING + STASHING + RETRIEVING + WRITING IN +
+       READING OUT + COMMENT AGAIN
+       DON'T DO ANYTHING FOR A BIT
+       PLEASE NOTE THAT THIS IS MORE TIME WASTING
+(8206) PLEASE DO ABSTAIN FROM ABSTAINING + REINSTATING +
+       CALCULATING + NEXTING + COMING FROM + RESUMING +
+       FORGETTING + STASHING + RETRIEVING + WRITING IN +
+       READING OUT + COMMENT AGAIN
+       PLEASE GIVE UP
+
+       PLEASE NOTE The main program.
+       DO COME FROM (8201)
+       DO .2 <- #0
+       DO (8) NEXT
+(9)    DO GET CONTINUATION IN .1 GETTING .2
+       DO (10) NEXT
+       DO (7) NEXT
+(8)    DO (9) NEXT
+(7)    DO FORGET #1
+       PLEASE DO READ OUT .2
+       DO CONTINUE WITH .1 SENDING #3 ONCE
+       DO CONTINUE WITH .1 SENDING #4 ONCE
+       DO CONTINUE WITH .1 SENDING #5 ONCE
+       DO CONTINUE WITH .1 SENDING #6 ONCE
+       DO CONTINUE WITH .1 SENDING #7 ONCE
+       DO .2 <- .1 ONCE
+       DO (11) NEXT
+(12)   DO GET CONTINUATION IN .3 GETTING .2
+       DO READ OUT #31 + .1 + .2 + .3
+       DO CONTINUE WITH .3 SENDING .2
+(11)   DO (12) NEXT
+       PLEASE DO READ OUT #30 + .1 + .2 + .3
+       PLEASE DO CONTINUE WITH .2 SENDING .3
+       PLEASE KILL ALL THREADS
+
+(10)   DO .2 <- #1
+       DO READ OUT #10
+       DO CONTINUE WITH .1 SENDING #2
+        DO RESUME #1
diff --git a/pit/delta.fft b/pit/delta.fft
new file mode 100644 (file)
index 0000000..d3c2c88
--- /dev/null
@@ -0,0 +1,258 @@
+ONE\r
+ONE TWO EIGHT\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+SIX OH OH OH OH OH OH ZERO ONE\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+SIX OH OH OH OH OH OH ZERO ONE\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
diff --git a/pit/explib/compunex.c b/pit/explib/compunex.c
new file mode 100644 (file)
index 0000000..a9d0683
--- /dev/null
@@ -0,0 +1,29 @@
+/* Public domain, by Alex Smith.
+   An example of CREATing statements from C, in this case an example COMPUNEX
+   statement that does a computed NEXT. (Note that newly CREATEd statements
+   can't contain consecutive characters that spell an INTERCAL keyword; also,
+   I wanted a name that was 8 chars or shorter to serve as a DOS filename.)
+
+   Note that as a CREATEd command, COMPUNEX uses one NEXT stack entry itself,
+   meaning the COMPUNEX will take up two NEXT stack entries total. Programs
+   that do large RESUMEs will need to take this into account. (Tail call
+   optimisation would require some sort of GOTO, but ick_goto isn't documented
+   and therefore shouldn't be used, right? */
+#include <ick_ec.h>
+
+/* This name starts ick_, but isn't used; in general, the prefix ick_my_ is
+   reserved for expansion libraries (as are the line numbers 1600-1699) because
+   it doesn't conflict either with the compiler or with any linked-in C
+   programs. */
+ICK_EC_FUNC_START(ick_my_compunex)
+{
+  ick_startup( {
+      ick_create(".COMPUNEX",1600);
+      ick_create(";COMPUNEX",1600);
+      ick_create("~COMPUNEX",1600);
+    });
+  ick_linelabel(1600);
+  ick_next(ick_c_value(0));
+  ick_resume(1);
+}
+ICK_EC_FUNC_END
diff --git a/pit/explib/syslibc.c b/pit/explib/syslibc.c
new file mode 100644 (file)
index 0000000..4155fe1
--- /dev/null
@@ -0,0 +1,197 @@
+/*
+ * The INTERCAL system library, optimised version in C.
+ *
+ * This is provided as an example of how to write a C program
+ * that links to INTERCAL programs, to demonstrate the external
+ * call code.
+ *
+ * Written originally by Alex Smith, and released to the public
+ * domain. This library comes with NO WARRANTY.
+ */
+
+#include <ick_ec.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+/* This identifier name breaches the namespace rule that ick_ must be
+   avoided, but this library has to work with both other people's
+   INTERCAL programs and other people's C programs. So I've chosen an
+   identifier name which breaches the rules (so that it doesn't clash
+   with other people's C programs) but isn't used anywhere in the
+   compiler, and so doesn't clash with it either.
+*/
+
+static void errout(int routine, char* msg)
+{
+  fprintf(stderr,"C-INTERCAL system library: (%d): %s\n", routine, msg);
+  exit(EXIT_FAILURE);
+}
+
+ICK_EC_FUNC_START(ick_my_custom_syslib)
+{
+  register uint16_t os1, os2;
+  register uint32_t ts1, ts2;
+  static int seededyet = 0;
+
+  ick_linelabel(1000);
+  os1=ick_getonespot(1);
+  os2=ick_getonespot(2);
+  if(0xffff-os1<os2) errout(1000, "onespot overflow");
+  ick_setonespot(3,os1+os2);
+  ick_resume(1);
+  return; /* so the compiler knows the next line can't be reached from here */
+
+  ick_linelabel(1009);
+  os1=ick_getonespot(1);
+  os2=ick_getonespot(2);
+  ick_setonespot(4,1);
+  if(0xffff-os1<os2) ick_setonespot(4,2);
+  ick_setonespot(3,os1+os2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1010);
+  ick_setonespot(3,ick_getonespot(1)-ick_getonespot(2));
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1020);
+  ick_setonespot(1,ick_getonespot(1)+1U);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1030);
+  os1=ick_getonespot(1);
+  os2=ick_getonespot(2);
+  if(os1&&0xffff/os1<os2) errout(1030, "onespot overflow");
+  ick_setonespot(3,os1*os2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1039);
+  os1=ick_getonespot(1);
+  os2=ick_getonespot(2);
+  ick_setonespot(4,1);
+  if(os1&&0xffff/os1<os2) ick_setonespot(4,2);
+  ick_setonespot(3,os1*os2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1040);
+  os2=ick_getonespot(2);
+  if(!os2) errout(1040, "division by zero");
+  ick_setonespot(3,ick_getonespot(1)/os2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1050);
+  os1=ick_getonespot(1);
+  ts1=ick_gettwospot(1);
+  if(!os1) errout(1050, "division by zero");
+  ts1/=os1;
+  if(ts1>0xffffLU) errout(1050, "onespot overflow");
+  ick_setonespot(2,(uint16_t)ts1);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1500);
+  ts1=ick_gettwospot(1);
+  ts2=ick_gettwospot(2);
+  if(0xffffffffLU-ts1<ts2) errout(1500, "twospot overflow");
+  ick_settwospot(3,ts1+ts2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1509);
+  ts1=ick_gettwospot(1);
+  ts2=ick_gettwospot(2);
+  ick_setonespot(4,1);
+  if(0xffffffffLU-ts1<ts2) ick_setonespot(4,2);
+  ick_settwospot(3,ts1+ts2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1510);
+  ick_settwospot(3,ick_gettwospot(1)-ick_gettwospot(2));
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1520);
+  ick_settwospot(1,(((uint32_t)ick_getonespot(1))<<16)+ick_getonespot(2));
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1530);
+  ick_settwospot(1,ick_getonespot(1)*ick_getonespot(2));
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1540);
+  ts1=ick_gettwospot(1);
+  ts2=ick_gettwospot(2);
+  if(ts1&&0xfffffffflu/ts1<ts2) errout(1540, "twospot overflow");
+  ick_settwospot(3,ts1*ts2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1549);
+  ts1=ick_gettwospot(1);
+  ts2=ick_gettwospot(2);
+  ick_setonespot(4,1);
+  if(ts1&&0xfffffffflu/ts1<ts2) ick_setonespot(4,2);
+  ick_settwospot(3,ts1*ts2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1550);
+  ts2=ick_gettwospot(2);
+  if(!ts2) errout(1550, "division by zero");
+  ick_settwospot(3,ick_gettwospot(1)/ts2);
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1900);
+  if(!seededyet) srand(time(0));
+  seededyet=1;
+  ick_setonespot(1,rand()/(1+RAND_MAX/65536));
+  ick_resume(1);
+  return;
+
+  ick_linelabel(1910);
+  /* Here, we use the same algorithm as the original INTERCAL,
+     so as to produce similarly-distributed results.
+
+     If we add together 12 uniform random variables in the range #0 to
+     (.1 / 12), then the resulting random variable has a mean of (.1 /
+     2), and a variance of 12 times the original variance, which is
+     (((.1 * .1) / 144) / 12), giving a final variance of ((.1 * .1) /
+     144) and a final standard deviation of .1 / 12. */
+  if(!seededyet) srand(time(0));
+  seededyet=1;
+  os1=ick_getonespot(1);
+  os2 =rand()/(RAND_MAX/((os1   )/12));
+  os2+=rand()/(RAND_MAX/((os1+ 1)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 2)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 3)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 4)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 5)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 6)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 7)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 8)/12));
+  os2+=rand()/(RAND_MAX/((os1+ 9)/12));
+  os2+=rand()/(RAND_MAX/((os1+10)/12));
+  os2+=rand()/(RAND_MAX/((os1+11)/12));
+  ick_setonespot(2,os2);
+  ick_resume(1);
+  return;
+
+  /* Several existing INTERCAL programs rely on the routine (1001),
+     which is undocumented and therefore shouldn't be used. So as not
+     to break those programs, here it is: */
+  ick_linelabel(1001);
+  ick_resume(ick_getonespot(5));
+  return;
+
+}
+ICK_EC_FUNC_END
diff --git a/pit/explib/syslibc.doc b/pit/explib/syslibc.doc
new file mode 100644 (file)
index 0000000..2b5c69b
--- /dev/null
@@ -0,0 +1,29 @@
+Alex Smith, 26 March 2008
+
+syslibc.c is an example of a C program designed to be used with the
+INTERCAL external call code. It only attempts to emulate the base 2
+algorithms, but in a base 2 program it should be a valid drop-in
+replacement for the real system library.  (Don't forget to use the -eE
+options when linking this to an INTERCAL program; -e to allow C
+programs to be linked in, and -E to suppress the 'real' syslib.)
+
+The library is designed foremost to ensure that all errors are checked
+(as they would be in the INTERCAL, although you get the error messages
+produced by C code), and secondarily for speed (it is substantially
+faster than the INTERCAL version of the system library, but that isn't
+particularly surprising).
+
+Note that some INTERCAL programs rely on undocumented features of the
+system library; I have implemented the commonly-used (1001), but some
+of the example programs (for instance primes.i) NEXT to other
+undocumented internal lines of syslib.i, and such programs will error
+out on the C version of the syslib.
+
+There are some situations in which the C program will cause errors,
+but the INTERCAL version wouldn't; remember that any attempt to alter
+or view an INTERCAL variable from C code causes an error if that
+variable doesn't exist in the INTERCAL program. Therefore, in order to
+use a particular routine, you should mention all the variables that
+are its inputs and outputs somewhere in your INTERCAL program; in
+particular, if you're using overflow-checked routines, make sure you
+mention .4 at least once in your program.
diff --git a/pit/fft.doc b/pit/fft.doc
new file mode 100644 (file)
index 0000000..aff020f
--- /dev/null
@@ -0,0 +1,55 @@
+The program fft.i provides a basic complex Fast Fourier Transform,
+along with a simple write-in-read-out wrapper. This program requires
+the floating-point library in lib/floatlib.i, which should be appended
+to fft.i before compiling.
+
+The first number to enter specifies the direction of the transform.
+Enter ONE to transform from time to frequency, or TWO for the inverse
+transform. The second number to enter is the number of complex pairs.
+This number must be a power of two, between TWO and THREE TWO SEVEN
+SIX EIGHT inclusive. After this comes the actual data. Each entry must
+consist of two floating-point numbers, the real value followed by the
+imaginary value.
+
+After the data has been entered, the FFT is performed on it. When it
+is completed, the resulting data will be output. The data is preceded
+by I or II to indicate time or frequency data (i.e., the opposite of
+the number input at the start), and a second integer giving the
+number of pairs being output.
+
+Included are two files that produce simple curves when transformed.
+delta.fft, the sum of two delta functions, transforms into a cosine
+wave, and tophat.fft's output traces the sinc function.
+
+INTERCAL brings new meaning to the "fast" in Fast Fourier Transform.
+On Muppetlabs' Pentium, 133MHz, a transform of 2048 data points takes
+over 5 minutes of CPU time.
+
+
+The actual FFT routine is at line label (100), and is self-contained
+other than its dependence on the standard and floating-point
+libraries, and a small subroutine described below. Its three arguments
+are .9, .10, and ;1. .9 must contain #1 or #2 to select the forward or
+inverse transform, respectively. .10 must contain the length of the
+input data, and ;1 the data itself. ;1 must have the dimensions .10 BY
+#2. No error checking is done on the parameters within the routine.
+(The wrapper routine sanity-checks the user's input.) On exit, .9 will
+contain #2 if it was #1 originally and vice versa, and ;1 will contain
+the transformed data.
+
+The FFT algorithm was taken from "Numerical Recipes" (Press, et al;
+Cambridge University Press, 1994 edition). For data centered on the
+y-axis, it is usually best to cut the data in half at the axis and
+switch their positions (i.e., enter the data for 0 to N/2 - 1 first,
+followed by the data for -N/2 to -1) and then do the same with the
+output.
+
+The FFT routine uses a subroutine, labelled (153), as a wrapper around
+the multiplication routine (5030). This subroutine is an example of
+how to handle errors as indicated by the .5 variable.
+
+Another noteworthy point is in the first part of the routine, where
+the positions of the data are swapped with the bit-reversals of their
+indices. Amazingly, bit-reversal is one of the few things that
+INTERCAL can do more tersely than most other languages. It is nice to
+see it actually finding a real-world application.
diff --git a/pit/fft.i b/pit/fft.i
new file mode 100644 (file)
index 0000000..d6d966b
--- /dev/null
+++ b/pit/fft.i
@@ -0,0 +1,264 @@
+       PLEASE WRITE IN .9
+       DO .5 <- '?"'#65535~".9~#65532"'~#1"$#2'~#3
+       DO (91) NEXT
+       DO .5 <- '?.&9$#2'~#3
+       DO (91) NEXT
+       DO .5 <- '?"#3~.9"$#1'~#3
+       DO (91) NEXT
+       PLEASE WRITE IN .10
+       DO .5 <- '?"!10~.10'~#2"$#2'~#3
+       DO (93) NEXT
+       DO .5 <- '?"'#65535~".10~#65534"'~#1"$#1'~#3
+       DO (92) NEXT
+       PLEASE DO ;1 <- .10 BY #2
+       DO .1 <- #1
+       DO (10) NEXT
+(11)   DO (1001) NEXT
+(10)   PLEASE FORGET #1
+       PLEASE WRITE IN :1
+       DO (5090) NEXT
+       DO .5 <- '?".5~#2"$#2'~#3
+       DO (94) NEXT
+       PLEASE DO ;1SUB.1#1 <- :2
+       PLEASE WRITE IN :1
+       DO (5090) NEXT
+       DO .5 <- '?".5~#2"$#2'~#3
+       DO (94) NEXT
+       PLEASE DO ;1SUB.1#2 <- :2
+       DO .5 <- '?".1~.10"$#1'~#3
+       DO (1020) NEXT
+       DO (11) NEXT
+       PLEASE DO (100) NEXT
+       PLEASE READ OUT .9 + .10
+       DO .1 <- #1
+       DO (15) NEXT
+(16)   DO (1001) NEXT
+(15)   PLEASE FORGET #1
+       DO :1 <- ;1SUB.1#1
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO :1 <- ;1SUB.1#2
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO .5 <- '?".1~.10"$#1'~#3
+       DO (1020) NEXT
+       DO (16) NEXT
+       PLEASE GIVE UP
+
+(91)   DO (1001) NEXT
+       PLEASE ENTER ONE OR TWO TO SPECIFY THE TRANSFORM.
+(92)   DO (1001) NEXT
+       DO YOU REALLY WANT TO TRANSFORM A VECTOR OF ONE NUMBER?
+(93)   DO (1001) NEXT
+       DOES "POWER OF TWO" MEAN ANYTHING TO YOU?
+(94)   DO (1001) NEXT
+       DOCUMENTATION EXISTS. MAYBE YOU SHOULD READ IT.
+       PLEASE DON'T GIVE UP
+
+(100)  PLEASE STASH .1 + .2 + .3 + .4 + .5 + .6 + .7 + :1 + :2 +
+               :3 + :4 + :5 + :6 + :7 + .11 + :10 + :11 + :12 + :13
+       DO .11 <- #32768
+       DO .1 <- #1
+       DO .2 <- .10~#65532
+       DO (101) NEXT
+(102)  DO (1001) NEXT
+       PLEASE DO .11 <- .V11
+       DO (1020) NEXT
+       DO .2 <- .2~#65534
+(101)  PLEASE FORGET #1
+       DO .5 <- '?".2~.2"$#2'~#3
+       DO (102) NEXT
+       PLEASE STASH .1
+       DO .1 <- #1
+       DO .2 <- #1
+       DO (105) NEXT
+(106)  DO (1001) NEXT
+(105)  PLEASE FORGET #1
+       DO .5 <- '?.1$.2'~'#0$#65535'
+       DO .5 <- '?"!2~.5'~'"?.5~.5"~#32767'"$#1'~#3
+       DO (107) NEXT
+       PLEASE DO :1 <- ;1SUB.1#1
+       DO ;1SUB.1#1 <- ;1SUB.2#1
+       DO ;1SUB.2#1 <- :1
+       PLEASE DO :1 <- ;1SUB.1#2
+       DO ;1SUB.1#2 <- ;1SUB.2#2
+       DO ;1SUB.2#2 <- :1
+       DO (108) NEXT
+(107)  DO (1001) NEXT
+(108)  PLEASE FORGET #1
+       DO .5 <- .1
+       DO .1 <- !1~#255'$!1~#65280'
+       DO .1 <- !1~#255'$!1~#65280'
+       DO .1 <- !1~#255'$!1~#65280'
+       DO .1 <- !1~#255'$!1~#65280'
+       DO .1 <- .1~.11
+       DO (1020) NEXT
+       DO .2 <- .1
+       DO .1 <- .5
+       DO (1020) NEXT
+       DO .5 <- '?".1~.10"$#1'~#3
+       DO (106) NEXT
+       DO .6 <- #1
+       PLEASE DO :7 <- '"'V.9~#2'$#571"~"#32768$#32767"'$#35133
+       DO (110) NEXT
+(111)  DO (1001) NEXT
+(110)  PLEASE FORGET #1
+       DO .7 <- !6$#0'~'#32767$#1'
+       DO :1 <- :7
+       PLEASE DO (5200) NEXT
+       DO :13 <- :2
+       PLEASE DO :2 <- #63488$#61440
+       DO (1509) NEXT
+       DO :7 <- :3
+       DO :1 <- :3
+       PLEASE DO (5200) NEXT
+       DO :1 <- :2
+       PLEASE DO (530) NEXT
+       DO :1 <- :3
+       PLEASE DO :2 <- #34816$#0
+       PLEASE DO (1509) NEXT
+       DO :12 <- :3
+       DO :11 <- #0
+       PLEASE DO :10 <- #30720$#28672
+       DO .1 <- #1
+       DO (120) NEXT
+(120)  PLEASE FORGET #1
+       DO .4 <- .1
+       DO (130) NEXT
+(131)  DO (1001) NEXT
+(130)  PLEASE FORGET #1
+       DO .2 <- .6
+       DO (1000) NEXT
+       PLEASE DON'T GIVE UP
+       DO :1 <- :10
+       DO :2 <- ;1SUB.3#1
+       PLEASE DO (530) NEXT
+       DO :4 <- :3
+       DO :1 <- :11
+       DO :2 <- ;1SUB.3#2
+       PLEASE DO (530) NEXT
+       DO :1 <- :4
+       DO :2 <- :3
+       PLEASE DO (5010) NEXT
+       DO :5 <- :3
+       DO :1 <- :10
+       DO :2 <- ;1SUB.3#2
+       PLEASE DO (530) NEXT
+       DO :4 <- :3
+       DO :1 <- :11
+       DO :2 <- ;1SUB.3#1
+       PLEASE DO (530) NEXT
+       DO :1 <- :4
+       DO :2 <- :3
+       PLEASE DO (5000) NEXT
+       DO :6 <- :3
+       DO :1 <- ;1SUB.1#1
+       DO :2 <- :5
+       PLEASE DO (5010) NEXT
+       PLEASE DO ;1SUB.3#1 <- :3
+       DO :1 <- ;1SUB.1#2
+       DO :2 <- :6
+       PLEASE DO (5010) NEXT
+       PLEASE DO ;1SUB.3#2 <- :3
+       DO :1 <- ;1SUB.1#1
+       DO :2 <- :5
+       PLEASE DO (5000) NEXT
+       PLEASE DO ;1SUB.1#1 <- :3
+       DO :1 <- ;1SUB.1#2
+       DO :2 <- :6
+       PLEASE DO (5000) NEXT
+       PLEASE DO ;1SUB.1#2 <- :3
+       DO .2 <- .7
+       DO (1000) NEXT
+       DO .1 <- .3
+       DO .5 <- '?.1$.10'~'#0$#65535'
+       DO .5 <- '?"!1~.5'~'"?.5~.5"~#32767'"$#1'~#3
+       DO (131) NEXT
+       DO :1 <- :10
+       DO :2 <- :12
+       PLEASE DO (530) NEXT
+       DO :4 <- :3
+       DO :1 <- :11
+       DO :2 <- :13
+       PLEASE DO (530) NEXT
+       DO :1 <- :10
+       DO :2 <- :3
+       PLEASE DO (5010) NEXT
+       DO :1 <- :3
+       DO :2 <- :4
+       PLEASE DO (5000) NEXT
+       DO :1 <- :10
+       DO :2 <- :13
+       PLEASE DO :10 <- :3
+       PLEASE DO (530) NEXT
+       DO :4 <- :3
+       DO :1 <- :11
+       DO :2 <- :12
+       PLEASE DO (530) NEXT
+       DO :1 <- :11
+       DO :2 <- :3
+       PLEASE DO (5000) NEXT
+       DO :1 <- :3
+       DO :2 <- :4
+       PLEASE DO (5000) NEXT
+       DO :11 <- :3
+       DO .5 <- '?".4~.6"$#2'~#3
+       DO (121) NEXT
+       DO .1 <- .4
+       DO (1020) NEXT
+       DO (120) NEXT
+(121)  DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .6 <- .7
+       DO .5 <- '?".6~.10"$#1'~#3
+       DO (111) NEXT
+       PLEASE RETRIEVE .1
+       DO .5 <- .9
+       DO (140) NEXT
+       DO .1 <- '?.1$#65535'~'#0$#65535'
+       DO (1020) NEXT
+       DO :2 <- '"'"'"!1$#0'~'#511$#1'"$#0'~'#1023$#3'"$#0'~'#4095$
+               #15'"$#0'~'#65535$#31'
+       DO :2 <- ':2~"#31$#2047"'$':2~"#1023$#63"'
+       DO .1 <- #1
+       DO (145) NEXT
+(145)  PLEASE FORGET #1
+       DO :1 <- ;1SUB.1#1
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (146) NEXT
+       PLEASE DO (1509) NEXT
+       DO ;1SUB.1#1 <- :3
+       DO (147) NEXT
+(146)  DO (1001) NEXT
+(147)  PLEASE FORGET #1
+       DO :1 <- ;1SUB.1#2
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (148) NEXT
+       PLEASE DO (1509) NEXT
+       DO ;1SUB.1#2 <- :3
+       DO (149) NEXT
+(148)  DO (1001) NEXT
+(149)  PLEASE FORGET #1
+       DO .5 <- '?".1~.10"$#2'~#3
+       DO (140) NEXT
+       DO (1020) NEXT
+       DO (145) NEXT
+(140)  DO (1001) NEXT
+(141)  PLEASE FORGET #1
+       DO .9 <- !9~#1'$!9~#2'
+       PLEASE RETRIEVE .1 + .2 + .3 + .4 + .5 + .6 + .7 + :1 + :2 +
+               :3 + :4 + :5 + :6 + :7 + .11 + :10 + :11 + :12 + :13
+       PLEASE RESUME #1
+
+(530)  DO (5030) NEXT
+       DO (531) NEXT
+       DO :3 <- '"':3~"#65535$#0"'$#32767"~"#32768$#32767"'$#65535
+       PLEASE RESUME #1
+(531)  DO (532) NEXT
+       DO :3 <- '"':3~"#65535$#0"'$':3~"#2047$#0"'"~"#32768$#32767"'$
+               ':3~"#0$#4095"'
+       PLEASE RESUME #2
+(532)  DO (1001) NEXT
+       PLEASE RESUME #3
+
+       PLEASE APPEND THE FLOATING-POINT LIBRARY ROUTINES
diff --git a/pit/flonck.doc b/pit/flonck.doc
new file mode 100644 (file)
index 0000000..8616bc9
--- /dev/null
@@ -0,0 +1,61 @@
+Flonck, short for FLOating-point Numerical Calculator, is an INTERCAL
+version of the classic reverse-polish calculator. All values are
+entered and displayed as floating-point numbers. Entering a number
+adds it to the top of the stack. The various operations are indicated
+by integer number, and take their argument(s) off the top of the stack
+and replace it/them with the result. Besides the main stack, flonck
+also includes two separate "registers".
+
+Note that this program requires the floating-point library in
+lib/floatlib.i, which should be appended to flonck.i before compiling.
+
+Here is the quick-reference chart of available operations:
+
+                        ONE OH     change sign    TWO OH     store in M
+ONE        add          ONE ONE    invert         TWO ONE    add to M
+TWO        subtract     ONE TWO    square root    TWO TWO    push M
+THREE      multiply     ONE THREE  ln             TWO THREE  exchange M
+FOUR       divide       ONE FOUR   exp            TWO FOUR   print M
+FIVE       remainder    ONE FIVE   x^y            TWO FIVE   store in N
+SIX        print        ONE SIX    pop            TWO SIX    add to N
+SEVEN      print all    ONE SEVEN  clear all      TWO SEVEN  push N
+EIGHT      duplicate    ONE EIGHT  int            TWO EIGHT  exchange N
+NINE       twiddle      ONE NINE   random         TWO NINE   print N
+                                                  THREE OH   quit
+
+Functions ONE through FIVE should be self-explanatory. SIX displays
+the topmost number on the stack without removing it. SEVEN displays
+the entire stack, from top to bottom, again without changing anything.
+EIGHT duplicates the topmost number, pushing an extra copy of it. NINE
+causes the top two numbers on the stack to switch places.
+
+The next few functions should be familiar to anyone who's used a
+pocket calculator in recent memory. ONE OH multiplies the topmost
+number by -1. ONE ONE divides the topmost number into 1. ONE TWO is
+the square root function, ONE THREE is the natural logarithm function,
+and ONE FOUR is the exponential function. ONE FIVE raises the topmost
+number to the power of the next-topmost number. ONE SIX throws away
+the topmost number, never to be seen again. ONE SEVEN wipes out the
+entire stack and starts afresh. ONE EIGHT chops off the fractional
+part of the topmost number. ONE NINE causes a randomly chosen number
+between 0 and 1 to be added to the top of the stack.
+
+The twenties are the functions that manipulate the two registers,
+named M and N. (Both registers start out initialized to zero.) TWO OH
+takes the topmost number off of the stack and stores it in M. TWO ONE
+takes the topmost number off of the stack and adds it to whatever is
+already in M. TWO TWO makes a copy of whatever is in M and adds it to
+the top of the stack. TWO THREE swaps the contents of M with the
+topmost number on the stack. TWO FOUR displays the contents of M
+without changing it. Functions TWO FIVE through TWO NINE repeat the
+above five functionalities for the register N.
+
+And finally, as you might have guessed, writing (in) THREE OH causes
+flonck to come to an end.
+
+If an input does not correspond to a floating-point number or an
+instruction, or if a function is input that requires more numbers on
+the stack than currently exist, or if a function overflows or returns
+an error, flonck prints out an error message, namely "XXX", and
+continues. Note that in the latter case, the values used as function
+arguments will still be removed from the stack.
diff --git a/pit/flonck.i b/pit/flonck.i
new file mode 100644 (file)
index 0000000..4c262bc
--- /dev/null
@@ -0,0 +1,277 @@
+       DO :321 <- #0
+       DO :322 <- #0
+       DO :123 <- #65535$#65535
+       PLEASE STASH :123
+       DO (1) NEXT
+
+(1)    PLEASE FORGET #1
+       PLEASE WRITE IN :1
+       DO .5 <- '?"':1~:1'~#1"$#2'~#3
+       DO (11) NEXT
+       DO :123 <- #0
+       PLEASE STASH :123
+       DO (1) NEXT
+(11)   DO (1001) NEXT
+       DO .5 <- :1~'#65280$#65280'
+       DO .5 <- '?"!5~.5'~#1"$#1'~#3
+       DO (10) NEXT
+       PLEASE FORGET #1
+       DO (5090) NEXT
+       DO .5 <- '?".5~#2"$#2'~#3
+       DO (19) NEXT
+       DO :123 <- :2
+       PLEASE STASH :123
+       DO (1) NEXT
+(10)   DO (1001) NEXT
+       PLEASE FORGET #2
+       DO .5 <- '?"':1~#65504'~#1"$#2'~#3
+       DO (19) NEXT
+       DO (131) NEXT
+
+(131)  DO (130) NEXT
+       PLEASE FORGET #1
+       DO (18) NEXT
+(130)  DO (129) NEXT
+       PLEASE GIVE UP
+(129)  DO (128) NEXT
+       PLEASE FORGET #3
+       DO :1 <- :322
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO (1) NEXT
+(128)  DO (127) NEXT
+       PLEASE FORGET #4
+       DO (22) NEXT
+       DO :123 <- :322
+       PLEASE STASH :123
+       DO :322 <- :2
+       DO (1) NEXT
+(127)  DO (126) NEXT
+       PLEASE FORGET #5
+       DO :123 <- :322
+       PLEASE STASH :123
+       DO (1) NEXT
+(126)  DO (125) NEXT
+       PLEASE FORGET #6
+       DO (21) NEXT
+       DO :2 <- :322
+       DO (5000) NEXT
+       DO (33) NEXT
+       PLEASE RETRIEVE :123
+       DO :322 <- :123
+       DO (1) NEXT
+(125)  DO (124) NEXT
+       PLEASE FORGET #7
+       DO (22) NEXT
+       DO :322 <- :2
+       DO (1) NEXT
+(124)  DO (123) NEXT
+       PLEASE FORGET #8
+       DO :1 <- :321
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO (1) NEXT
+(123)  DO (122) NEXT
+       PLEASE FORGET #9
+       DO (21) NEXT
+       DO :123 <- :321
+       PLEASE STASH :123
+       DO :321 <- :1
+       DO (1) NEXT
+(122)  DO (121) NEXT
+       PLEASE FORGET #10
+       DO :123 <- :321
+       PLEASE STASH :123
+       DO (1) NEXT
+(121)  DO (120) NEXT
+       PLEASE FORGET #11
+       DO (22) NEXT
+       DO :1 <- :321
+       DO (5000) NEXT
+       DO (33) NEXT
+       PLEASE RETRIEVE :123
+       DO :321 <- :123
+       DO (1) NEXT
+(120)  DO (119) NEXT
+       PLEASE FORGET #12
+       DO (21) NEXT
+       DO :321 <- :1
+       DO (1) NEXT
+(119)  DO (118) NEXT
+       PLEASE FORGET #13
+       DO (5400) NEXT
+       DO :123 <- :1
+       PLEASE STASH :123
+       DO (1) NEXT
+(118)  DO (117) NEXT
+       PLEASE FORGET #14
+       DO (21) NEXT
+       DO (5020) NEXT
+       DO :123 <- :2
+       PLEASE STASH :123
+       DO (1) NEXT
+(117)  DO (116) NEXT
+       PLEASE FORGET #15
+       DO (271) NEXT
+(272)  DO (1001) NEXT
+(271)  PLEASE FORGET #1
+       PLEASE RETRIEVE :123
+       DO .5 <- '?"':123~:123'~'#32768$#0'"$#1'~#3
+       DO (272) NEXT
+       PLEASE STASH :123
+       DO (1) NEXT
+(116)  DO (115) NEXT
+       PLEASE FORGET #16
+       DO (21) NEXT
+       DO (1) NEXT
+(115)  DO (114) NEXT
+       PLEASE FORGET #17
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5130) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(114)  DO (113) NEXT
+       PLEASE FORGET #18
+       DO (21) NEXT
+       DO (5120) NEXT
+       DO (32) NEXT
+       DO (1) NEXT
+(113)  DO (112) NEXT
+       PLEASE FORGET #19
+       DO (21) NEXT
+       DO (5110) NEXT
+       DO (32) NEXT
+       DO (1) NEXT
+(112)  DO (111) NEXT
+       PLEASE FORGET #20
+       DO (21) NEXT
+       DO (5100) NEXT
+       DO (32) NEXT
+       DO (1) NEXT
+(111)  DO (110) NEXT
+       PLEASE FORGET #21
+       DO (22) NEXT
+       DO :1 <- #30720$#28672
+       DO (5040) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(110)  DO (109) NEXT
+       PLEASE FORGET #22
+       DO (21) NEXT
+       PLEASE DO :123 <- '"?':123~"#65535$#0"'$#32768"~"#0$#65535"'$
+               ':123~"#0$#65535"'
+       PLEASE STASH :123
+       DO (1) NEXT
+(109)  DO (108) NEXT
+       PLEASE FORGET #23
+       DO (21) NEXT
+       DO (22) NEXT
+       DO :123 <- :1
+       PLEASE STASH :123
+       DO :123 <- :2
+       PLEASE STASH :123
+       DO (1) NEXT
+(108)  DO (107) NEXT
+       PLEASE FORGET #24
+       DO (21) NEXT
+       PLEASE STASH :123 + :123
+       DO (1) NEXT
+(107)  DO (106) NEXT
+       PLEASE FORGET #25
+       DO :1 <- #65535$#65535
+       DO (171) NEXT
+(171)  PLEASE FORGET #1
+       PLEASE STASH :1
+       PLEASE RETRIEVE :123
+       DO .5 <- '?"':123~:123'~'#32768$#0'"$#2'~#3
+       DO (172) NEXT
+       DO :1 <- :123
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO (171) NEXT
+(172)  DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE STASH :123
+       PLEASE RETRIEVE :1
+       DO :123 <- :1
+       DO .5 <- '?"':1~:1'~'#32768$#0'"$#1'~#3
+       DO (172) NEXT
+       DO (1) NEXT
+(106)  DO (105) NEXT
+       PLEASE FORGET #26
+       DO (21) NEXT
+       PLEASE STASH :123
+       DO (5080) NEXT
+       PLEASE READ OUT :2
+       DO (1) NEXT
+(105)  DO (104) NEXT
+       PLEASE FORGET #27
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5050) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(104)  DO (103) NEXT
+       PLEASE FORGET #28
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5040) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(103)  DO (102) NEXT
+       PLEASE FORGET #29
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5030) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(102)  DO (101) NEXT
+       PLEASE FORGET #30
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5010) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+(101)  DO (100) NEXT
+       PLEASE FORGET #31
+       DO (22) NEXT
+       DO (21) NEXT
+       DO (5000) NEXT
+       DO (33) NEXT
+       DO (1) NEXT
+
+(100)  PLEASE RESUME :1
+
+(19)   DO (1001) NEXT
+(18)   PLEASE READ OUT #30
+       PLEASE FORGET #1
+       DO (1) NEXT
+
+(21)   PLEASE RETRIEVE :123
+       DO :1 <- :123
+       DO .5 <- '?"':1~:1'~'#32768$#0'"$#2'~#3
+       DO (1001) NEXT
+       PLEASE FORGET #2
+       DO (18) NEXT
+
+(22)   PLEASE RETRIEVE :123
+       DO :2 <- :123
+       DO .5 <- '?"':2~:2'~'#32768$#0'"$#2'~#3
+       DO (1001) NEXT
+       PLEASE FORGET #2
+       DO (18) NEXT
+
+(32)   DO :3 <- :2
+(33)   DO :123 <- :3
+       DO (35) NEXT
+       PLEASE FORGET #1
+       DO (18) NEXT
+(35)   DO (36) NEXT
+       DO :123 <- #0
+       DO (37) NEXT
+(36)   DO (1001) NEXT
+(37)   PLEASE STASH :123
+       PLEASE RESUME #3
+
+       PLEASE APPEND THE FLOATING-POINT LIBRARY ROUTINES
diff --git a/pit/glider b/pit/glider
new file mode 100644 (file)
index 0000000..e619f6f
--- /dev/null
@@ -0,0 +1,14 @@
+NINE\r
+NINE\r
+ZERO\r
+TWO\r
+FOUR\r
+THREE\r
+FOUR\r
+FOUR\r
+FOUR\r
+FOUR\r
+THREE\r
+THREE\r
+TWO\r
+OH\r
diff --git a/pit/gun b/pit/gun
new file mode 100644 (file)
index 0000000..3317c69
--- /dev/null
+++ b/pit/gun
@@ -0,0 +1,90 @@
+THREE EIGHT\r
+TWO ZERO\r
+ZERO\r
+TWO\r
+SIX\r
+TWO\r
+SEVEN\r
+THREE\r
+SIX\r
+THREE\r
+SEVEN\r
+ONE THREE\r
+SIX\r
+ONE THREE\r
+SEVEN\r
+ONE THREE\r
+EIGHT\r
+ONE FOUR\r
+FIVE\r
+ONE FOUR\r
+NINE\r
+ONE FIVE\r
+FOUR\r
+ONE FIVE\r
+ONE ZERO\r
+ONE SIX\r
+FIVE\r
+ONE SIX\r
+NINE\r
+ONE SEVEN\r
+SIX\r
+ONE SEVEN\r
+SEVEN\r
+ONE SEVEN\r
+EIGHT\r
+ONE EIGHT\r
+SIX\r
+ONE EIGHT\r
+SEVEN\r
+ONE EIGHT\r
+EIGHT\r
+TWO THREE\r
+FOUR\r
+TWO THREE\r
+FIVE\r
+TWO THREE\r
+SIX\r
+TWO FOUR\r
+THREE\r
+TWO FOUR\r
+FOUR\r
+TWO FOUR\r
+SIX\r
+TWO FOUR\r
+SEVEN\r
+TWO FIVE\r
+THREE\r
+TWO FIVE\r
+FOUR\r
+TWO FIVE\r
+SIX\r
+TWO FIVE\r
+SEVEN\r
+TWO SIX\r
+THREE\r
+TWO SIX\r
+FOUR\r
+TWO SIX\r
+FIVE\r
+TWO SIX\r
+SIX\r
+TWO SIX\r
+SEVEN\r
+TWO SEVEN\r
+TWO\r
+TWO SEVEN\r
+THREE\r
+TWO SEVEN\r
+SEVEN\r
+TWO SEVEN\r
+EIGHT\r
+THREE SIX\r
+FOUR\r
+THREE SIX\r
+FIVE\r
+THREE SEVEN\r
+FOUR\r
+THREE SEVEN\r
+FIVE\r
+ZERO\r
diff --git a/pit/hail_mary.3i b/pit/hail_mary.3i
new file mode 100644 (file)
index 0000000..88a5931
--- /dev/null
@@ -0,0 +1,38 @@
+\r
+       DO ,1 <- #10\r
+       DO ,1 SUB #1 <- #238\r
+       PLEASE ABSTAIN FROM (11)\r
+       DO ,1 SUB #2 <- #140\r
+       PLEASE DO ,1 SUB #3 <- #240\r
+       DO ,1 SUB #4 <- #96\r
+       DO ,1 SUB #5 <- #132\r
+       DO ,1 SUB #6 <- #44\r
+       DO ,1 SUB #7 <- #56\r
+       DO ,1 SUB #8 <- #176\r
+       DO ,1 SUB #9 <- #238\r
+       DO ,1 SUB #10 <- #96\r
+       DO .1 <- #400\r
+       DO (19) NEXT\r
+       DO GIVE UP\r
+(19)   DO COME FROM (55)\r
+       PLEASE DO STASH .1\r
+       DO .1 <- #2500\r
+       PLEASE (31) NEXT\r
+       DO RETRIEVE .1\r
+       DO (123) NEXT\r
+(55)   PLEASE DO (15) NEXT\r
+(31)   DO COME FROM (69)\r
+       PLEASE DON'T FORGET TO INSERT A BETTER HAIL-MARY ROUTINE\r
+(11)   DO ,1 SUB #1 <- #62\r
+       PLEASE REINSTATE CALCULATING\r
+       DO READ OUT ,1\r
+       PLEASE DO (123) NEXT\r
+(69)   DO (15) NEXT\r
+(42)   DO RESUME .9\r
+(123)  PLEASE .8 <- #1\r
+       PLEASE COME FROM (81)\r
+       DO .1 <- "?.1$.8"~"#0$#29524"\r
+       DO .9 <- '?"V!1~.8'$#1"~#1'~#1\r
+       PLEASE DO (42) NEXT\r
+(81)   DO .8 <- !8$#0'~"#9841$#1"\r
+(15)   PLEASE RESUME '?"!1~.1'~#2"$#1'~#1\r
diff --git a/pit/hail_mary.doc b/pit/hail_mary.doc
new file mode 100644 (file)
index 0000000..bbfdd54
--- /dev/null
@@ -0,0 +1,56 @@
+
+From: cornet@OTech.fgg.EUR.nl (Jan-Pieter Cornet)
+Newsgroups: alt.folklore.computers,alt.lang.intercal
+Subject: Re: 90% Cobol?!?
+Date: 30 Sep 1994 12:03:23 +0100
+Organization: Education Technology, Erasmus University, Rotterdam, The Netherlands
+Message-ID: <36gr9r$k4i@gaia.otech.fgg.eur.nl>
+
+[note -- alt.lang.intercal added to newsgroups line. rec.humor removed.
+no longer necessary, the added group is also a humor group :]
+
+In article <36evl6$e3m@fenris.hiof.no>,
+Gunnar Horrigmo <gunnar.horrigmo@hiof.no> wrote:
+>Once upon a time Adam Felson scribbled:
+>>>Forgive me father for I have programmed in COBOL.
+>>>>You are forgiven.  Go now and sin no more.
+>>>Thank you father.  Whats that?  1,000,000 Hail Mary's?
+>>>[COBOL 1,000,000 Hail-Mary's removed]
+>>FORTH:
+>
+>>: 1,000,000_hail_mary's  @ special characters in word defined
+>>  1000 0 DO  @ FORTH usually has a 16bit data stack
+>>    1000 0 DO
+>>      hail-mary!
+>>    LOOP
+>>  LOOP
+>>;
+>
+>Ok. I'll have a go at ML, since I'm trying to learn that anyway...
+>
+> function Hail_Mary (int i)
+>      if i < 1000000 then Hail_Mary(i+1)
+>
+>Probably way off, but I've just started, so please correct me.
+
+Fine. You've asked for it, you'll get it. Here it is, 1,000,000 Hail-Mary's
+in TriIntercal, which is of course a much better language for this
+than ML.
+
+BTW, there appears to be an anomaly in READING OUT tail variables, since
+the READ OUT does a bit reversal instead of (as one might expect in
+TriIntercal) a trit reversal.
+
+Helpful hint: before you run this through ick, change the loop constants
+to something sensible. Finding the loop constants is left as an exercise
+to the reader :)
+
+Helpful hint 2: This would not very likely be a winning ICICC entry :)
+
+[program moved to separate file]
+
+Have fun,
+
+-- 
+Jan-Pieter Cornet
+<cornet@otech.fgg.eur.nl>
diff --git a/pit/icat.i b/pit/icat.i
new file mode 100644 (file)
index 0000000..937f10d
--- /dev/null
@@ -0,0 +1,23 @@
+       PLEASE DO ,1 <- #1
+       DO .4 <- #0
+       DO .5 <- #0
+       DO COME FROM (30)
+       DO WRITE IN ,1
+       DO .1 <- ,1SUB#1
+       DO (10) NEXT
+       PLEASE GIVE UP
+(20)   PLEASE RESUME '?.1$#256'~'#256$#256'
+(10)   DO (20) NEXT
+       DO FORGET #1
+       PLEASE DO .2 <- .4
+       DO (1000) NEXT
+       DO .4 <- .3~#255
+       PLEASE DO .3 <- !3~#15'$!3~#240'
+       DO .3 <- !3~#15'$!3~#240'
+       DO .2 <- !3~#15'$!3~#240'
+       PLEASE DO .1 <- .5
+       DO (1010) NEXT
+       DO .5 <- .2
+       DO ,1SUB#1 <- .3
+(30)   PLEASE READ OUT ,1
+
diff --git a/pit/iching.doc b/pit/iching.doc
new file mode 100644 (file)
index 0000000..cdb8edc
--- /dev/null
@@ -0,0 +1,21 @@
+
+Notes on iching1.i and iching2.i:
+
+Both versions (1 and 2) use the same code for generating lines of the
+hexagram, a simulation of the "coin oracle" method.  (Six separate
+unconditional calls to (1020) were used since I thought lumping them
+all together by starting .1 at #6 would be disrespectful.)
+Implementation of the yarrow-stalk oracle is left as an exercise for
+the student.  Note that in converting the numbers from the program into
+the lines of a hexagram, one should work from the bottom up.  The last
+number gives the top line.
+
+The traditional sequence of the hexagrams does not have a consistent
+mathematical explanation.  Version 2 of the program therefore uses a
+lookup table to determine the number of each hexagram in sequence.  The
+six lines are printed as in version 1, then the sequence number for the
+hexagram, and finally the sequence number for the derived hexagram
+obtained by replacing moving lines (9 and 6) by their opposites.
+
+Louis Howell
+September 10, 1996
diff --git a/pit/iching1.i b/pit/iching1.i
new file mode 100644 (file)
index 0000000..2701822
--- /dev/null
@@ -0,0 +1,19 @@
+       DO .2 <- #32
+       PLEASE COME FROM (10)
+       DO .1 <- #0
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO READ OUT .1
+       DO (30) NEXT
+(10)   DO .2 <- .2~#62
+(20)   DO RESUME "?.2$#2"~#3
+(30)   DO (20) NEXT
+       PLEASE FORGET #1
+       PLEASE GIVE UP
diff --git a/pit/iching2.i b/pit/iching2.i
new file mode 100644 (file)
index 0000000..b37d1eb
--- /dev/null
@@ -0,0 +1,114 @@
+       DO .2 <- #32
+       DO .5 <- #0
+       DO .6 <- #0
+       PLEASE COME FROM (10)
+       DO .1 <- #0
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO (1020) NEXT
+       DO (1020) NEXT
+       PLEASE DO %50 (1020) NEXT
+       DO READ OUT .1
+       DO (61) NEXT
+       DO .6 <- "V.2$.6"~#1365
+       DO (93) NEXT
+(62)   DO .3 <- "?.1$#6"~#21
+       PLEASE RESUME '?"!3~.3'~#1"$#2'~#3
+(61)   DO (62) NEXT
+       PLEASE FORGET #1
+       DO (71) NEXT
+       DO .5 <- "V.2$.5"~#1365
+       DO .6 <- "V.2$.6"~#1365
+       DO (93) NEXT
+(72)   DO .3 <- "?.1$#7"~#21
+       PLEASE RESUME '?"!3~.3'~#1"$#2'~#3
+(71)   DO (72) NEXT
+       PLEASE FORGET #1
+       DO (91) NEXT
+       DO .5 <- "V.2$.5"~#1365
+       DO (93) NEXT
+(92)   DO .3 <- "?.1$#9"~#85
+       PLEASE RESUME '?"!3~.3'~#1"$#2'~#3
+(91)   DO (92) NEXT
+(93)   PLEASE FORGET #1
+       DO (30) NEXT
+(10)   DO .2 <- .2~#62
+(20)   DO RESUME "?.2$#2"~#3
+(30)   DO (20) NEXT
+       PLEASE FORGET #1
+       DO ,1 <- #64
+       DO        ,1 SUB  #1 <- #2
+       DO        ,1 SUB  #2 <- #23
+       DO        ,1 SUB  #3 <- #8
+       PLEASE DO ,1 SUB  #4 <- #20
+       DO        ,1 SUB  #5 <- #16
+       DO        ,1 SUB  #6 <- #35
+       DO        ,1 SUB  #7 <- #45
+       PLEASE DO ,1 SUB  #8 <- #12
+       DO        ,1 SUB  #9 <- #15
+       DO        ,1 SUB #10 <- #52
+       DO        ,1 SUB #11 <- #39
+       PLEASE DO ,1 SUB #12 <- #53
+       DO        ,1 SUB #13 <- #62
+       DO        ,1 SUB #14 <- #56
+       DO        ,1 SUB #15 <- #31
+       PLEASE DO ,1 SUB #16 <- #33
+       DO        ,1 SUB #17 <- #7
+       DO        ,1 SUB #18 <- #4
+       DO        ,1 SUB #19 <- #29
+       PLEASE DO ,1 SUB #20 <- #59
+       DO        ,1 SUB #21 <- #40
+       DO        ,1 SUB #22 <- #64
+       DO        ,1 SUB #23 <- #47
+       PLEASE DO ,1 SUB #24 <- #6
+       DO        ,1 SUB #25 <- #46
+       DO        ,1 SUB #26 <- #18
+       DO        ,1 SUB #27 <- #48
+       PLEASE DO ,1 SUB #28 <- #57
+       DO        ,1 SUB #29 <- #32
+       DO        ,1 SUB #30 <- #50
+       DO        ,1 SUB #31 <- #28
+       PLEASE DO ,1 SUB #32 <- #44
+       DO        ,1 SUB #33 <- #24
+       DO        ,1 SUB #34 <- #27
+       DO        ,1 SUB #35 <- #3
+       PLEASE DO ,1 SUB #36 <- #42
+       DO        ,1 SUB #37 <- #51
+       DO        ,1 SUB #38 <- #21
+       DO        ,1 SUB #39 <- #17
+       PLEASE DO ,1 SUB #40 <- #25
+       DO        ,1 SUB #41 <- #36
+       DO        ,1 SUB #42 <- #22
+       DO        ,1 SUB #43 <- #63
+       PLEASE DO ,1 SUB #44 <- #37
+       DO        ,1 SUB #45 <- #55
+       DO        ,1 SUB #46 <- #30
+       DO        ,1 SUB #47 <- #49
+       PLEASE DO ,1 SUB #48 <- #13
+       DO        ,1 SUB #49 <- #19
+       DO        ,1 SUB #50 <- #41
+       DO        ,1 SUB #51 <- #60
+       PLEASE DO ,1 SUB #52 <- #61
+       DO        ,1 SUB #53 <- #54
+       DO        ,1 SUB #54 <- #38
+       DO        ,1 SUB #55 <- #58
+       PLEASE DO ,1 SUB #56 <- #10
+       DO        ,1 SUB #57 <- #11
+       DO        ,1 SUB #58 <- #26
+       DO        ,1 SUB #59 <- #5
+       PLEASE DO ,1 SUB #60 <- #9
+       DO        ,1 SUB #61 <- #34
+       DO        ,1 SUB #62 <- #14
+       DO        ,1 SUB #63 <- #43
+       PLEASE DO ,1 SUB #64 <- #1
+       DO .1 <- .5
+       DO (1020) NEXT
+       PLEASE READ OUT ,1 SUB .1
+       DO .1 <- .6
+       DO (1020) NEXT
+       PLEASE READ OUT ,1 SUB .1
+       PLEASE GIVE UP
diff --git a/pit/ins.doc b/pit/ins.doc
new file mode 100644 (file)
index 0000000..8fa329e
--- /dev/null
@@ -0,0 +1,132 @@
+"Intersections & Splats" is an INTERCAL implementation of one of my
+favorite games, "Cows & Bulls," now more commonly known by the
+commercial version, "Mastermind."
+
+       Rules of the Game
+
+The idea of the game is that one person selects a "code" in the form
+of a short string of digits, typically four. ("Mastermind" used colors
+in place of numbers.) The other person has a limited number of chances
+to guess what the code is. Every move consists of submitting a guess,
+and the first player replying with a score. Each scoring reveals a
+little more information about the code.  A guess is scored by giving a
+certain number of cows and a certain number of bulls. These correspond
+to Mastermind's white pegs and black pegs, respectively - and, in this
+program, intersections (+) and splats (*).
+
+This game is perfect for a computer because the person who makes the
+code has nothing to do but score the other player's guesses - a
+mechanical task.
+
+Here's how the scoring works. For every number in the code that is
+matched by the same number in the same position in the guess, a splat
+is scored. And for every number in the code that is matched by the
+same number in the guess, but in the wrong position, an intersection,
+is scored.
+
+For example: with a code of "3451" and a guess of "2465", one splat
+and one intersection would be earned. The splat is for the 4, and the
+intersection is for the 5. Of course, the player making the guesses
+isn't told which numbers earned what - that's what they have to
+deduce. A guess of "6152" gets exactly the same score, even though the
+intersection and splat correspond to completely different digits.
+
+The game continues until the code is discovered or the player runs out
+of guesses.
+
+Note that there can be some confusion about how the scoring works with
+repeated digits. In absence of a better standards body, I have stuck
+with the version described in the Mastermind rules, which is that a
+digit in the guess can match up with more than one digit in the code.
+Another example is in order. Say the code is "2412". A guess of "2544"
+would earn one splat and two intersections. The splat is for having a
+2 in the guess in the right position, and one of the intersections is
+also for having a 2 in the guess, but now in the wrong position. The
+final intersection is earned by having a 4 in the guess, again in the
+wrong position. The second 4 in the guess, however, does not affect
+the scoring.
+
+Here is an algorithmic description of how scoring is done. The player
+looks at each digit in the code in turn. If the digit under
+consideration is matched by the same digit in the same place, a splat
+is earned. Otherwise, if any other digit in the guess is the same, an
+intersection is earned.
+
+For those conversant in C, here is an even more algorithmic
+description:
+
+       for (i = 0 ; i < digits ; ++i)
+           if (guess[i] == code[i])
+               ++splats;
+           else
+               for (j = 0 ; j < digits ; ++j)
+                   if (guess[j] == code[i]) {
+                       ++intersections;
+                       break;
+                   }
+
+For those conversant in INTERCAL, consult the source code.
+
+Anyway, enough of this. Play the game a few times; you'll get the idea.
+
+       How To Play
+
+At each move the board is displayed, which shows you all of your
+previous guesses. Above each guess are the intersections and splats
+that they earned. Here is an example of a game in progress:
+
+           +    
+ * +  +    * *  
+ (1)  (5)  (2)  ( )  ( )  ( )  ( )  ( )  ( )  ( )   (?)
+ (2)  (4)  (4)  ( )  ( )  ( )  ( )  ( )  ( )  ( )   (?)
+ (4)  (4)  (3)  ( )  ( )  ( )  ( )  ( )  ( )  ( )   (?)
+ (2)  (6)  (5)  ( )  ( )  ( )  ( )  ( )  ( )  ( )   (?)
+
+The first guess "1242" earned one splat and one intersection. The
+third guess "2435" earned two splats and one intersection. The player
+has seven more guesses left. Guesses are typed in at the "MOVE:"
+prompt.
+
+At the end of the game, the questions marks at the right are replaced
+with the code. You are then prompted with "[CNQ]". Enter N to start a
+new game, Q to quit playing, or C to configure the game (see below). N
+is the default, so if you just hit enter, or type anything except C or
+Q, it has the same effect. You can also use any of these commands at
+the "MOVE:" prompt, if you wish to abandon the current game. In
+addition, R can be entered during a game to redraw the board.
+
+       Configuring the Game
+
+The game is set up originally to have ten guesses in a game, four
+digits in the code, and to use the digits 1 through 6. (This matches
+the setup of the "Mastermind" game.) The C command can be used to
+modify these settings, so as to change the difficulty of the game.
+
+When you enter the C command, you are first prompted for the X
+setting, the number of guesses allowed; then the Y setting, which is
+the number of digits in the code; and finally the N setting, the
+number of digits used in the game. Each number is entered using
+standard INTERCAL numeric entry. (Yes, I could have used my own numio
+routines here, but the program is big enough as it is. Besides, I
+didn't want you to completely forget that you were using an INTERCAL
+program.) You can enter ZERO at any three prompts to abort the
+configuration and return to the current game. If any values are higher
+than ONE FIVE, the value modulo 16 will be used instead. Note that
+while you can enter a value higher than NINE for the number of digits,
+you may need to have an ASCII chart handy. (By the way, if anyone
+wants an EBCDIC version, drop me a line.)
+
+       Other Versions
+
+I enjoyed writing this program so much, that I created two others
+based on it. First, there is a colorized version, which requires a
+VT100/ANSI color terminal, or something compatible. And second, there
+is a CGI script version that plays this game. A package containing all
+three versions is available at ftp.muppetlabs.com under
+/pub/intercal/ins.tar.gz. In addition, you can play the CGI script at
+http://www.muppetlabs.com/~breadbox/intercal/ins/insstart.html.
+
+       Coda
+
+That's it. Have fun. Questions, comments, and concerns for my mental
+health can be directed to breadbox@muppetlabs.com.
diff --git a/pit/ins.i b/pit/ins.i
new file mode 100644 (file)
index 0000000..0915e71
--- /dev/null
+++ b/pit/ins.i
@@ -0,0 +1,475 @@
+       PLEASE NOTE THE STARTUP BANNER
+
+       PLEASE DO ,1 <- #43
+       DO ,1SUB#1 <- #176
+       DO ,1SUB#2 <- #190
+       DO ,1SUB#3 <- #142
+       DO ,1SUB#4 <- #146
+       DO ,1SUB#5 <- #110
+       DO ,1SUB#6 <- #218
+       DO ,1SUB#7 <- #38
+       DO ,1SUB#8 <- #98
+       DO ,1SUB#9 <- #158
+       DO ,1SUB#10 <- #186
+       DO ,1SUB#11 <- #70
+       DO ,1SUB#12 <- #58
+       DO ,1SUB#13 <- #198
+       DO ,1SUB#14 <- #98
+       DO ,1SUB#15 <- #158
+       DO ,1SUB#16 <- #66
+       DO ,1SUB#17 <- #190
+       DO ,1SUB#18 <- #218
+       DO ,1SUB#19 <- #38
+       DO ,1SUB#20 <- #114
+       DO ,1SUB#21 <- #142
+       DO ,1SUB#22 <- #18
+       DO ,1SUB#23 <- #238
+       DO ,1SUB#24 <- #146
+       DO ,1SUB#25 <- #110
+       DO ,1SUB#26 <- #58
+       DO ,1SUB#27 <- #198
+       DO ,1SUB#28 <- #0
+       DO ,1SUB#29 <- #160
+       DO ,1SUB#30 <- #96
+       DO ,1SUB#31 <- #0
+       DO ,1SUB#32 <- #58
+       DO ,1SUB#33 <- #198
+       DO ,1SUB#34 <- #250
+       DO ,1SUB#35 <- #6
+       DO ,1SUB#36 <- #210
+       DO ,1SUB#37 <- #46
+       DO ,1SUB#38 <- #130
+       DO ,1SUB#39 <- #126
+       DO ,1SUB#40 <- #218
+       DO ,1SUB#41 <- #38
+       DO ,1SUB#42 <- #58
+       DO ,1SUB#43 <- #122
+       PLEASE READ OUT ,1
+
+       PLEASE NOTE THE INITIALIZATION OF GLOBAL VALUES
+
+       PLEASE DO ,5 <- #1
+       DO ,5SUB#1 <- #0
+       PLEASE DO ,6 <- #1
+       DO ,6SUB#1 <- #76
+       PLEASE DO ,7 <- #1
+       DO ,7SUB#1 <- #180
+       PLEASE DO ,11 <- #1
+       PLEASE DO ,12 <- #2
+       PLEASE DO ,15 <- #5
+       PLEASE DO ,16 <- #6
+       DO ,15SUB#1 <- #240
+       DO ,15SUB#4 <- #144
+       DO ,15SUB#5 <- #0
+       DO (3990) NEXT
+
+       DO .11 <- #10
+       DO .12 <- #4
+       DO .13 <- #6
+       PLEASE COME FROM (64)
+       DO (100) NEXT
+
+       PLEASE NOTE THE GAME BEGINNING AND THE COMPUTER CHOOSING A CODE
+
+       PLEASE COME FROM (40)
+
+       DO .6 <- #1
+       PLEASE COME FROM (12)
+       DO (1900) NEXT
+       DO .1 <- .1~#4095
+       DO .2 <- .13
+       DO (1039) NEXT
+       DO .1 <- .3~#61440
+       DO (1020) NEXT
+       DO ,23SUB.6 <- .1
+       DO .5 <- '?"'#65535~"'?.6$.12'~#21845"'~#1"$#1'~#3
+       DO (13) NEXT
+       DO .1 <- .6
+       DO (1020) NEXT
+(12)   DO .6 <- .1
+(13)   DO (1001) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE THE OPENING OF THE GREAT LOOP
+
+       DO .10 <- #1
+       PLEASE COME FROM (42)
+
+       PLEASE NOTE THE BOARD BEING DRAWN AND INPUT BEING GATHERED
+
+       PLEASE COME FROM (62)
+       DO .4 <- #1
+       DO (130) NEXT
+       DO ,16SUB#1 <- #158
+       DO ,16SUB#2 <- #192
+       DO ,16SUB#3 <- #136
+       DO ,16SUB#4 <- #200
+       DO ,16SUB#5 <- #70
+       DO ,16SUB#6 <- #88
+       PLEASE COME FROM (22)
+       PLEASE READ OUT ,16
+       DO .1 <- .12
+       DO .2 <- .13
+       DO (3020) NEXT
+       DO .5 <- .4
+       DO (23) NEXT
+       DO .5 <- '?"'#65535~"'?.3$#1'~'#0$#65535'"'~#1"$#1'~#3
+       PLEASE COME FROM (28)
+(26)   DO (27) NEXT
+(27)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .1 <- ,1SUB#1
+       DO (50) NEXT
+(28)   DO ,1SUB#1 <- #82
+(23)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .5 <- '?"'#65535~"'?.3$.12'~#21845"'~#1"$#1'~#3
+(25)   DO (24) NEXT
+       PLEASE COME FROM (26)
+       DO ,12SUB#1 <- #8
+       DO ,12SUB#2 <- #172
+(22)   PLEASE READ OUT ,12
+(24)   DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE READ OUT ,7
+       DO .1 <- #1
+       PLEASE COME FROM (20)
+
+       DO ,22SUB.10.1 <- ,1SUB.1
+       DO .5 <- '?"'#65535~"'?.1$.12'~#21845"'~#1"$#1'~#3
+       DO (21) NEXT
+(20)   DO (1020) NEXT
+(21)   DO (1001) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE THE SCORING OF THE GUESS
+
+       DO .6 <- #32768
+       DO .7 <- #0
+       DO .8 <- #0
+       DO .2 <- #1
+       PLEASE COME FROM (30)
+       DO .9 <- ,23SUB.2
+       DO .5 <- '?"'#65535~"'?",22SUB.10.2"$.9'~#21845"'~#1"$#2'~#3
+       DO (31) NEXT
+(32)   DO .7 <- 'V.7$.6'~'#0$#65535'
+(31)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .1 <- #1
+       PLEASE COME FROM (33)
+       DO .5 <- '?"'#65535~"'?",22SUB.10.1"$.9'~#21845"'~#1"$#2'~#3
+       DO (34) NEXT
+       PLEASE COME FROM (32)
+(35)   DO .8 <- 'V.8$.6'~'#0$#65535'
+(34)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .5 <- '?"'#65535~"'?.1$.12'~#21845"'~#1"$#1'~#3
+       DO (36) NEXT
+(33)   DO (1020) NEXT
+(36)   DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE COME FROM (35)
+       DO .6 <- .6~#65534
+       DO .5 <- '?"'#65535~"'?.2$.12'~#21845"'~#1"$#1'~#3
+       DO (37) NEXT
+       DO .1 <- .2
+       DO (1020) NEXT
+(30)   DO .2 <- .1
+(37)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO ,21SUB.10#1 <- .7~.7
+       DO ,21SUB.10#2 <- .8~.8
+       DO .6 <- ',21SUB.10#1'~.20
+
+       PLEASE NOTE THE CLOSING OF THE GREAT LOOP
+
+       DO .5 <- '?.6$#2'~#3
+       DO (41) NEXT
+       DO .5 <- '?"'#65535~"'?.10$.11'~#21845"'~#1"$#1'~#3
+       DO (41) NEXT
+       DO .1 <- .10
+       DO (1020) NEXT
+(42)   DO .10 <- .1
+(41)   DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .1 <- .10
+       DO (1020) NEXT
+       DO .10 <- .1
+       DO .4 <- #2
+       DO (130) NEXT
+
+       PLEASE NOTE THE GAME'S DENOUEMENT
+
+       DO ,16SUB#1 <- #118
+       DO ,16SUB#2 <- #24
+       DO ,16SUB#3 <- #80
+       DO ,16SUB#4 <- #232
+       DO ,16SUB#5 <- #208
+       DO ,16SUB#6 <- #182
+       PLEASE READ OUT ,16
+       DO .1 <- #1
+       DO .2 <- #0
+       DO (3020) NEXT
+       DO .5 <- '?"'#65535~"'?.3$#1'~'#0$#65535'"'~#1"$#2'~#3
+       DO (43) NEXT
+       DO .1 <- ,1SUB#1
+       DO (59) NEXT
+       DO (44) NEXT
+(43)   DO (1001) NEXT
+(44)   PLEASE FORGET #1
+       PLEASE COME FROM (63)
+(40)   PLEASE READ OUT ,7
+
+       PLEASE NOTE THE HANDLING OF USER COMMANDS
+
+(50)   DO .5 <- '?"'#65535~"'?.1$#82'~#21845"'~#1"$#1'~#3
+       DO (52) NEXT
+       DO .5 <- '?"'#65535~"'?.1$#78'~#21845"'~#1"$#1'~#3
+       DO (53) NEXT
+(59)   DO .5 <- '?"'#65535~"'?.1$#67'~#21845"'~#1"$#1'~#3
+       DO (54) NEXT
+       DO .5 <- '?"'#65535~"'?.1$#81'~#21845"'~#1"$#1'~#3
+       DO (55) NEXT
+       DO RESUME #1
+(52)   DO (1001) NEXT
+       PLEASE FORGET #2
+(62)   PLEASE READ OUT ,7
+(53)   DO (1001) NEXT
+(63)   PLEASE FORGET #2
+(54)   DO (1001) NEXT
+       DO ,11SUB#1 <- #88
+       DO ,12SUB#1 <- #54
+       DO ,12SUB#2 <- #190
+       PLEASE READ OUT ,7 + ,12 + ,11
+       PLEASE WRITE IN .1
+       DO .5 <- '?"'.1~.1'~#1"$#1'~#3
+       DO (51) NEXT
+       DO ,12SUB#1 <- #106
+       DO ,12SUB#2 <- #62
+       PLEASE READ OUT ,12 + ,11
+       PLEASE WRITE IN .2
+       DO .5 <- '?"'.2~.2'~#1"$#1'~#3
+       DO (51) NEXT
+       DO ,12SUB#1 <- #146
+       DO ,12SUB#2 <- #22
+       PLEASE READ OUT ,12 + ,11
+       PLEASE WRITE IN .3
+       DO .5 <- '?"'.3~.3'~#1"$#1'~#3
+       DO (51) NEXT
+       DO .11 <- .1~#15
+       DO .12 <- .2~#15
+       DO .13 <- .3~#15
+       PLEASE FORGET #2
+(64)   PLEASE READ OUT ,7
+(51)   DO (1001) NEXT
+       PLEASE RESUME #3
+(55)   DO (1001) NEXT
+       PLEASE FORGET #2
+       PLEASE READ OUT ,7
+       PLEASE GIVE UP
+
+       PLEASE NOTE THE SUBROUTINE TO INITIALIZE GLOBAL VARIABLES
+
+(100)  DO ,21 <- .11 BY #2
+       DO ,22 <- .11 BY .12
+       DO ,23 <- .12
+
+       DO .20 <- #1
+       DO .1 <- #1
+       PLEASE COME FROM (104)
+       DO .5 <- '?"'#65535~"'?.1$.12'~#21845"'~#1"$#1'~#3
+       DO (105) NEXT
+       DO .20 <- !20$#0'~'#32767$#1'
+(104)  DO (1020) NEXT
+(105)  DO (1001) NEXT
+       PLEASE FORGET #1
+
+       DO ,1 <- .12
+       DO ,2 <- .13
+       DO ,10 <- .13 BY #2
+       DO .1 <- #1
+       PLEASE COME FROM (102)
+       DO .2 <- 'V.1$#48'~#21845
+       DO ,2SUB.1 <- .2
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .4 <- .1
+       DO .1 <- #20
+       DO (1010) NEXT
+       DO .1 <- .4
+       DO ,10SUB.1#1 <- .3~#255
+       DO ,10SUB.1#2 <- '?.3$#112'~#21845
+       DO .5 <- '?"'#65535~"'?.1$.13'~#21845"'~#1"$#1'~#3
+       DO (103) NEXT
+(102)  DO (1020) NEXT
+(103)  DO (1001) NEXT
+       PLEASE RESUME #2
+
+       PLEASE NOTE THE SUBROUTINE TO DISPLAY THE BOARD
+
+(130)  PLEASE STASH .1 + .2 + .3 + .4 + .5
+       DO .4 <- .20
+       DO .5 <- '?".12~#1"$#1'~#3
+       DO (131) NEXT
+       DO .4 <- !4$#0'~'#32767$#1'
+       DO (132) NEXT
+(131)  DO (1001) NEXT
+(132)  PLEASE FORGET #1
+       DO .2 <- .4
+
+       PLEASE COME FROM (140)
+       PLEASE READ OUT ,6
+       DO .1 <- #1
+       PLEASE COME FROM (134)
+       DO .5 <- '?"'#65535~"'?.1$.10'~#21845"'~#1"$#1'~#3
+       DO (133) NEXT
+       DO .3 <- .2~#65534
+       PLEASE COME FROM (135)
+       DO .5 <- '?"',21SUB.1#1'~.3"$#1'~#3
+       DO (139) NEXT
+       DO ,12SUB#1 <- #176
+       DO ,12SUB#2 <- #80
+       DO (137) NEXT
+(139)  DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .5 <- '?"',21SUB.1#2'~.3"$#1'~#3
+       DO (138) NEXT
+       DO ,12SUB#1 <- #48
+       DO ,12SUB#2 <- #208
+       DO (137) NEXT
+(138)  DO (1001) NEXT
+       DO ,12SUB#1 <- #0
+       DO ,12SUB#2 <- #0
+(137)  PLEASE FORGET #1
+       PLEASE READ OUT ,12
+       DO .5 <- '?".3~.2"$#2'~#3
+       DO (136) NEXT
+(135)  DO .3 <- .2
+(136)  DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE READ OUT ,5
+(134)  DO (1020) NEXT
+(133)  DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE READ OUT ,7
+       DO .2 <- .2~#65532
+       DO .5 <- '?".2~.2"$#1'~#3
+(140)  DO (141) NEXT
+(141)  DO (1001) NEXT
+       PLEASE FORGET #1
+
+       PLEASE RETRIEVE .4
+       DO ,16SUB#1 <- #0
+       DO ,16SUB#2 <- #0
+       DO ,16SUB#3 <- #240
+       DO ,16SUB#6 <- #68
+       DO .2 <- #0
+       PLEASE COME FROM (150)
+       DO .1 <- .2
+       DO (1020) NEXT
+       DO .2 <- .1
+       PLEASE READ OUT ,6
+       DO .1 <- #1
+       DO .3 <- #0
+       PLEASE COME FROM (142)
+       DO .5 <- '?"'#65535~"'?.1$.10'~#21845"'~#1"$#1'~#3
+       DO (149) NEXT
+       DO .5 <- ,22SUB.1.2
+       DO ,15SUB#2 <- ,10SUB.5#1
+       DO ,15SUB#3 <- ,10SUB.5#2
+       PLEASE READ OUT ,15
+       DO .3 <- .1
+(142)  DO (1020) NEXT
+(149)  DO (1001) NEXT
+       DO ,15SUB#2 <- #16
+       DO ,15SUB#3 <- #112
+(148)  DO .1 <- .3
+       PLEASE COME FROM (144)
+       PLEASE READ OUT ,15
+       DO (1020) NEXT
+       PLEASE COME FROM (148)
+       DO .5 <- '?"'#65535~"'?.1$.11'~#21845"'~#1"$#1'~#3
+(144)  DO (143) NEXT
+(143)  DO (1001) NEXT
+       PLEASE FORGET #2
+       DO .5 <- .4
+       DO (145) NEXT
+       DO .5 <- ,23SUB.2
+       DO ,16SUB#4 <- ,10SUB.5#1
+       DO ,16SUB#5 <- ,10SUB.5#2
+       DO (146) NEXT
+(145)  DO (1001) NEXT
+       DO ,16SUB#4 <- #24
+       DO ,16SUB#5 <- #104
+(146)  PLEASE FORGET #1
+       PLEASE READ OUT ,16
+       DO .5 <- '?"'#65535~"'?.2$.12'~#21845"'~#1"$#1'~#3
+(150)  DO (147) NEXT
+(147)  DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE READ OUT ,5
+       PLEASE RETRIEVE .1 + .2 + .3 + .5
+       PLEASE RESUME #1
+
+       PLEASE USE THE AUTHORIZED CHANNELS
+
+(3000) DO STASH .2 + .3
+       DO .1 <- ,3000SUB#1
+       PLEASE WRITE IN ,3000
+       DO .2 <- ,3000SUB#1
+       DO (1000) NEXT
+       DO .1 <- .3~#255
+       DO ,3000SUB#1 <- .1
+       DO RETRIEVE .2 + .3
+       PLEASE RESUME #1
+
+(3020) PLEASE STASH .1 + .5 + .6 + .7
+       DO (1020) NEXT
+       DO .3 <- #0
+       DO .4 <- #6
+       DO .6 <- .1
+       DO (3022) NEXT
+(3021) DO (1001) NEXT
+(3022) PLEASE FORGET #1
+       DO (3000) NEXT
+       DO .5 <- '?"?.1~#256"$#2'~#3
+       DO (3023) NEXT
+       DO .5 <- '?"'#65535~"'?.1$#10'~#21845"'~#1"$#1'~#3
+       DO (3023) NEXT
+       DO .7 <- .1
+       DO .1 <- .3
+       PLEASE DO (1020) NEXT
+       DO .3 <- .1
+       DO .5 <- .4~#3
+       DO (3021) NEXT
+       DO .5 <- '?"'#65535~"'?.3$.6'~'#0$#65535'"'~#1"$#1'~#3
+       DO .4 <- !4$.5'~#37
+       DO (3021) NEXT
+(3027) DO .1 <- #0
+       PLEASE COME FROM (3024)
+       PLEASE DO (1020) NEXT
+       DO .5 <- '?"'#65535~"'?.7$",2SUB.1"'~#21845"'~#1"$#1'~#3
+       DO (3025) NEXT
+       PLEASE COME FROM (3027)
+       DO .5 <- '?"'#65535~"'?.1$.2'~'#0$#65535'"'~#1"$#1'~#3
+(3024) DO (3026) NEXT
+(3026) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO ,1SUB.3 <- .7
+       DO .4 <- .4~#3
+       DO (3022) NEXT
+(3025) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO ,1SUB.3 <- .1
+       DO (3022) NEXT
+(3023) DO (1001) NEXT
+       PLEASE RETRIEVE .1 + .5 + .6 + .7
+       DO .4 <- '?#2$.&4'~#6
+       PLEASE RESUME #2
+
+(3990) DO ,3000 <- #1
+       DO ,3000SUB#1 <- #0
+       DO ,3001 <- #1
+       DO ,3001SUB#1 <- #0
+       PLEASE RESUME #1
diff --git a/pit/interfunge.i b/pit/interfunge.i
new file mode 100644 (file)
index 0000000..986e80c
--- /dev/null
@@ -0,0 +1,712 @@
+       PLEASE DO (600) NEXT
+       PLEASE DON'T PAY ATTENTION TO THE ABOVE LINE IF YOU ARE HUMAN
+
+       INTERFUNGE.I - COPYRIGHT 2008 JEFFREY LEE
+
+       THE BEFUNGE PROGRAM FROM IS FIRST READ FROM INPUT
+       DON'T FORGET TO TERMINATE YOUR FUNGESPACE PROGRAM WITH A BLANK LINE
+
+       VARIABLES AND SUBROUTINES:
+       ;1 IS THE 2D FUNGESPACE ARRAY
+       ;2 IS THE FUNGESPACE STACK
+       .10 AND .11 ARE THE IP
+       .12 AND .13 ARE THE DELTA
+       .14 IS THE STACK DEPTH
+       .15 AND .16 ARE THE IO TAPE POSITIONS
+       ,1 IS THE IO BUFFER
+       ,2 IS THE INSTRUCTION LOOKUP TABLE
+       [500] GETS A CHAR INTO .1 AND [510] OUTPUTS A CHAR FROM .1
+       [530] PUSHES :1 AND [540] POPS :1 FROM THE STACK
+
+       LICENSING:
+       INTERFUNGE.I IS FREE SOFTWARE: YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+       IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+       THE FREE SOFTWARE FOUNDATION, EITHER VERSION 2 OF THE LICENSE, OR
+       (AT YOUR OPTION) ANY LATER VERSION.
+       INTERFUNGE.I IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
+       BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+       MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  SEE THE
+       GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+       YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+       ALONG WITH INTERFUNGE.I.  IF NOT, SEE <HTTP://WWW.GNU.ORG/LICENSES/>.
+
+       PLEASE NOTE THAT THE PROGRAM STARTS HERE
+
+(600)  PLEASE DO ;1 <- #80 BY #25
+       DO ;2 <- #10000
+       DO .11 <- #1
+       PLEASE DO .12 <- #1
+       DO .13 <- #0
+       DO .14 <- #0
+       DO .15 <- #0
+       DO .16 <- #0
+       PLEASE DO ,1 <- #1
+       PLEASE DO ,2 <- #127
+       DO .3 <- #127
+       DO .2 <- #1
+(13)   DO FORGET #1
+       DO .1 <- .3
+       PLEASE DO ,2SUB.1 <- #1
+       DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (14) NEXT
+       DO (13) NEXT
+(14)   PLEASE DO (3) NEXT
+       DON'T FORGET THAT [1] CLEARS THE CALL STACK FOR US
+       DO ,2SUB#32 <- #2
+       DO ,2SUB#33 <- #3
+       PLEASE DO ,2SUB#34 <- #4
+       DO ,2SUB#35 <- #5
+       DO ,2SUB#36 <- #6
+       DO ,2SUB#37 <- #7
+       PLEASE DO ,2SUB#38 <- #8
+       DO ,2SUB#42 <- #9
+       DO ,2SUB#43 <- #10
+       DO ,2SUB#44 <- #11
+       PLEASE DO ,2SUB#45 <- #12
+       DO ,2SUB#46 <- #13
+       DO ,2SUB#47 <- #14
+       DO ,2SUB#48 <- #15
+       PLEASE DO ,2SUB#49 <- #16
+       DO ,2SUB#50 <- #17
+       DO ,2SUB#51 <- #18
+       DO ,2SUB#52 <- #19
+       PLEASE DO ,2SUB#53 <- #20
+       DO ,2SUB#54 <- #21
+       DO ,2SUB#55 <- #22
+       DO ,2SUB#56 <- #23
+       PLEASE DO ,2SUB#57 <- #24
+       DO ,2SUB#58 <- #25
+       DO ,2SUB#60 <- #26
+       DO ,2SUB#62 <- #27
+       PLEASE DO ,2SUB#63 <- #28
+       DO ,2SUB#64 <- #29
+       DO ,2SUB#92 <- #30
+       DO ,2SUB#94 <- #31
+       PLEASE DO ,2SUB#95 <- #32
+       DO ,2SUB#96 <- #33
+       DO ,2SUB#103 <- #34
+       DO ,2SUB#112 <- #35
+       PLEASE DO ,2SUB#118 <- #36
+       DO ,2SUB#124 <- #37
+       DO ,2SUB#126 <- #38
+(5)    DO .10 <- #1
+(1)    PLEASE FORGET #1
+(10)   DO (500) NEXT
+(11)   DON'T .1 <- #10
+       DO .5 <- .1
+       DO .2 <- #10
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       DO (2) NEXT
+       DO .1 <- .10
+       DO .2 <- #81
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       DO (18) NEXT
+       DO ;1SUB.10.11 <- .5
+       PLEASE ABSTAIN FROM (18)
+(18)   DO (3) NEXT
+       PLEASE REINSTATE (18)
+       PLEASE FORGET #1
+       DO .1 <- .10
+       PLEASE DO (1020) NEXT
+       DO .10 <- .1
+       PLEASE DO (1) NEXT
+(2)    DO (3) NEXT
+       DO FORGET #1
+       DO .1 <- .10
+       DO .2 <- #1
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       DO (4) NEXT
+(7)    PLEASE FORGET #1
+       DO .1 <- .10
+       DO .2 <- #81
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       DO (6) NEXT
+       DO ;1SUB.10.11 <- #32
+       DO .1 <- .10
+       DO .2 <- #1
+       PLEASE DO (1000) NEXT
+       DO .10 <- .3
+       DO (7) NEXT
+(6)    DO (3) NEXT
+       PLEASE FORGET #1
+       DO .1 <- .11
+       PLEASE DO (1020) NEXT
+       DO .11 <- .1
+       DO .2 <- #26
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       DO (8) NEXT
+       DO (5) NEXT
+(8)    PLEASE DO (3) NEXT
+       PLEASE FORGET #1
+       PLEASE DO (9) NEXT
+(4)    DO (3) NEXT
+       PLEASE FORGET #1
+       DO ABSTAIN FROM (10)
+       PLEASE REINSTATE (11)
+       PLEASE DO (7) NEXT
+(3)    PLEASE RESUME .1
+(9)    DO .10 <- #1
+       DO .11 <- #1
+(12)   DO :9 <- ;1SUB.10.11
+       DO .1 <- '?"':9~:9'~#1"$#1'~#3
+       PLEASE DO (15) NEXT
+       DO .1 <- :9~'#65528$#65520'
+       DO .1 <- '?"!1~.1'~#1"$#1'~#3
+       PLEASE DO (16) NEXT
+       PLEASE DO (17) NEXT
+(16)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .1 <- ,2SUB:9
+       PLEASE DO (390) NEXT
+(15)   PLEASE DO (3) NEXT
+(17)   DO FORGET #80
+       DON'T IMPLEMENT REFLECT HERE
+       DO .1 <- #0
+       DO .2 <- .12
+       PLEASE DO (1010) NEXT
+       DO .12 <- .3
+       DO .2 <- .13
+       PLEASE DO (1010) NEXT
+       DO .13 <- .3
+       DO (20) NEXT
+(30)   PLEASE DO (15) NEXT
+(20)   DON'T IMPLEMENT SPACE HERE
+       DO FORGET #80
+       DO .1 <- '?".12~#1"$#1'~#3
+       PLEASE DO (33) NEXT
+       DO .1 <- .10
+       DO .2 <- .12
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (31) NEXT
+       DO .10 <- .3
+       DO .1 <- .3
+       DO .2 <- #81
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (32) NEXT
+       DO (12) NEXT
+(31)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #80
+       DO (12) NEXT
+(32)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #1
+       DO (12) NEXT
+(33)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .1 <- .11
+       DO .2 <- .13
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (34) NEXT
+       DO .11 <- .3
+       DO .1 <- .3
+       DO .2 <- #26
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (35) NEXT
+       DO (12) NEXT
+(34)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #25
+       DO (12) NEXT
+(35)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #1
+       DO (12) NEXT
+(40)   PLEASE DO (30) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT NOT HERE
+       DO (540) NEXT
+       DO :1 <- '?"':1~:1'~#1"$#1'~#1
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(50)   PLEASE DO (40) NEXT
+(58)   DON'T IMPLEMENT STRINGMODE HERE
+       DO FORGET #80
+       DO .1 <- '?".12~#1"$#1'~#3
+       PLEASE DO (53) NEXT
+       DO .1 <- .10
+       DO .2 <- .12
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (51) NEXT
+       DO .10 <- .3
+       DO .1 <- .3
+       DO .2 <- #81
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (52) NEXT
+       DO (56) NEXT
+(51)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #80
+       DO (56) NEXT
+(52)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #1
+       DO (56) NEXT
+(53)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .1 <- .11
+       DO .2 <- .13
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (54) NEXT
+       DO .11 <- .3
+       DO .1 <- .3
+       DO .2 <- #26
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (55) NEXT
+       DO (56) NEXT
+(54)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #25
+       DO (56) NEXT
+(55)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #1
+(56)   DO FORGET #1
+       DO :1 <- ;1SUB.10.11
+       DO :2 <- #34
+       PLEASE DO (1510) NEXT
+       DO .1 <- '?"':3~:3'~#1"$#1'~#3
+       DO (57) NEXT
+       DO (530) NEXT
+       DO (58) NEXT
+(57)   DO (3) NEXT
+       PLEASE DO (20) NEXT
+(60)   PLEASE DO (50) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT TRAMPOLINE HERE
+       DO .1 <- '?".12~#1"$#1'~#3
+       PLEASE DO (63) NEXT
+       DO .1 <- .10
+       DO .2 <- .12
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (31) NEXT
+       DO .10 <- .3
+       DO .1 <- .3
+       DO .2 <- #81
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (62) NEXT
+       DO (20) NEXT
+(61)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #80
+       DO (20) NEXT
+(62)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .10 <- #1
+       DO (20) NEXT
+(63)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .1 <- .11
+       DO .2 <- .13
+       PLEASE DO (1009) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (64) NEXT
+       DO .11 <- .3
+       DO .1 <- .3
+       DO .2 <- #26
+       PLEASE DO (1010) NEXT
+       DO .1 <- '?"!3~.3'~#1"$#1'~#3
+       PLEASE DO (65) NEXT
+       DO (20) NEXT
+(64)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #25
+       DO (20) NEXT
+(65)   PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .11 <- #1
+       DO (20) NEXT
+(70)   PLEASE DO (60) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT POP HERE
+       DO (540) NEXT
+       PLEASE DO (20) NEXT
+(80)   PLEASE DO (70) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT REMAINDER HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       PLEASE DO (2530) NEXT
+       DO :1 <- :4
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(90)   PLEASE DO (80) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT INPUT INTEGER HERE
+       DO WRITE IN :1
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(100)  PLEASE DO (90) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT MULTIPLY HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       PLEASE DO (1549) NEXT
+       DO :1 <- :3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(110)  PLEASE DO (100) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT ADD HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       PLEASE DO (1509) NEXT
+       DO :1 <- :3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(120)  PLEASE DO (110) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT OUTPUT CHAR HERE
+       DO (540) NEXT
+       DO .1 <- :1~#255
+       DO (510) NEXT
+       PLEASE DO (20) NEXT
+(130)  PLEASE DO (120) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT SUBTRACT HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       PLEASE DO (1510) NEXT
+       DO :1 <- :3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(140)  PLEASE DO (130) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT OUTPUT INTEGER HERE
+       DO (540) NEXT
+       DO READ OUT :1
+       PLEASE DO (20) NEXT
+(150)  PLEASE DO (140) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT DIVIDE HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       PLEASE DO (1550) NEXT
+       DO :1 <- :3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(160)  PLEASE DO (150) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH ZERO HERE
+       DO :1 <- #0
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(170)  PLEASE DO (160) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH ONE HERE
+       DO :1 <- #1
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(180)  PLEASE DO (170) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH TWO HERE
+       DO :1 <- #2
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(190)  PLEASE DO (180) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH THREE HERE
+       DO :1 <- #3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(200)  PLEASE DO (190) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH FOUR HERE
+       DO :1 <- #4
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(210)  PLEASE DO (200) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH FIVE HERE
+       DO :1 <- #5
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(220)  PLEASE DO (210) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH SIX HERE
+       DO :1 <- #6
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(230)  PLEASE DO (220) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH SEVEN HERE
+       DO :1 <- #7
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(240)  PLEASE DO (230) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH EIGHT HERE
+       DO :1 <- #8
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(250)  PLEASE DO (240) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUSH NINE HERE
+       DO :1 <- #9
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(260)  PLEASE DO (250) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT DUPLICATE HERE
+       DO (540) NEXT
+       DO (530) NEXT
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(270)  PLEASE DO (260) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GO WEST HERE
+       DO .12 <- #65535
+       DO .13 <- #0
+       PLEASE DO (20) NEXT
+(280)  PLEASE DO (270) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GO EAST HERE
+       DO .12 <- #1
+       DO .13 <- #0
+       PLEASE DO (20) NEXT
+(290)  PLEASE DO (280) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GO AWAY HERE
+       DO 50% DO (291) NEXT
+       DO .13 <- #0
+       DO .12 <- #65535
+       DO 50% .12 <- .12~#1
+       PLEASE DO (20) NEXT
+(291)  DO .12 <- #0
+       DO .13 <- #65535
+       DO 50% .13 <- .13~#1
+       PLEASE DO (20) NEXT
+(300)  PLEASE DO (290) NEXT
+       PLEASE GIVE UP
+(310)  PLEASE DO (300) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT SWAP HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       DO :3 <- :1
+       DO :1 <- :2
+       DO (530) NEXT
+       DO :1 <- :3
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(320)  PLEASE DO (310) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GO NORTH HERE
+       DO .12 <- #0
+       DO .13 <- #65535
+       PLEASE DO (20) NEXT
+(330)  PLEASE DO (320) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT EAST-WEST IF HERE
+       DO .13 <- #0
+       DO (540) NEXT
+       DO .1 <- '?"':1~:1'~#1"$#1'~#3
+       DO (331) NEXT
+       DO .12 <- #65535
+       PLEASE DO (20) NEXT
+(331)  PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .12 <- #1
+       PLEASE DO (20) NEXT
+(340)  PLEASE DO (330) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GREATER THAN HERE
+       DO (540) NEXT
+       DO :2 <- :1
+       DO (540) NEXT
+       DO (1510) NEXT
+       DO :1 <- :3~'#32767$#65535'
+       DO :1 <- ':1~:1'~"'?":3~'#32768$#0'"$#1'~#1"
+       PLEASE DO (530) NEXT
+       PLEASE DO (20) NEXT
+(350)  PLEASE DO (340) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GET HERE
+       DO (540) NEXT
+       DO :4 <- :1
+       DO .1 <- '?":1~'#32768$#0'"$#1'~#1
+       DO :2 <- #25
+       PLEASE DO (1510) NEXT
+       DO (540) NEXT
+       DO .1 <- .1~"':3~"#32768$#0"'~"'?":1~'#32768$#0'"$#1'~#1""
+       DO :2 <- #80
+       PLEASE DO (1510) NEXT
+       DO .1 <- '?".1~':3~"#32768$#0"'"$#1'~#3
+       PLEASE DO (351) NEXT
+       DO .1 <- :4
+       PLEASE DO (1020) NEXT
+       DO .2 <- .1
+       DO .1 <- :1
+       PLEASE DO (1020) NEXT
+       DO :1 <- ;1SUB.1.2
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(351)  PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO :1 <- #32
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+(360)  PLEASE DO (350) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT PUT HERE
+       DO (540) NEXT
+       DO :4 <- :1
+       DO .1 <- '?":1~'#32768$#0'"$#1'~#1
+       DO :2 <- #25
+       PLEASE DO (1510) NEXT
+       DO (540) NEXT
+       DO .1 <- .1~"':3~"#32768$#0"'~"'?":1~'#32768$#0'"$#1'~#1""
+       DO :2 <- #80
+       PLEASE DO (1510) NEXT
+       DO .1 <- '?".1~':3~"#32768$#0"'"$#1'~#3
+       PLEASE DO (361) NEXT
+       DO .1 <- :4
+       PLEASE DO (1020) NEXT
+       DO .2 <- .1
+       DO .1 <- :1
+       PLEASE DO (1020) NEXT
+       DO (540) NEXT
+       DO ;1SUB.1.2 <- :1
+       PLEASE DO (20) NEXT
+(361)  PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO (540) NEXT
+       PLEASE DO (20) NEXT
+(370)  PLEASE DO (360) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT GO SOUTH HERE
+       DO .12 <- #0
+       DO .13 <- #1
+       PLEASE DO (20) NEXT
+(380)  PLEASE DO (370) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT NORTH-SOUTH IF HERE
+       DO .12 <- #0
+       DO (540) NEXT
+       DO .1 <- '?"':1~:1'~#1"$#1'~#3
+       DO (381) NEXT
+       DO .13 <- #65535
+       PLEASE DO (20) NEXT
+(381)  PLEASE DO (3) NEXT
+       DO FORGET #1
+       DO .13 <- #1
+       PLEASE DO (20) NEXT
+(390)  PLEASE DO (380) NEXT
+       DO FORGET #80
+       DON'T IMPLEMENT INPUT CHAR HERE
+       DO (500) NEXT
+       DO :1 <- .1
+       DO (530) NEXT
+       PLEASE DO (20) NEXT
+
+(500)  PLEASE STASH .2 + .3 + .4
+       PLEASE WRITE IN ,1
+       DO .1 <- ,1SUB#1
+       DO .2 <- .15
+       DO (1000) NEXT
+       DO .15 <- .3~#255
+       DO .1 <- .15
+       PLEASE RETRIEVE .2 + .3 + .4
+       PLEASE RESUME #1
+(510)  PLEASE STASH .1 + .2 + .3 + .4
+       DO .2 <- !1~#15'$!1~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .1 <- .16
+       DO (1010) NEXT
+       DO .16 <- .2
+       DO ,1SUB#1 <- .3
+       PLEASE READ OUT ,1
+       PLEASE RETRIEVE .1 + .2 + .3 + .4
+       PLEASE RESUME #1
+(520)  DON'T EXPECT THIS TO DO MUCH
+(530)  PLEASE STASH .1
+       DO .1 <- .14
+       PLEASE DO (1020) NEXT
+       DO .14 <- .1
+       DO ;2SUB.14 <- :1
+       PLEASE RETRIEVE .1
+       PLEASE RESUME #1
+(540)  PLEASE STASH .1 + .2 + .3
+       DO .1 <- '?"!14~.14'~#1"$#1'~#3
+       DO (541) NEXT
+       DO :1 <- ;2SUB.14
+       DO .1 <- .14
+       DO .2 <- #1
+       PLEASE DO (1010) NEXT
+       DO .14 <- .3
+       PLEASE RETRIEVE .1 + .2 + .3
+       PLEASE RESUME #1
+(541)  PLEASE DO (3) NEXT
+       DO :1 <- #0
+       PLEASE RETRIEVE .1 + .2 + .3
+       PLEASE RESUME #2
+
+PLEASE ACKNOWLEDGE 32BIT DIVISION WITH REMAINDER FROM NUMIO.I
+
+(2530) DO STASH :1 + :5 + .5
+       DO :3 <- #0
+       DO .5 <- '?"':2~:2'~#1"$#1'~#3
+       PLEASE DO (2531) NEXT
+       DO :4 <- #1
+       PLEASE DO (2533) NEXT
+(2533) DO FORGET #1
+       DO .5 <- '?":2~'#32768$#0'"$#2'~#3
+       DO (2532) NEXT
+       DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+          0'~'#32767$#1'"
+       PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767
+            $#0'"$#0'~'#32767$#1'"
+       DO (2533) NEXT
+(2532) DO (1001) NEXT
+(2536) PLEASE FORGET #1
+       DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"'
+            ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$
+            #65535'"'~'#0$#65535'"
+       DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535$
+            #65535"'~'#65535$#0'"$#32768'~'#0$#65535'"
+            $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"'
+            "$"':5~:5'~#1"'~#1"$#2'~#3
+       DO (2534) NEXT
+       DO :5 <- :3
+       DO (1510) NEXT
+       PLEASE DO :1 <- :3
+       DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"'
+            ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$
+            #65535'"'~'#0$#65535'"
+       DO (2535) NEXT
+(2534) PLEASE DO (1001) NEXT
+(2535) DO FORGET #1
+       DO .5 <- "?':4~#1'$#2"~#3
+       DO (2531) NEXT
+       DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'"
+       DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'"
+       PLEASE DO (2536) NEXT
+(2531) DO (1001) NEXT
+       DO :4 <- :1
+       PLEASE RETRIEVE :1 + :5 + .5
+       PLEASE RESUME #2
+
+PLEASE REMEMBER TO APPEND STANDARD LIBRARY
diff --git a/pit/lib/1910.doc b/pit/lib/1910.doc
new file mode 100644 (file)
index 0000000..e091fd4
--- /dev/null
@@ -0,0 +1,34 @@
+From ucbvax!bloom-beacon!eru!luth!sunic!lth.se!newsuser Thu May 17 19:51:02 PDT 1990
+
+Sorry, but I couldn't find the (1910)-routine so I wrote one, which
+will do it's job, IF the (1900)-routine is as the manual says ( you know
+it isn't ). At least I hope it works because the manual is not very clear
+about this routine.
+
+
+(1910) PLEASE STASH .3 + :3 + :1 + :2
+       DO :1 <- #32768
+       PLEASE .2 <- #1
+       PLEASE (1911) NEXT
+(1911) DO FORGET #1
+       DO STASH .1
+       DO (1900) NEXT
+       PLEASE :2 <- .1
+       DO RETRIEVE .1
+       DO (1500) NEXT
+       PLEASE DO :1 <- :3
+       DO (1010) NEXT
+       PLEASE .1 <- .3
+       DO (1912) NEXT
+       DO (1911) NEXT
+(1912) PLEASE (1913) NEXT
+       DO .2 <- :1~'#65280$#65280'
+       PLEASE RETRIEVE :2 + .3 + :1 + :3
+       DO RESUME #2
+(1914) PLEASE RESUME #1$"'.1~.1'~#1"
+(1913) PLEASE (1914) NEXT
+-- 
+----------
+Hans Olsson   Email: f88ho@efd.lth.se   
+              Snail: K[MN[RSV[GEN 8:118 
+                     222 45 Lund Sweden
diff --git a/pit/lib/floatlib.doc b/pit/lib/floatlib.doc
new file mode 100644 (file)
index 0000000..150097b
--- /dev/null
@@ -0,0 +1,249 @@
+* Summary of routines in floatlib.i:
+
+ (5000) :3 <- :1 plus :2
+ (5010) :3 <- :1 minus :2
+ (5020) :2 <- the integer part of :1
+        :3 <- the fractional part of :1
+ (5030) :3 <- :1 times :2
+ (5040) :3 <- :1 divided by :2
+ (5050) :3 <- :1 modulo :2
+
+ (5060) :2 <- :1 cast from a two's-complement integer into a
+              floating-point number
+ (5070) :2 <- :1 cast from a floating-point number into the nearest
+              two's-complement integer
+ (5080) :2 <- :1 cast from a floating-point number into a decimal
+              representation in scientific notation
+ (5090) :2 <- :1 cast from a decimal representation in scientific
+              notation into a floating-point number
+
+ (5100) :2 <- the square root of :1
+ (5110) :2 <- the natural logarithm of :1
+ (5120) :2 <- e to the power of :1 (the exponential function)
+ (5130) :3 <- :1 to the power of :2
+
+ (5200) :2 <- sin :1
+ (5210) :2 <- cos :1
+ (5220) :2 <- tan :1
+
+ (5400) :1 <- uniform random number between zero and one exclusive
+ (5410) :2 <- :1 times phi
+ (5419) :2 <- :1 divided by phi
+
+Note: All of the above routines except (5020), (5060), (5080), (5200),
+(5210), and (5400) also modify .5 as follows: .5 will contain #3 if
+the result overflowed or if the arguments were out of domain, #2 if
+the result underflowed, #1 otherwise. (See below.)
+
+* Description of floatlib.i:
+
+The INTERCAL floating-point library uses the IEEE format for 32-bit
+floating-point numbers, which uses bit 31 as a sign bit (1 being
+negative), bits 30 through 23 hold the exponent with a bias of 127,
+and bits 22 through 0 contain the fractional part of the mantissa with
+an implied leading 1. In mathematical notation:
+
+       N = (1.0 + fraction) * 2^(exponent - 127) * -1^sign
+
+Thus the range of floating-point magnitudes is, roughly, from
+5.877472*10^-39 up to 6.805647*10^38, positive and negative. Zero is
+specially defined as all bits 0. (Actually, to be precise, zero is
+defined as bits 30 through 0 as being 0. Bit 31 can be 1 to represent
+negative zero, which the library generally treats as equivalent to
+zero, though don't hold me to that.)
+
+Note that, contrary to the IEEE standard, exponents 0 and 255 are not
+given special treatment (besides the representation for zero). Thus
+there is no representation for infinity or not-a-numbers, and there is
+no gradual underflow capability. Conformance with widely-accepted
+standards was not considered to be a priority for an INTERCAL library.
+(The fact that the general format conforms to IEEE at all is due to
+sheer pragmatism.)
+
+Here, for easy reference, are some common values as they would be
+directly represented within an INTERCAL program:
+
+                      Zero: #0
+                       One: #30720$#28672
+                       Two: #0$#32768
+               One million: #9280$#40480
+                  One-half: #28672$#28672
+        Square root of two: #31757$#30509
+                         e: #1760$#33742
+                        Pi: #571$#35133
+
+However, a more human-accessible representation of floating-point
+numbers is made possible by the routines (5080) and (5090). For this
+representation, scientific notation is used with six digits of
+precision after the decimal point. The seven digits of the mantissa
+are suffixed with the two digits of the exponent. If the number is
+negative, a one is prefixed (in the billions' place), so there can be
+ten decimal digits in all. Finally, if the exponent is negative, fifty
+is added. As is the usually the case with scientific notation, the
+digit to the left of the decimal point must be nonzero except for the
+case of zero itself.
+
+The above may sound convoluted, but it is not nearly as confusing as
+it perhaps should be. As an example, if you wished to enter the value
+of the speed of light measured in centimeters per seconds squared, you
+would type TWO NINE NINE SEVEN NINE TWO FIVE ONE OH. The INTERCAL
+program would then call (5080) to transform this into the
+floating-point number 2.997925e+10. The same value printed out with
+                                         _____
+the help of (5090) would appear as ccxcixDCCXCMMDX. Similarly, the
+value -1.602189e-19 (the charge of an electron measured in Coulombs)
+would be represented respectively as ONE ONE SIX ZERO TWO ONE EIGHT
+                      _______
+NINE SIX NINE and mclxCCXVIIICMLXIX. Note that the negative sign on
+the exponent always translates to an L between the fraction and the
+exponent when output.
+
+The 16-bit variable .5 is used by the floating-point library as an
+error indicator. Upon return from most of the functions, .5 will
+normally be set to #1 if the return value is valid. If .5 is set to
+#2, this indicates that the result of the function underflowed (that
+is, the magnitude of the result is less than 2^-127). If .5 is set to
+#3, this indicates either that the result overflowed (magnitude
+greater than 2^128), or that the arguments to the function were
+illegal. The latter can occur for the following situations: division
+by zero (either via division or modulus), negative root (either via
+square root or a fractional power), and non-positive logarithm. Also,
+(5070) will set .5 to #3 if the magnitude of the argument is greater
+than 2^31, and (5080) will do likewise if given a bad number (e.g., if
+it is greater than two billion).
+
+It may be worth nothing that there are some cases in which an under-
+or overflow can be recovered from with tolerable grace. The sign and
+fraction bits of such a value will usually still be correct, and the
+exponent bits will just be the lower eight bits of the true exponent:
+that is, the true exponent plus or minus 256 as appropriate. If such a
+value is passed to another function as is, and the return value from
+that over- or underflows in the opposite direction, it is likely that
+the final result can be trusted. Of course, this depends entirely on
+the nature of the operations involved, and this paragraph should not
+be taken as advice to pursue such approaches in general, just as this
+document should not be taken as advice to make use of this library at
+all. Note also that in the case of (5110), the exponential function,
+and (5130), the power function, it is quite easy to request a
+massively under- and/or overflowed result. In these cases the
+functions in question exit early, and attempting to salvage something
+from such results, with the possible exception of the sign bit, is
+pretty much guaranteed to be fruitless.
+
+(5020) is the integral partition function (referred to as modf in the
+C library). Both return values are floating-point numbers, and both
+have the same sign as the argument, such that :2 + :3 = :1 while
+keeping the magnitude of :3 less than 1.
+
+(5060) and (5070) are the "type-casting" functions. They translate
+values to and from 32-bit two's-complement integers. (5070) truncates
+any fractional amounts from its argument, and will signal an error if
+the magnitude of the value requires more than 32 bits.
+
+The trigonometric functions (5200), (5210), and (5220) will return
+erroneous results when given very large arguments. At magnitudes
+around 8 million or so, the result is occasionally off by one bit.
+The errors get progressively worse, so that with magnitudes in the
+neighborhood of the quintillions and higher, the number is wholly
+inaccurate. However, at magnitudes around 8 million, there is already
+a difference of over 20pi between consecutive floating-point numbers,
+so it is hard to conceive of a purpose for which improved accuracy
+would be useful.
+
+In the descriptions for (5410) and (5419), phi refers to the golden
+ratio.
+
+* Internal routines in floatlib.i:
+
+A floating-point library involves a fair amount of mathematical
+functionality to begin with, something that INTERCAL is not generally
+mistaken for having. The floating-point library therefore has a number
+of internal functions to provide it with some 64-bit arithmetic, among
+other things. While these routines were designed specifically for
+internal use, and in many cases one would be hard-pressed to find
+other uses for them in their current form, it was felt that they were
+nonetheless worth documenting. Besides providing a guide for anyone so
+foolish as to examine the actual code, it provides a sort of "itemized
+bill" that helps to justify the inordinate size of the library.
+
+In the following list, the notation :1:2 simply indicates that two
+32-bit variables, in this example :1 and :2, are being used to hold a
+single 64-bit integer value. The notation :1:2.1, on the other hand,
+indicates a kind of double-precision floating-point value, a format
+that the library uses frequently when storing intermediate values. The
+two 32-bit variables hold the fraction bits, with no implied bits, and
+ideally with the highest 1 bit at bit 55. The 16-bit variable holds
+the exponent, but with a bias of 639 instead of 127. This is done so
+that underflows do not affect the sign, which is also stored in the
+16-bit variable in bit 10. These intermediate values are rounded (to
+even), truncated, and stored in a single 32-bit variable by the
+floating-point normalization function, (5600).
+
+Finally, note that the numbers in the tables accessed by routines
+(5690) through (5693) are generally tailored for the function that
+applies them, and all of them use slightly different representations
+for the values they encode.
+
+Here are brief descriptions of the internal routines:
+
+ (5500) :1:2 <- :1:2 plus :3:4
+        .5 <- #0 if no overflow, #1 otherwise
+ (5510) :1 <- :1 plus :6, where :6 has at most one 1 bit
+        :6 <- #0 on overflow, nonzero otherwise
+ (5519) :1 <- :1 minus :6, where :6 has at most one 1 bit
+        :6 <- #0 on underflow, nonzero otherwise
+ (5520) .1 <- .1 minus #1
+ (5530) :1:2:3:4 <- :1:2 times :3:4
+ (5540) :1 <- :1:2 divided by :3:4, with :1:2 aligned on bit 63, :3:4
+              aligned on bit 62, and the result aligned on bit 31
+        .1 <- the exponent of the quotient plus #126
+        .5 <- #1 if the result should be rounded up, #0 otherwise
+ (5550) :1:2.1 <- :1:2.1 modulo :3:4.2
+ (5560) :1:2 <- two's complement of :1:2
+ (5570) :1:2 <- :1:2 left-shifted logically so that bit 63 is 1
+        .1 <- .1 minus the no. of bits shifted out
+ (5580) :3:4 <- :3:4 shifted right arithmetically .3 bits
+ (5590) :1:2 <- :1:2 shifted so that bit 55 is the highest 1 bit
+        .1 <- .1 plus or minus the no. of bits shifted
+        .5 <- the bits right-shifted out of :1:2, if any
+ (5600) :1 <- the normalization of :1:2.1
+ (5610) :1:2.1 <- the natural logarithm of :1:2.1
+ (5620) :1:2.1 <- e to the power of :1:2.1
+ (5640) :1:2.1 <- :1:2.1 to the power of the two's-complement integer
+                  in :3
+ (5650) :1:2.1 <- :1 to the power of :2
+        .5 <- #1 if the power is not real, #2 otherwise
+ (5670) :1:2 <- an angle between -pi/2 and pi/2 that has the same
+                value for sine as :1, and stored in two's-complement,
+                fixed-point form, with the one's position at bit 62
+        .1 <- #1024 if the cosine of :1:2 will have the opposite sign
+              as the cosine of :1, #2048 otherwise
+ (5680) :1:2 <- the sine of :1:2 in two's-complement, fixed-point
+        :3:4 <- the cosine of :1:2
+ (5690) ;1 <- a table of 32 significant bits of the numbers 10^i,
+              where i ranges from 1 to 39
+        ,1 <- a table of exponents for the above powers of ten
+ (5691) ;1 <- a table of bit patterns representing ln(1 + 1/(2^i - 1)),
+               where i ranges from -1 to -26
+ (5692) ;1 <- a table of bit patterns representing -ln(1 + 2^i), where
+              i ranges from -1 to -32
+ (5693) ;1 <- a table of bit patterns representing arctan(2^i), where
+              i ranges from 0 to -30
+
+* Bibliography:
+
+Knuth, Donald E. "The Art of Computer Programming: Vol. 2
+(Seminumerical Algorithms)", 2nd edition. Addison-Wesley, 1981.
+    This book provided the essential background as well as algorithms
+    for the basic arithmetic operations. Mention should also be made
+    of Vol. 1, which provided an algorithm for the natural logarithm
+    as a side note.
+
+Koren, Israel. "Computer Arithmetic Algorithms". Prentice-Hall, 1993.
+    In addition to information on the IEEE standard, this book
+    provided the algorithms used for the exponential and trigonometric
+    functions.
+
+Plauger, P. J. "The Standard C Library". Prentice-Hall, 1992.
+    This book provided assistance in designing the modulus and power
+    functions, as well as other miscellaneous contributions.
diff --git a/pit/lib/floatlib.i b/pit/lib/floatlib.i
new file mode 100644 (file)
index 0000000..7eac197
--- /dev/null
@@ -0,0 +1,1993 @@
+       PLEASE USE A DESIGNATED ENTRY POINT
+
+(5000) PLEASE ABSTAIN FROM (5005)
+(5010) PLEASE STASH .1 + .2 + .3 + :1 + :2 + :4 + :6
+       DO :4 <- :1
+(5005) PLEASE DO :2 <- '"?':2~"#65535$#0"'$#32768"~"#0$#65535"'$
+               ':2~"#0$#65535"'
+       DO :6 <- '"?':1~"#32767$#0"'$':2~"#32767$#0"'"~"#0$#32767"'$
+               '"?':1~"#0$#65535"'$':2~"#0$#65535"'"~"#0$#65535"'
+       DO .5 <- '?"':2~:6'~'"?:6~:6"~"#32767$#65535"'"$#1'~#3
+       DO (5001) NEXT
+       DO :1 <- :2
+       DO :2 <- :4
+       DO :4 <- :1
+       DO (5002) NEXT
+(5001) DO (1001) NEXT
+(5002) PLEASE FORGET #1
+       DO .5 <- '?"':2~":2~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5006) NEXT
+       DO .5 <- '?"'?":1~'#32768$#0'"$":2~'#32768$#0'"'~#1"$#1'~#3
+       PLEASE DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO :1 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       DO .2 <- :2~'#30720$#61440'
+       DO :3 <- '"':2~"#2047$#0"'$#2048"~"#2047$#2048"'$':2~"#0$#4095"'
+       DO (5003) NEXT
+       DO :2 <- :1
+       DO :1 <- '"?':3~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':3~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :3 <- :1
+       DO :1 <- :2
+       DO (5004) NEXT
+(5003) DO (1001) NEXT
+(5004) PLEASE FORGET #1
+       DO .5 <- .1
+       DO .1 <- .1~#255
+       DO (1010) NEXT
+       DO .1 <- .5
+       PLEASE DO .5 <- .3~#65504
+       DO .5 <- '?"'V"!5~.5'~#1"$"'V.3~#6'~'".3~#16"~".3~#8"'"'~#1"$
+               #2'~#3
+       DO (5006) NEXT
+       DO :4 <- #0
+       DO (5580) NEXT
+       DO :2 <- :3
+       DO :6 <- :4
+       DO (1509) NEXT
+       DO :1 <- :3
+       DO :2 <- :6
+       PLEASE DO (5600) NEXT
+       DO :3 <- :1
+       DO (5007) NEXT
+(5006) DO (1001) NEXT
+       DO :3 <- :4
+(5007) PLEASE RETRIEVE .1 + .2 + .3 + :1 + :2 + :4 + :6
+       PLEASE REINSTATE (5005)
+       PLEASE RESUME #2
+
+(5020) PLEASE STASH .1 + .2 + .3 + .5 + :1
+       DO .1 <- #150
+       DO .2 <- :1~'#30720$#61440'
+       DO (1010) NEXT
+       DO .5 <- '?"!3~.3'~#1"$#1'~#3
+       DO (5022) NEXT
+       DO .5 <- '?".3~#32768"$#2'~#3
+       DO (5022) NEXT
+       DO :2 <- #0
+       DO :3 <- :1
+       PLEASE DO .5 <- '?"'V"'V"V.V3"'~#32"$".&3~#8"'~#1"$#2'~#3
+       DO (5021) NEXT
+       DO .1 <- .3
+       DO :2 <- #1
+       DO (5023) NEXT
+(5024) DO (1001) NEXT
+(5023) PLEASE FORGET #1
+       DO :2 <- :V2
+       DO (5520) NEXT
+       DO .5 <- '?"!1~.1'~#1"$#2'~#3
+       DO (5024) NEXT
+       PLEASE DO :2 <- :2~:&2
+       DO :2 <- '"&':1~"#65535$#0"'$':2~"#65535$#0"'"~"#0$#65535"'$
+               '"&':1~"#0$#65535"'$':2~"#0$#65535"'"~"#0$#65535"'
+       DO .5 <- '?"':2~:2'~#1"$#1'~#3
+       DO (5022) NEXT
+       DO :3 <- '"?':1~"#65535$#0"'$':2~"#65535$#0"'"~"#0$#65535"'$
+               '"?':1~"#0$#65535"'$':2~"#0$#65535"'"~"#0$#65535"'
+       PLEASE DO .1 <- '":1~'#65535$#0'"$"'#512$.2'~'#768$
+               #255'"'~'#32768$#1023'
+       DO :1 <- :2
+       DO :2 <- #0
+       DO (5590) NEXT
+       DO :2 <- :3
+       PLEASE DO :3 <- '"'"'"'".1$':1~#32768'"~"#1109$#1"'$
+               ':1~#128'"~#2735'$':1~"#546$#0"'"~"#43679"'$':1~"#1365$
+               #0"'"~"#1023$#63"'$'"'"'".1$#0"~#34959'$':1~"#0$
+               #1170"'"~#11007'$':1~"#0$#2925"'"~"#2005$#255"'
+       DO (5025) NEXT
+(5022) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :2 <- :1
+       DO :3 <- #0
+       DO (5025) NEXT
+(5021) DO (1001) NEXT
+(5025) PLEASE RETRIEVE .1 + .2 + .3 + .5 + :1
+       PLEASE RESUME #2
+
+(5030) DO :3 <- #0
+       DO .5 <- '?"'":1~':1~"#32767$#65535"'"~":2~':2~"#32767$
+               #65535"'"'~#1"$#1'~#3
+       DO (5041) NEXT
+       PLEASE STASH .1 + .2 + .3 + :1 + :2 + :4 + :5
+       PLEASE DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO :4 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       PLEASE DO .2 <- '"'":2~'#63488$#61440'"$#0'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO :5 <- '"':2~"#2047$#0"'$#2048"~"#2047$#2048"'$':2~"#0$#4095"'
+       DO (1000) NEXT
+       DO .1 <- .3~#2047
+       DO .2 <- #126
+       DO (1010) NEXT
+       PLEASE DO .1 <- '":4~'#3855$#3855'"$#0'~'#65280$#255'
+       DO .2 <- '":5~'#3855$#3855'"$#0'~'#65280$#255'
+       DO (1530) NEXT
+       DO :3 <- :1
+       DO .1 <- .1~#65280
+       DO .2 <- :5~#65535
+       DO (1530) NEXT
+       DO :2 <- :1
+       DO .1 <- :4~#65535
+       DO (1530) NEXT
+       DO .2 <- :5~'#3840$#3840'
+       DO :4 <- '"':3~"#65535$#0"'$':1~"#65280$#0"'"~"#65280$#255"'$
+               '"':3~"#0$#65535"'$':1~"#0$#65280"'"~"#65280$#255"'
+       DO :5 <- :1~#65535
+       DO (1530) NEXT
+       DO (1500) NEXT
+       DO :1 <- :3
+       DO :2 <- :4
+       DO (1500) NEXT
+       DO :1 <- :3~'#65520$#65520'
+       PLEASE DO :2 <- '"'&"V:3~#128"'$'":5~:5"~#1'"~"#32768$#32767"'$
+               '"'&"V:3~#64"'$':3~#63'"~"#32768$#32767"'
+       DO .1 <- .3
+       PLEASE DO (5600) NEXT
+       DO :3 <- :1
+       PLEASE RETRIEVE .1 + .2 + .3 + :1 + :2 + :4 + :5
+       PLEASE RESUME #1
+
+(5040) DO :3 <- #0
+       PLEASE DO .5 <- '?#1$"':2~":2~'#32767$#65535'"'~#1"'~#3
+       DO (5041) NEXT
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5041) NEXT
+       PLEASE STASH .1 + .2 + .3 + :1 + :2 + :4
+       PLEASE DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO .2 <- '"'":2~'#63488$#61440'"$#0'~'#511$#256'"$#0'~'#1023$
+               #256'
+       DO (1010) NEXT
+       DO :1 <- '"'"':1~"#2047$#1"'$#4096"~"#4094$#4099"'$#0"~"#16383$
+               #3"'$'"'"'"':1~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #1"'$#0"~"#16383$#3"'
+       PLEASE DO :3 <- '"'"':2~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #3"'$'"'"':2~"#2047$#1"'$#32768"~"#4094$#32771"'$
+               #0"~"#16383$#3"'
+       DO :2 <- #0
+       DO :4 <- #0
+       DO (5540) NEXT
+       DO .2 <- .3
+       DO (1000) NEXT
+       DO .1 <- .3
+       DO :2 <- '&"V:1~#64"'$'"':1~#63'$.5"~#2735'
+       DO :1 <- :1~'#65528$#65520'
+       PLEASE DO (5600) NEXT
+       DO :3 <- :1
+       PLEASE RETRIEVE .1 + .2 + .3 + :1 + :2 + :4
+       PLEASE RESUME #1
+(5041) DO (1001) NEXT
+       PLEASE RESUME #2
+
+(5050) DO :3 <- #0
+       PLEASE DO .5 <- '?#1$"':2~":2~'#32767$#65535'"'~#1"'~#3
+       DO (5051) NEXT
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5051) NEXT
+       PLEASE STASH .1 + .2 + .3 + :1 + :2 + :4
+       PLEASE DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO :1 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       DO .2 <- :2~'#30720$#61440'
+       DO :2 <- '"':2~"#2047$#0"'$#2048"~"#2047$#2048"'$':2~"#0$#4095"'
+       DO (5052) NEXT
+(5053) DO (1001) NEXT
+(5052) PLEASE FORGET #1
+       DO .5 <- '?.1$.2'~'#0$#255'
+       DO .5 <- '?"!2~.5'~'"?.5~.5"~#255'"$#2'~#3
+       DO (5054) NEXT
+       DO (1510) NEXT
+       DO .5 <- '?":3~'#32768$#0'"$#2'~#3
+       DO (5056) NEXT
+       DO :1 <- :3
+       DO (5055) NEXT
+(5056) DO (1001) NEXT
+(5055) PLEASE FORGET #1
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5057) NEXT
+       DO :2 <- :2~'#65535$#65534'
+       DO .5 <- '?"':2~:2'~#1"$#1'~#3
+       DO (5054) NEXT
+       DO .3 <- .1
+       DO .1 <- .2
+       DO (1020) NEXT
+       DO .2 <- .1
+       DO .1 <- .3
+       DO (5052) NEXT
+(5057) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5520) NEXT
+       DO (5052) NEXT
+(5054) DO (1001) NEXT
+       DO :2 <- #0
+       PLEASE DO (5600) NEXT
+       DO :3 <- :1
+       PLEASE RETRIEVE .1 + .2 + .3 + :1 + :2 + :4
+       PLEASE RESUME #2
+(5051) DO (1001) NEXT
+       PLEASE RESUME #2
+
+(5060) PLEASE STASH .1 + .5 + :1
+       DO :2 <- #0
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5061) NEXT
+       DO .1 <- #1686
+       DO (5560) NEXT
+       DO (5062) NEXT
+(5061) DO (1001) NEXT
+       DO .1 <- #662
+(5062) PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       PLEASE RETRIEVE .1 + .5 + :1
+       PLEASE RESUME #2
+
+(5070) PLEASE STASH .1 + .2 + .3 + :1 + :3 + :4 + :6
+       DO .1 <- #157
+       DO .2 <- :1~'#30720$#61440'
+       DO (1010) NEXT
+       DO .5 <- '?".3~#32768"$#2'~#3
+       DO (5071) NEXT
+       PLEASE DO :3 <- '"'"':1~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #3"'$'"'"':1~"#2047$#1"'$#32768"~"#4094$#32771"'$
+               #0"~"#16383$#3"'
+       DO (5580) NEXT
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5072) NEXT
+       DO :1 <- '"?':3~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':3~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :2 <- :1
+       DO (5073) NEXT
+(5071) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :6 <- :1~'#32768$#0'
+       DO :1 <- #32767$#65535
+       DO (5510) NEXT
+       DO :2 <- :1
+       PLEASE DO .5 <- #3
+       DO (5073) NEXT
+(5072) DO (1001) NEXT
+       DO :2 <- :3
+(5073) PLEASE RETRIEVE .1 + .2 + .3 + :1 + :3 + :4 + :6
+       PLEASE RESUME #2
+
+(5080) PLEASE STASH .1 + .2 + .3 + .4 + .5 + .6 + .7 + .8 + :1 + :3 +
+               :4 + :5 + :6 + ,1 + ;1
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5088) NEXT
+       PLEASE DO (5690) NEXT
+       DO :5 <- :1~'#32767$#65535'
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5081) NEXT
+       PLEASE DO .6 <- #65535
+       DO (5082) NEXT
+(5081) DO (1001) NEXT
+       PLEASE DO .6 <- #1
+(5082) PLEASE FORGET #1
+       DO .1 <- :5~'#30720$#61440'
+       DO .2 <- #65409
+       DO (1009) NEXT
+       DO .5 <- '?".3~#32768"$#1'~#3
+       DO (5083) NEXT
+       PLEASE DO .7 <- #65535
+       DO .1 <- '?.3$#65535'~'#0$#65535'
+       DO (1020) NEXT
+       DO (5084) NEXT
+(5083) DO (1001) NEXT
+       PLEASE DO .7 <- #1
+       DO .1 <- .3
+(5084) PLEASE FORGET #1
+       PLEASE DO .2 <- #39457
+       DO (1530) NEXT
+       DO .1 <- :1~'#65280$#65024'
+       DO .2 <- .7~#32768
+       DO (1000) NEXT
+       DO .8 <- .3
+       DO (5019) NEXT
+(5087) DO (1001) NEXT
+       DO .1 <- .8
+       DO .2 <- .7
+       DO (1009) NEXT
+       DO .8 <- .3
+(5019) PLEASE FORGET #1
+       DO :1 <- '"'"':5~"#2047$#1"'$#4096"~"#4094$#4099"'$#0"~"#16383$
+               #3"'$'"'"'"':5~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #1"'$#0"~"#16383$#3"'
+       DO :2 <- #0
+       DO .1 <- :5~'#30720$#61440'
+       DO .5 <- '?"!8~.8'~#1"$#1'~#3
+       DO (5018) NEXT
+       DO :3 <- ';1SUB.8'~'#65535$#65534'
+       DO :4 <- '&"V';1SUB.8'~#1"'$#0
+       DO .2 <- ,1SUB.8
+       DO .5 <- '?".7~#32768"$#1'~#3
+       DO (5085) NEXT
+       DO (1020) NEXT
+       DO (1009) NEXT
+       PLEASE DO (5530) NEXT
+       DO (5086) NEXT
+(5085) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO (1010) NEXT
+       PLEASE DO (5540) NEXT
+       DO :2 <- '&"V:1~#1"'
+       DO :1 <- :1~'#65535$#65534'
+       DO .2 <- .3
+       DO (1009) NEXT
+       DO .1 <- .3
+       DO .2 <- #65410
+       DO (1009) NEXT
+       DO (5086) NEXT
+(5018) DO (1001) NEXT
+       DO :2 <- '&"V:1~#1"'
+       DO :1 <- :1~'#65535$#65534'
+       DO .3 <- .1
+(5086) PLEASE FORGET #1
+       DO :3 <- :1
+       DO :4 <- :2
+       DO .1 <- #157
+       DO .2 <- .3
+       DO (1010) NEXT
+       DO (5580) NEXT
+       PLEASE DO .5 <- '?"'V":3~#16"$"&':3~#8'$':V3~#2'"'~#1"$#2'~#3
+       DO (5087) NEXT
+       DO :1 <- :3
+       DO :2 <- :4
+       DO :3 <- #0
+       PLEASE DO :4 <- #784$#904
+       DO (5530) NEXT
+       DO :1 <- :3
+       DO :6 <- :4~'#32768$#0'
+       DO (5510) NEXT
+       DO :2 <- #100
+       DO (1540) NEXT
+       DO .1 <- .8
+       PLEASE DO .2 <- #50~.7
+       DO (1000) NEXT
+       DO :1 <- :3
+       DO :2 <- .3
+       DO (1500) NEXT
+       DO :1 <- :3
+       PLEASE DO :2 <- '#31664$#21632'~!6$.6'
+       DO (1500) NEXT
+       DO :2 <- :3
+       DO (5089) NEXT
+(5088) DO (1001) NEXT
+       DO :2 <- #0
+(5089) PLEASE FORGET #1
+       PLEASE RETRIEVE .1 + .2 + .3 + .4 + .5 + .6 + .7 + .8 + :1 +
+               :3 + :4 + :5 + :6 + ,1 + ;1
+       PLEASE RESUME #1
+
+(5090) PLEASE DO :2 <- '"?':1~"#65535$#0"'$#21660"~"#0$#65535"'$
+               '"?':1~"#0$#65535"'$#63326"~"#0$#65535"'
+       PLEASE DO .5 <- #1$"#3~'"'":1~:2"~"'?:2~:2'~'#32767$
+               #65535'"'~#1"$"'":1~'#32768$#0'"~"':2~:2'~'#32768$
+               #0'"'~#1"'"
+       DO :2 <- #0
+       DO (5091) NEXT
+       PLEASE STASH .1 + .2 + .3 + .4 + .6 + .7 + .8 + :1 + :3 + :4 +
+               :5 + :6 + :7 + :8 + :9 + ,1 + ;1
+       PLEASE DO (5690) NEXT
+       PLEASE DO :2 <- #33872$#43872
+       DO (1509) NEXT
+       DO .5 <- :4
+       DO (5091) NEXT
+       DO :1 <- :3
+       DO .7 <- #65535
+       DO (5092) NEXT
+(5091) DO (1001) NEXT
+       DO .7 <- #1
+(5092) PLEASE FORGET #1
+       DO :6 <- #0
+       DO :7 <- #0
+       PLEASE DO :5 <- #38368$#10099
+       PLEASE DO :4 <- #63085$#14998
+       PLEASE DO :8 <- #20480$#16384
+       DO :9 <- :1
+       DO (5093) NEXT
+(5094) DO (1001) NEXT
+(5093) PLEASE FORGET #1
+       DO :1 <- :9
+       DO :2 <- :8
+       DO (1510) NEXT
+       DO .5 <- '?":3~'#32768$#0'"$#2'~#3
+       DO (5095) NEXT
+       DO :9 <- :3
+       DO :1 <- :6
+       DO :2 <- :7
+       DO :3 <- :5
+       DO (5500) NEXT
+       DO :6 <- :1
+       DO :7 <- :2
+       DO (5096) NEXT
+(5095) DO (1001) NEXT
+(5096) PLEASE FORGET #1
+       DO :4 <- '"'V:5~#1'$':4~"#0$#65534"'"~"#32768$#32767"'$
+               ':4~"#65535$#0"'
+       DO :5 <- :5~'#65535$#65534'
+       DO :8 <- :8~'#65535$#65534'
+       DO .5 <- '?":8~#2"$#1'~#3
+       DO (5094) NEXT
+       DO :1 <- :6
+       DO :2 <- :7
+       DO .1 <- :9
+       PLEASE DO .5 <- '?"'V".1~#64"$".&1~#16"'~#1"$#1'~#3
+       DO (5097) NEXT
+       DO .8 <- #65535
+       DO .2 <- #65486
+       DO (1009) NEXT
+       DO .1 <- .3
+       DO (5098) NEXT
+(5097) DO (1001) NEXT
+       DO .8 <- #1
+(5098) PLEASE FORGET #1
+       DO .5 <- '?.1$#38'~'#0$#65535'
+       DO .5 <- '?"'.1~.5'~'"?.5~.5"~#32767'"$#2'~#3
+       DO (5015) NEXT
+       DO .5 <- '?"!1~.1'~#1"$#1'~#3
+       DO (5014) NEXT
+       DO .2 <- ,1SUB.1
+       DO .5 <- '?".8~#32768"$#1'~#3
+       DO (5017) NEXT
+       DO :3 <- ';1SUB.1'~'#65535$#65534'
+       DO :4 <- '&"V';1SUB.1'~#1"'$#0
+       DO (5540) NEXT
+       PLEASE DO :2 <- .V5$#0
+       DO (1010) NEXT
+       DO .1 <- .3
+       DO .2 <- #508
+       DO (1000) NEXT
+       DO (5016) NEXT
+(5017) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :3 <- ;1SUB.1
+       DO :4 <- #0
+       DO (5530) NEXT
+       DO .1 <- #635
+       DO (1000) NEXT
+       DO (5016) NEXT
+(5014) DO (1001) NEXT
+       DO .3 <- #634
+(5016) PLEASE FORGET #1
+       DO .1 <- !7$.3'~'#1024$#1023'
+       PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       DO (5099) NEXT
+(5015) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :2 <- #0
+       PLEASE DO .5 <- #1$'"?!8~#32768'$#1"~#1'
+       DO (5099) NEXT
+(5099) PLEASE RETRIEVE .1 + .2 + .3 + .4 + .6 + .7 + .8 + :1 + :3 +
+               :4 + :5 + :6 + :7 + :8 + :9 + ,1 + ;1
+       PLEASE RESUME #2
+
+(5100) DO :2 <- #0
+       PLEASE DO .5 <- #1$':1~"#32768$#0"'
+       DO (5107) NEXT
+       DO .5 <- '?"':1~:1'~#1"$#1'~#3
+       DO (5107) NEXT
+       PLEASE STASH .1 + .2 + .3 + :1 + :3 + :4 + :6
+       DO .1 <- :1~'#30720$#61440'
+       DO :1 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       DO .2 <- #897
+       DO (1000) NEXT
+       DO .5 <- '?".3~#1"$#1'~#3
+       DO (5101) NEXT
+       DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5102) NEXT
+(5101) DO (1001) NEXT
+(5102) PLEASE FORGET #1
+       DO .1 <- .3~#65534
+       DO :6 <- :1
+       DO :4 <- #0
+       DO :1 <- #0
+       DO .2 <- #4096
+       DO (5104) NEXT
+(5103) DO (1001) NEXT
+(5104) PLEASE FORGET #1
+       DO :1 <- '"':1~"#32767$#0"'$':6~"#0$.2"'"~"#32767$#1"'$
+               '"':1~"#0$#32767"'$':6~"'.2~#65534'$#0"'"~"#32767$#1"'
+       DO :2 <- '"':4~"#32767$#0"'$#0"~"#32767$#1"'$'"':4~"#0$
+               #32767"'$#1"~"#32767$#1"'
+       PLEASE DO (1510) NEXT
+       DO .5 <- '?":3~'#32768$#0'"$#1'~#3
+       DO (5105) NEXT
+       DO :3 <- :1
+       DO (5106) NEXT
+(5105) DO (1001) NEXT
+(5106) PLEASE FORGET #1
+       DO :1 <- :3
+       DO :4 <- ':4~"#0$#65535"'$'"':4~"#32767$#0"'$.5"~"#32767$#1"'
+       DO .2 <- .2~#65534
+       DO (1020) NEXT
+       PLEASE DO .5 <- '?":4~'#0$#4096'"$#1'~#3
+       DO (5103) NEXT
+       DO .2 <- #102
+       DO (1000) NEXT
+       DO :1 <- :4
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :2 <- :1~'#65535$#65534'
+       PLEASE DO :2 <- '"'"'"'".3$':2~#32768'"~"#1109$#1"'$
+               ':2~#128'"~#2735'$':2~"#546$#0"'"~"#43679"'$':2~"#1365$
+               #0"'"~"#1023$#63"'$'"'"'".3$#0"~#34959'$':2~"#0$
+               #1170"'"~#11007'$':2~"#0$#2925"'"~"#2005$#255"'
+       DO .5 <- #1
+       PLEASE RETRIEVE .1 + .2 + .3 + :1 + :3 + :4 + :6
+       PLEASE RESUME #1
+(5107) DO (1001) NEXT
+       PLEASE RESUME #2
+
+(5110) DO :2 <- #32678$#0
+       PLEASE DO .5 <- '?"?'?"':1~:1'~#1"$"#1$'":1~'#32768$
+               #0'"~#1'"'"'~#5
+       DO (5121) NEXT
+       PLEASE STASH .1 + :1
+       DO .1 <- :1~'#30720$#61440'
+       DO :1 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       DO :2 <- #0
+       DO (5610) NEXT
+       PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       PLEASE RETRIEVE .1 + :1
+       DO RESUME #1    
+
+(5120) PLEASE STASH .1 + .4 + :1
+       DO :2 <- #30720$#28672
+       DO .4 <- #1
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5121) NEXT
+       DO .1 <- :1~'#30720$#61440'
+       DO .5 <- '?.1$#100'~'#0$#65535'
+       DO .5 <- '?"!1~.5'~'"?.5~.5"~#32767'"$#1'~#3
+       DO (5121) NEXT
+       DO :2 <- #0
+       DO .4 <- #1$'"?':1~"#32768$#0"'$#1"~#1'
+       DO .5 <- '?.1$#133'~'#0$#65535'
+       DO .5 <- '?"!1~.5'~'"?.5~.5"~#32767'"$#2'~#3
+       DO (5121) NEXT
+       PLEASE DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       PLEASE DO :1 <- '"'"':1~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #3"'$'"'"':1~"#2047$#1"'$#32768"~"#4094$#32771"'$
+               #0"~"#16383$#3"'
+       DO :2 <- #0
+       DO (5620) NEXT
+       PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       DO (5122) NEXT
+(5121) DO (1001) NEXT
+       DO .5 <- .4
+(5122) PLEASE RETRIEVE .1 + .4 + :1
+       PLEASE RESUME #2
+
+(5130) PLEASE STASH .3 + :1 + :2
+       DO :3 <- #0
+       DO .3 <- #1$'"?'":2~':2~"#32767$#65535"'"~#1'$#1"~#1'
+       DO .5 <- '?"':1~":1~'#32767$#65535'"'~#1"$#1'~#3
+       DO (5131) NEXT
+       DO :3 <- #30720$#28672
+       DO .5 <- '?".3~#1"$#2'~#3
+       DO .3 <- #1
+       DO (5131) NEXT
+       PLEASE DO .5 <- '?"&'?"'#127~":1~'#30720$#28672'"'~#64"$
+               "'"#4095$#8191"~":1~'#34815$#36863'"'~#1"'~#3"$#2'~#3
+       DO (5131) NEXT
+       DO (5650) NEXT
+       DO :3 <- #0
+       DO .3 <- #3
+       DO (5131) NEXT
+       PLEASE DO (5600) NEXT
+       DO :3 <- :1
+       DO (5132) NEXT
+(5131) DO (1001) NEXT
+       DO .5 <- .3
+(5132) PLEASE RETRIEVE .3 + :1 + :2
+       PLEASE RESUME #2
+
+(5200) PLEASE STASH .1 + :1 + :3 + :4
+       DO (5670) NEXT
+       DO (5680) NEXT
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5201) NEXT
+       DO (5560) NEXT
+       DO .1 <- #1656
+       DO (5202) NEXT
+(5201) DO (1001) NEXT
+       DO .1 <- #632
+(5202) PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       PLEASE RETRIEVE .1 + :1 + :3 + :4
+       PLEASE RESUME #2
+
+(5210) PLEASE STASH .1 + :1 + :3 + :4
+       DO (5670) NEXT
+       DO (5680) NEXT
+       DO :1 <- :3
+       DO :2 <- :4
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5211) NEXT
+       DO (5560) NEXT
+       DO .1 <- !1$#632'~'#2048$#1023'
+       DO (5212) NEXT
+(5211) DO (1001) NEXT
+       DO .1 <- !1$#632'~'#1024$#1023'
+(5212) PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       PLEASE RETRIEVE .1 + :1 + :3 + :4
+       PLEASE RESUME #2
+
+(5220) PLEASE STASH .1 + .2 + .3 + :1 + :3 + :4
+       DO (5670) NEXT
+       DO (5680) NEXT
+       DO .2 <- #3
+       DO .5 <- '?"'V"':3~:3'~#1"$"':4~:4'~#1"'~#1"$#1'~#3
+       DO (5225) NEXT
+       DO .2 <- #1
+       DO .5 <- '?"'V"':1~:1'~#1"$"':2~:2'~#1"'~#1"$#1'~#3
+       DO (5225) NEXT
+       DO .2 <- .1
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5221) NEXT
+       DO (5560) NEXT
+       DO .1 <- #1536
+       DO (5222) NEXT
+(5221) DO (1001) NEXT
+       DO .1 <- #512
+(5222) DO (5570) NEXT
+       PLEASE STASH .1 + :1 + :2
+       DO :1 <- :3
+       DO :2 <- :4
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5223) NEXT
+       DO (5560) NEXT
+       DO .1 <- .2~#3071
+       DO (5224) NEXT
+(5223) DO (1001) NEXT
+       DO .1 <- .2~#2047
+(5224) PLEASE FORGET #2
+       DO (5570) NEXT
+       DO :3 <- :1~'#65535$#65534'
+       PLEASE DO :4 <- '"'V:1~#1'$':2~"#0$#65534"'"~"#32768$#32767"'$
+               ':2~"#65535$#0"'
+       DO .2 <- .1
+       PLEASE RETRIEVE .1 + :1 + :2
+       DO (1010) NEXT
+       DO .2 <- .3
+       DO (5540) NEXT
+       PLEASE DO :2 <- '&"V:1~#64"'$'"':1~#63'$.5"~#2735'
+       DO :1 <- :1~'#65528$#65520'
+       DO (1009) NEXT
+       DO .1 <- .3~#2047
+       PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       DO (5226) NEXT
+(5225) DO (1001) NEXT
+       PLEASE DO :2 <- '&"V'?"!1~#3072'~'"?':3~"#32768$#0"'$#1"~#3'"$
+               ":1~'#32768$#0'"'~#1"'$#0
+       DO .5 <- .2
+(5226) PLEASE RETRIEVE .1 + .2 + .3 + :1 + :3 + :4
+       PLEASE RESUME #2
+
+(5400) PLEASE STASH .5 + :2 + :6
+       DO :2 <- #0$#2048
+       DO :1 <- #28672$#28672
+       DO (5401) NEXT
+(5403) DO (1001) NEXT
+(5401) PLEASE FORGET #1
+       DO %50 (5402) NEXT
+       DO :6 <- #2048$#0
+       PLEASE DO (5519) NEXT
+       DO .5 <- '?"':1~:1'~#1"$#2'~#3
+       DO (5403) NEXT
+       DO (5402) NEXT
+(5404) DO (1001) NEXT
+(5402) PLEASE FORGET #1
+       DO %50 :1 <- '"V':1~"#65535$#0"'$':2~"#65535$#0"'"~"#0$#65535"'$
+               '"V':1~"#0$#65535"'$':2~"#0$#65535"'"~"#0$#65535"'
+       DO :2 <- :2~'#65535$#65534'
+       DO .5 <- '?":2~:2"$#2'~#3
+       DO (5404) NEXT
+       PLEASE RETRIEVE .5 + :2 + :6
+       PLEASE RESUME #1
+
+(5419) PLEASE ABSTAIN FROM (5411)      
+(5410) DO STASH .1 + :1 + :3 + :4
+       DO .1 <- '"'":1~'#63488$#61440'"$#256'~'#511$#256'"$#0'~'#1023$
+               #256'
+       DO :1 <- '"':1~"#2047$#0"'$#2048"~"#2047$#2048"'$':1~"#0$#4095"'
+       DO :2 <- #0
+       PLEASE DO :3 <- #46058$#46446
+       PLEASE DO :4 <- #64627$#29537
+(5411) DO :3 <- :3~'#32767$#65535'
+       DO (5530) NEXT
+       DO (1020) NEXT
+       PLEASE DO (5600) NEXT
+       DO :2 <- :1
+       PLEASE REINSTATE (5411)
+       DO RETRIEVE .1 + :1 + :3 + :4
+       DO RESUME #1
+
+(5500) PLEASE STASH :1 + :3 + :4 + :5 + :6
+       DO :1 <- :4
+       DO (1509) NEXT
+       DO :5 <- :3
+       PLEASE RETRIEVE :1 + :3
+       DO :2 <- :3
+       DO .5 <- :4
+       DO (5501) NEXT
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO .5 <- '?"':1~:1'~#1"$#2'~#3
+       DO (5501) NEXT
+       PLEASE DO :4 <- #1
+       DO (5502) NEXT
+(5501) DO (1001) NEXT
+       DO (1509) NEXT
+(5502) DO :1 <- :3
+       DO :3 <- :2
+       DO :2 <- :5
+       DO .5 <- :4
+       PLEASE RETRIEVE :4 + :5 + :6
+       PLEASE RESUME #2
+
+(5510) PLEASE ABSTAIN FROM (5513)
+(5519) DO STASH .5
+       DO (5511) NEXT
+(5511) PLEASE FORGET #1
+       DO .5 <- '?":1~:6"$#1'~#3
+       DO :1 <- '"?':1~"#65535$#0"'$':6~"#65535$#0"'"~"#0$#65535"'$
+               '"?':1~"#0$#65535"'$':6~"#0$#65535"'"~"#0$#65535"'
+(5513) DO .5 <- '?":1~:6"$#1'~#3
+       DO (5512) NEXT
+       DO :6 <- ':6~"#0$#65535"'$'"':6~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5511) NEXT
+(5512) DO (1001) NEXT
+       DO RETRIEVE .5
+       PLEASE REINSTATE (5513)
+       PLEASE RESUME #2
+
+(5520) PLEASE STASH .2 + .5
+       DO .2 <- #1
+       DO (5521) NEXT
+(5521) PLEASE FORGET #1
+       DO .1 <- '?.1$.2'~'#0$#65535'
+       DO .5 <- '?".1~.2"$#1'~#3
+       DO (5522) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       DO (5521) NEXT
+(5522) DO (1001) NEXT
+       PLEASE RETRIEVE .2 + .5
+       PLEASE RESUME #2
+
+(5530) PLEASE STASH .1 + .5 + :6 + :7 + :8 + :9 + :10 + :11 + :12 +
+               :13 + :14
+       DO .1 <- #0
+       DO :6 <- #0
+       PLEASE DO :7 <- :1
+       DO :8 <- :2
+       DO :9 <- :3
+       DO :10 <- :4
+       PLEASE DO :11 <- #0
+       DO :12 <- #0
+       DO :13 <- #0
+       DO :14 <- #0
+       DO (5534) NEXT
+(5533) DO (1001) NEXT
+(5534) PLEASE FORGET #1
+       DO .5 <- '?":10~#1"$#1'~#3
+       DO (5536) NEXT
+       PLEASE DO :1 <- :13
+       DO :2 <- :14
+       DO :3 <- :7
+       DO :4 <- :8
+       DO (5500) NEXT
+       PLEASE DO (5532) NEXT
+       DO (1020) NEXT
+       DO (5531) NEXT
+(5532) DO (1001) NEXT
+(5531) PLEASE FORGET #1
+       DO :13 <- :1
+       DO :14 <- :2
+       PLEASE DO :1 <- :11
+       DO :2 <- :12
+       DO :3 <- #0
+       DO :4 <- :6
+       DO (5500) NEXT
+       DO :11 <- :1
+       DO :12 <- :2
+       DO (5537) NEXT
+(5536) DO (1001) NEXT
+(5537) PLEASE FORGET #1
+       DO .5 <- '?":9~#1"$#1'~#3
+       DO (5538) NEXT
+       DO :1 <- :12
+       DO :2 <- :13
+       DO :3 <- :7
+       DO :4 <- :8
+       DO (5500) NEXT
+       DO :12 <- :1
+       DO :13 <- :2
+       PLEASE DO :1 <- :11
+       DO :2 <- :6
+       DO :6 <- .5~#2
+       DO (5510) NEXT
+       DO (1500) NEXT
+       DO :11 <- :3
+       DO :6 <- :2
+       DO (5539) NEXT
+(5538) DO (1001) NEXT
+(5539) PLEASE FORGET #1
+       DO :6 <- ':6~"#0$#65535"'$'"':6~"#32767$#0"'$':7~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :7 <- ':7~"#0$#65535"'$'"':7~"#32767$#0"'$':8~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :8 <- ':8~"#0$#65535"'$'"':8~"#32767$#0"'$#0"~"#32767$#1"'
+       PLEASE DO :9 <- :9~'#65535$#65534'
+       DO :10 <- :10~'#65535$#65534'
+       DO .5 <- '?"'V"':9~:9'~#1"$"':10~:10'~#1"'~#1"$#2'~#3
+       DO (5533) NEXT
+       PLEASE DO :1 <- :11
+       DO :2 <- :12
+       DO :3 <- #0
+       DO :4 <- .1
+       DO (5500) NEXT
+       DO :3 <- :13
+       DO :4 <- :14
+       PLEASE RETRIEVE .1 + .5 + :6 + :7 + :8 + :9 + :10 + :11 + :12 +
+                :13 + :14
+       PLEASE RESUME #1
+
+(5540) PLEASE STASH :2 + :3 + :4 + :5 + :6
+       DO :5 <- :1
+       DO :6 <- :2
+       PLEASE DO :1 <- :3
+       DO :2 <- :4
+       DO (5560) NEXT
+       DO :3 <- :1
+       DO :4 <- :2
+       DO :2 <- :6
+       DO :6 <- #0
+       DO .1 <- #156
+       DO (5543) NEXT
+(5543) PLEASE FORGET #1
+       DO .5 <- '?":6~'#0$#32768'"$#2'~#3
+       DO (5544) NEXT
+       DO .5 <- '?":5~'#32768$#0'"$#1'~#3
+       DO (5545) NEXT
+       DO :1 <- :5
+       DO (5500) NEXT
+       DO :5 <- :1
+       DO :1 <- :6
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :6 <- :1
+       DO (5543) NEXT
+(5545) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO :5 <- ':5~"#0$#65535"'$'"':5~"#32767$#0"'$':2~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :2 <- ':2~"#0$#65535"'$'"':2~"#32767$#0"'$#0"~"#32767$#1"'
+       DO :6 <- ':6~"#0$#65535"'$'"':6~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5520) NEXT
+       DO (5543) NEXT
+(5544) DO (1001) NEXT
+(5546) PLEASE FORGET #1
+       PLEASE DO .5 <- '?"'V"':5~:5'~#1"$"':2~:2'~#1"'~#1"$#1'~#3
+       DO (5541) NEXT
+       DO :1 <- :5
+       DO (5500) NEXT
+       DO :5 <- :1
+       PLEASE DO :1 <- :6
+       DO (5547) NEXT
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :6 <- :1
+       DO (5546) NEXT
+(5541) DO (1001) NEXT
+       PLEASE DO .5 <- #0
+       DO (5549) NEXT
+(5547) DO (1001) NEXT
+       DO :6 <- '"?':5~"#32767$#0"'$':3~"#0$#65534"'"~"#0$#32767"'$
+               '"?':5~"#0$#65535"'$':3~"#65535$#0"'"~"#0$#65535"'
+       DO .5 <- '?"':6~:6'~#1"$#1'~#3
+       DO (5548) NEXT
+       DO .5 <- '":5~:6"~"'?:6~:6'~'#32767$#65535'"'$#1
+       DO (5549) NEXT
+(5548) DO (1001) NEXT
+       PLEASE DO :4 <- '"'V:3~#1'$':4~"#0$#65534"'"~"#32768$#32767"'$
+               ':4~"#65535$#0"'
+       DO :6 <- '"?':2~"#65535$#0"'$':4~"#65535$#0"'"~"#0$#65535"'$
+               '"?':2~"#0$#65535"'$':4~"#0$#65535"'"~"#0$#65535"'
+       DO .5 <- '?"':6~:6'~#1"$#1'~#3
+       PLEASE DO .5 <- '"V'#3~"'"':2~:6'~'"?:6~:6"~"#32767$
+               #65535"'"~#1'$'"':2~"#32768$#0"'~'":6~:6"~"#32768$
+               #0"'"~#1'"'$!5~#1'"~#1'$!5~#2'
+(5549) PLEASE RETRIEVE :2 + :3 + :4 + :5 + :6
+       PLEASE RESUME #3
+
+(5550) PLEASE STASH .5 + :1 + :2 + :3 + :4 + :5 + :6 + :7
+       DO :5 <- :3
+       DO :6 <- :4
+       PLEASE DO :1 <- :3
+       DO :2 <- :4
+       DO (5560) NEXT
+       DO :3 <- :1
+       DO :4 <- :2
+       PLEASE RETRIEVE :1 + :2
+       DO (1020) NEXT
+       DO (5551) NEXT
+(5554) DO (1001) NEXT
+(5552) PLEASE FORGET #1
+       DO :7 <- '"?':5~"#65535$#0"'$':1~"#65535$#0"'"~"#0$#65535"'$
+               '"?':5~"#0$#65535"'$':1~"#0$#65535"'"~"#0$#65535"'
+       DO .5 <- '?"':7~:7'~#1"$#2'~#3
+       DO (5558) NEXT
+       DO :7 <- '"?':6~"#65535$#0"'$':2~"#65535$#0"'"~"#0$#65535"'$
+               '"?':6~"#0$#65535"'$':2~"#0$#65535"'"~"#0$#65535"'
+       DO .5 <- '?"#3~'"'":6~:7"~"'?:7~:7'~'#32767$#65535'"'~#1"$
+               "'":7~'#32768$#0'"~"':7~:7'~'#32768$#0'"'~#1"'"$#2'~#3
+       DO (5559) NEXT
+(5558) DO (1001) NEXT
+       DO .5 <- '?"#3~'"'":5~:7"~"'?:7~:7'~'#32767$#65535'"'~#1"$
+               "'":7~'#32768$#0'"~"':7~:7'~'#32768$#0'"'~#1"'"$#2'~#3
+(5559) PLEASE FORGET #1
+       DO (5555) NEXT
+       DO (5500) NEXT
+       DO (5552) NEXT
+(5555) DO (1001) NEXT
+(5557) PLEASE FORGET #1
+       DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$':2~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :2 <- ':2~"#0$#65535"'$'"':2~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5520) NEXT
+(5551) DO .5 <- '?"'#65535~"'?.1$.2'~#21845"'~#1"$#2'~#3
+       DO (5554) NEXT
+       PLEASE RETRIEVE .5 + :3 + :4 + :5 + :6 + :7
+       PLEASE RESUME #2
+
+(5560) PLEASE STASH .5 + :3 + :6
+       DO .5 <- '?"':2~:2'~#1"$#1'~#3
+       DO :6 <- #1
+       DO (5561) NEXT
+       DO :3 <- '"?':1~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':1~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO :1 <- '"?':2~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':2~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO (5510) NEXT
+       DO :2 <- :1
+       DO :1 <- :3
+       DO (5562) NEXT
+(5561) DO (1001) NEXT
+       DO :1 <- '"?':1~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':1~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO (5510) NEXT
+(5562) PLEASE RETRIEVE .5 + :3 + :6
+       PLEASE RESUME #2
+
+(5570) DO .5 <- '?"'V"':1~:1'~#1"$"':2~:2'~#1"'~#1"$#2'~#3
+       DO (1001) NEXT
+       DO (5571) NEXT
+(5572) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$
+               ':2~"#32768$#0"'"~"#32767$#1"'
+       DO :2 <- ':2~"#0$#65535"'$'"':2~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5520) NEXT
+(5571) DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5572) NEXT
+       DO .5 <- #1
+       PLEASE RESUME #2
+
+(5580) PLEASE STASH .1 + .5
+       DO .1 <- .3
+       DO (5581) NEXT
+(5581) PLEASE FORGET #1
+       DO .5 <- '?"!1~.1'~#1"$#1'~#3
+       DO (5582) NEXT
+       DO :4 <- '"'V:3~#1'$':4~"#0$#65534"'"~"#32768$#32767"'$
+               ':4~"#65535$#0"'
+       DO :3 <- '"':3~"#65535$#0"'$':3~"#0$#65534"'"~"#32768$#32767"'$
+               ':3~"#65535$#0"'
+       DO (5520) NEXT
+       DO (5581) NEXT
+(5582) DO (1001) NEXT
+       PLEASE RETRIEVE .1 + .5
+       PLEASE RESUME #2
+
+(5590) PLEASE STASH .2
+       DO .2 <- #0
+       DO .5 <- '?"'#255~":1~'#61440$#61440'"'~#1"$#2'~#3
+       DO (5593) NEXT
+       DO (5591) NEXT
+(5591) PLEASE FORGET #1
+       DO .5 <- '?":1~'#2048$#0'"$#2'~#3
+       DO (5592) NEXT
+       DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$':2~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :2 <- ':2~"#0$#65535"'$'"':2~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (5520) NEXT
+       DO (5591) NEXT
+(5593) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .2 <- '"V:2~#1"$.2'~'#32768$#32767'
+       DO :2 <- '"'V:1~#1'$':2~"#0$#65534"'"~"#32768$#32767"'$
+               ':2~"#65535$#0"'
+       DO :1 <- :1~'#65535$#65534'
+       DO (1020) NEXT
+       DO .5 <- '?"'#255~":1~'#61440$#61440'"'~#1"$#2'~#3
+       DO (5593) NEXT
+       DO (5594) NEXT
+(5592) DO (1001) NEXT
+(5594) DO .5 <- .2
+       PLEASE RETRIEVE .2
+       PLEASE RESUME #2
+
+(5600) PLEASE DO .5 <- '?"'V"':1~:1'~#1"$"':2~:2'~#1"'~#1"$#1'~#3
+       DO (5601) NEXT
+       DO STASH :6
+       DO (5590) NEXT
+       DO :6 <- :2~'#32767$#65535'
+       PLEASE DO :6 <- 'V"'V"':6~:6'~#1"$"'.5~.5'~#1"'~#1"$
+               ":1~#1"'~':2~"#32768$#0"'
+       DO (5510) NEXT
+       DO .5 <- '?"':1~"#61440$#61440"'~#1"$#1'~#3
+       DO (5606) NEXT
+       PLEASE DO :1 <- #2048$#0
+       DO (1020) NEXT
+       DO (5607) NEXT
+(5601) DO (1001) NEXT
+       PLEASE RESUME #2
+(5606) DO (1001) NEXT
+(5607) DO :2 <- #0
+       PLEASE DO :1 <- '"'"'"'".1$':1~#32768'"~"#1109$#1"'$
+               ':1~#128'"~#2735'$':1~"#546$#0"'"~"#43679"'$':1~"#1365$
+               #0"'"~"#1023$#63"'$'"'"'".1$#0"~#34959'$':1~"#0$
+               #1170"'"~#11007'$':1~"#0$#2925"'"~"#2005$#255"'
+       DO .5 <- !1~#256'$!1~#512'
+       DO RETRIEVE :6
+       PLEASE RESUME #2
+
+(5610) PLEASE STASH .2 + .3 + :3 + :4 + :5 + :6 + :7 + :8 + :9 + :10 +
+               :11 + :12 + ;1
+       PLEASE DO (5691) NEXT
+       PLEASE DO :5 <- #4096$#0
+       DO .2 <- .1~#255
+       DO :7 <- :1
+       DO :8 <- :2
+       DO :1 <- #0
+       DO :2 <- #0
+       DO .1 <- #1
+       DO (5612) NEXT
+(5611) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :3 <- '"?':7~"#65535$#0"'$#65535"~"#0$#65535"'$
+               '"?':7~"#0$#65535"'$#65535"~"#0$#65535"'
+       DO :4 <- '"?':8~"#65535$#0"'$#65535"~"#0$#65535"'$
+               '"?':8~"#0$#65535"'$#65535"~"#0$#65535"'
+       DO .3 <- .1
+       DO (5580) NEXT
+       DO :9 <- :3
+       DO :10 <- :4
+       DO :11 <- :1
+       DO :12 <- :2
+       DO (5615) NEXT
+(5616) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO (1020) NEXT
+       DO :5 <- :5~'#65535$#65534'
+       DO .5 <- '?":5~:5"$#2'~#3
+       DO (5617) NEXT
+       DO :5 <- #0$#16384
+       PLEASE ABSTAIN FROM (5638)
+       PLEASE ABSTAIN FROM (5639)
+       DO (5615) NEXT
+(5617) DO (1001) NEXT
+(5615) PLEASE FORGET #1
+       DO :10 <- '"'V:9~#1'$':10~"#0$#65534"'"~"#32768$#32767"'$
+               ':10~"#65535$#0"'
+       DO :9 <- '"':9~"#0$#65535"'$':9~"#0$#65534"'"~"#32768$#32767"'$
+               ':9~"#65535$#0"'
+       DO :6 <- #1
+       PLEASE DO .5 <- '?"':10~:10'~'#32768$#0'"$#2'~#3
+       DO (5613) NEXT
+       DO :3 <- :9
+       DO :1 <- :10
+       DO (5510) NEXT
+       DO :4 <- :1
+       DO (5614) NEXT
+(5613) DO (1001) NEXT
+       DO :1 <- :9
+       DO (5510) NEXT
+       DO :3 <- :1
+       DO :4 <- #0
+(5614) PLEASE FORGET #1
+       DO :1 <- :7
+       DO :2 <- :8
+       DO (5500) NEXT
+       DO .5 <- '?":1~'#2048$#0'"$#1'~#3
+       DO (5616) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       PLEASE DO :1 <- :11
+       DO :2 <- :12
+       DO :3 <- #0
+       DO :4 <- :5
+(5638) PLEASE DO :3 <- ;1SUB.1#1
+(5639) PLEASE DO :4 <- ;1SUB.1#2
+       DO (5500) NEXT
+(5612) DO .5 <- '?"'V"':7~":7~'#2047$#4095'"'~#1"$"':8~:8'~#1"'~#1"$
+               #2'~#3
+       DO (5611) NEXT
+       DO .1 <- #638
+       DO .5 <- '?"'#65535~"'?.2$#127'~#21845"'~#1"$#1'~#3
+       DO (5619) NEXT
+       DO :11 <- :1
+       DO :12 <- :2
+       DO .1 <- .2
+       DO .2 <- #127
+       DO (1010) NEXT
+       DO .2 <- !3~#65280'$!3~#65280'
+       DO :1 <- '".2$.3"~"#65280$#61610"'$'".2$.3"~"#65280$#61525"'
+       PLEASE DO :2 <- #1479$#6307
+       DO (1549) NEXT
+       DO :6 <- :3
+       PLEASE DO :2 <- #4059$#2839
+       DO (1549) NEXT
+       DO :1 <- :6
+       DO :2 <- '".2$':3~"#61440$#0"'"~"#65520$#15"'$'".2$':3~"#0$
+               #61440"'"~"#65520$#15"'
+       DO :6 <- '"'"'"':3~"#4095$#0"'$#0"~"#4095$#1"'$#0"~"#8191$#1"'$
+               #0"~"#16383$#3"'$'"'"'"':3~"#0$#4095"'$#0"~"#4095$#1"'$
+               #0"~"#8191$#1"'$#0"~"#16383$#3"'
+       DO (1509) NEXT
+       DO :4 <- '"'V:3~#1'$':6~"#0$#65534"'"~"#32768$#32767"'$
+               ':6~"#65535$#0"'
+       PLEASE DO :3 <- '".2$':3~"#0$#65534"'"~"#32768$#32767"'$
+               ':3~"#65535$#0"'
+       DO :1 <- :11
+       DO :2 <- :12
+       DO (5500) NEXT
+       DO .1 <- #638
+       DO .5 <- '?".2~#1"$#1'~#3
+       DO (5619) NEXT
+       DO .1 <- #1662
+       DO (5560) NEXT
+       DO (5618) NEXT
+(5619) DO (1001) NEXT
+(5618) PLEASE REINSTATE (5638)
+       PLEASE REINSTATE (5639)
+       PLEASE RETRIEVE .2 + .3 + :3 + :4 + :5 + :6 + :7 + :8 + :9 +
+               :10 + :11 + :12 + ;1
+       PLEASE RESUME #3
+
+(5620) PLEASE STASH .2 + .3 + :3 + :4 + :6 + :7 + :8 + :9 + :10 + ;1
+       PLEASE DO (5692) NEXT
+       PLEASE DO :3 <- #61302$#16465
+       PLEASE DO :4 <- #8654$#59334
+       DO (5530) NEXT
+       DO :3 <- :1
+       DO :4 <- :2
+       DO .4 <- !1~#1024'$#1
+       DO .2 <- .1~#1023
+       DO .1 <- #636
+       DO (1010) NEXT
+       DO .1 <- .3
+       DO .2 <- #0
+       DO .5 <- '?".1~#32768"$#1'~#3
+       DO (5635) NEXT
+       DO (5624) NEXT
+(5625) DO (1001) NEXT
+(5624) PLEASE FORGET #1
+       DO .2 <- !2$":3~'#32768$#0'"'~'#32767$#1'
+       DO :3 <- ':3~"#0$#65535"'$'"':3~"#32767$#0"'$':4~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :4 <- ':4~"#0$#65535"'$'"':4~"#32767$#0"'$#0"~"#32767$#1"'
+       DO (1020) NEXT
+       DO .5 <- '?"!1~.1'~#1"$#2'~#3
+       DO (5625) NEXT
+       DO (5623) NEXT
+(5635) DO (1001) NEXT
+       DO (5580) NEXT
+(5623) PLEASE FORGET #1
+       PLEASE DO .5 <- .?4~#3
+       DO .4 <- .2
+       DO (5626) NEXT
+       PLEASE DO .4 <- '?.4$#65535'~'#0$#65535'
+       DO :6 <- #1
+       DO .5 <- '?"':4~:4'~#1"$#1'~#3
+       DO (5627) NEXT
+       DO :1 <- '"?':4~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':4~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO (5510) NEXT
+       DO :4 <- :1
+       DO :3 <- '"?':3~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':3~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO (5628) NEXT
+(5627) DO (1001) NEXT
+       PLEASE DO .5 <- '?"':3~:3'~#1"$#1'~#3
+       DO (5622) NEXT
+       PLEASE FORGET #1
+       DO :1 <- '"?':3~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':3~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO (5510) NEXT
+       DO :3 <- :1
+       DO :4 <- #0
+       DO (5628) NEXT
+(5622) DO (1001) NEXT
+       PLEASE FORGET #2
+       DO .1 <- .4
+       PLEASE DO (1020) NEXT
+       DO .4 <- .1
+       DO :3 <- #0
+       DO :4 <- #0
+       DO (5628) NEXT
+(5626) DO (1001) NEXT
+(5628) PLEASE FORGET #1
+       PLEASE DO :1 <- #50461$#23679
+       PLEASE DO :2 <- #35694$#56274
+       DO (5530) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       PLEASE DO :9 <- #2048$#0
+       DO :10 <- #0
+       DO :6 <- #0
+       DO .1 <- #1
+       DO :1 <- :9
+       DO :2 <- :10
+       DO (5621) NEXT
+(5629) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .5 <- '?":6~:6"$#1'~#3
+       DO (5631) NEXT
+       DO :2 <- :6
+       DO :1 <- :8
+       PLEASE DO (5519) NEXT
+       DO .5 <- '?":6~:6"$#1'~#3
+       DO :6 <- :2~'#65535$#65534'
+       DO :2 <- :1
+       DO :1 <- #0
+       DO (5632) NEXT
+(5631) DO (1001) NEXT
+       DO .5 <- '?".1~#32"$#1'~#3
+       DO (5633) NEXT
+       DO :6 <- #32768$#0
+       DO (5634) NEXT
+(5633) DO (1001) NEXT
+(5634) PLEASE FORGET #1
+       DO :1 <- :7
+       DO :2 <- :8
+       DO :3 <- ;1SUB.1#1
+       DO :4 <- ;1SUB.1#2
+       DO (5500) NEXT
+(5632) PLEASE FORGET #1
+       DO .3 <- .1
+       DO (1020) NEXT
+       DO (5629) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       PLEASE DO :1 <- :9
+       DO :2 <- :10
+       DO :3 <- :1
+       DO :4 <- :2
+       DO (5580) NEXT
+       DO (5500) NEXT
+       DO :9 <- :1
+       DO :10 <- :2
+(5621) DO .5 <- '?"'V"':7~:7'~#1"$"':8~:8'~#1"'~#1"$#2'~#3
+       DO (5629) NEXT
+       PLEASE DO .1 <- .4
+       DO .2 <- #639
+       DO (1009) NEXT
+       DO .1 <- .3
+       PLEASE RETRIEVE .2 + :3 + :4 + :6 + :7 + :8 + :9 + :10 + ;1
+       PLEASE RESUME #2
+
+(5640) PLEASE STASH .2 + .3 + .4 + .7 + .8 + :3 + :4 + :5 + :6 + :7 +
+               :8 + :9
+       DO :5 <- :3
+       DO :7 <- :1
+       DO :8 <- :2
+       DO .5 <- '?":5~'#32768$#0'"$#1'~#3
+       PLEASE DO .8 <- !5$"V':5~".1~#1024"'~#1"'~'#1023$#32768'
+       DO .1 <- .1~#511
+       DO .2 <- #65410
+       DO (1009) NEXT
+       DO .4 <- .3
+       DO (5643) NEXT
+       DO :1 <- '"?':5~"#65535$#0"'$#65535"~"#0$#65535"'$'"?':5~"#0$
+               #65535"'$#65535"~"#0$#65535"'
+       DO :6 <- #1
+       DO (5510) NEXT
+       DO :5 <- :1
+       DO (5644) NEXT
+(5643) DO (1001) NEXT
+(5644) PLEASE FORGET #1
+       PLEASE DO :6 <- #32768$#0
+       DO :9 <- #0
+       DO .7 <- #631
+       DO (5642) NEXT
+(5642) PLEASE FORGET #1
+       DO .5 <- '?":5~#1"$#1'~#3
+       DO (5645) NEXT
+       DO .5 <- .2
+       PLEASE DO .1 <- .7
+       DO .2 <- .4
+       DO (1009) NEXT
+       DO .1 <- .3
+       DO .4 <- .2
+       DO .2 <- .5
+       PLEASE DO :1 <- :6
+       DO :2 <- :9
+       DO :3 <- :7
+       DO :4 <- :8
+       PLEASE DO (5530) NEXT
+       DO (5570) NEXT
+       DO .7 <- .1
+       DO :6 <- :1
+       DO :9 <- :2
+       DO .5 <- '?".5~#2"$#2'~#3
+       DO (5646) NEXT
+       PLEASE DO .5 <- .7~#64512
+       DO .5 <- '?"!5~.5'~#1"$#1'~#3
+       DO (5645) NEXT
+       PLEASE DO .7 <- '"'?"V.8~#1"$.7'~'#0$#33279'"$#256'~'#767$#256'
+       DO (5649) NEXT
+(5645) DO (1001) NEXT
+(5647) PLEASE FORGET #1
+       DO :5 <- :5~'#65535$#65534'
+       DO .5 <- '?"':5~:5'~#1"$#1'~#3
+       DO (5646) NEXT
+       PLEASE DO :1 <- :7
+       DO :2 <- :8
+       DO :3 <- :7
+       DO :4 <- :8
+       DO .1 <- !4$#0'~'#32767$#1'
+       PLEASE DO (5530) NEXT
+       DO :4 <- :3~'#32768$#0'
+       DO :3 <- #0
+       DO (5500) NEXT
+       DO (5570) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       DO .4 <- .1
+       DO (5642) NEXT
+(5646) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .5 <- .8~#3
+       DO (5648) NEXT
+       DO .1 <- #119
+       DO .2 <- .7
+       DO (1010) NEXT
+       DO :3 <- :6~'#65535$#65534'
+       PLEASE DO :4 <- '"':9~"#0$#65534"'$'V:6~#1'"~"#32767$#1"'$
+               ':9~"#65535$#0"'
+       DO :1 <- #32768$#0
+       DO :2 <- #0
+       PLEASE DO (5540) NEXT
+       DO :2 <- '"'"'"'"'"'":1~#127"$#0'~#10923"$.5'~#43693"$#0'~'#511$
+               #1'"$#0'~'#1023$#3'"$#0'~'#4095$#15'"$#0'~'#65535$#31'
+       PLEASE DO :2 <- ':2~"#31$#2047"'$':2~"#1023$#63"'
+       DO :1 <- :1~'#65528$#65520'
+       DO .2 <- .3
+       DO (1009) NEXT
+       DO .7 <- .3
+       DO (5649) NEXT
+(5648) DO (1001) NEXT
+       DO :1 <- :6
+       DO :2 <- :9
+(5649) DO .1 <- !8$.7'~'#1024$#1023'
+       PLEASE RETRIEVE .2 + .3 + .4 + .7 + .8 + :3 + :4 + :5 + :6 +
+               :7 + :8 + :9
+       PLEASE RESUME #2
+
+(5650) PLEASE STASH .2 + .3 + .4 + .6 + .7 + .8 + :4 + :5 + :6 +
+               :7 + :8
+       DO :5 <- :1
+       DO .7 <- :2~'#32768$#0'
+       PLEASE DO .4 <- '"'":2~'#63488$#61440'"$#256'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO .2 <- :2~'#30720$#61440'
+       DO :1 <- '"'"':2~"#2047$#1"'$#4096"~"#4094$#4099"'$#0"~"#16383$
+               #3"'$'"'"'"':2~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #1"'$#0"~"#16383$#3"'
+       DO .1 <- #158
+       DO (1010) NEXT
+       DO .1 <- .3
+       PLEASE DO :3 <- '".V7$#32767"~"#32768$#32767"'$#65535
+       DO :4 <- #0
+       DO .5 <- '?".1~#32768"$#2'~#3
+       DO (5665) NEXT
+       DO :3 <- #0
+       DO :4 <- :2
+       PLEASE DO .5 <- '?"'#65535~".1~#65504"'~#1"$#2'~#3
+       DO (5665) NEXT
+       DO :4 <- #1
+       DO (5662) NEXT
+(5667) DO (1001) NEXT
+       PLEASE DO :4 <- :V4
+       DO (5520) NEXT
+(5662) PLEASE FORGET #1
+       DO .5 <- '?"!1~.1'~#1"$#2'~#3
+       DO (5667) NEXT
+       DO :4 <- ':4~"#65535$#65534"'~':4~"#65535$#65534"'
+       DO :3 <- :1~'"'?":4~'#65535$#0'"$#65535'~'#0$#65535'"$
+               "'?":4~'#0$#65535'"$#65535'~'#0$#65535'"'
+       DO :1 <- ':1~:4'~'#65520$#65520'
+       DO :2 <- #0
+       DO .1 <- '"!V7$#512'~'#32768$#1023'"$.2'~'#1536$#511'
+       DO (5600) NEXT
+       DO :4 <- :1
+       DO (5656) NEXT
+(5665) DO (1001) NEXT
+(5656) PLEASE FORGET #1
+       DO .5 <- '?"':5~"#32768$#0"'~'":4~:4"~#1'"$#2'~#3
+       DO (5655) NEXT
+       DO .1 <- .2
+       DO .5 <- '?"':3~:3'~#1"$#1'~#3
+       DO (5651) NEXT
+       DO .6 <- #1
+       PLEASE DO .1 <- '"'":5~'#63488$#61440'"$#256'~'#511$#256'"
+               $#0'~'#1023$#256'
+       DO :1 <- '"'"':5~"#2047$#1"'$#4096"~"#4094$#4099"'$#0"~"#16383$
+               #3"'$'"'"'"':5~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #1"'$#0"~"#16383$#3"'
+       DO :2 <- #0
+       PLEASE DO (5640) NEXT
+       DO (5570) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       DO .8 <- .1
+       DO (5652) NEXT
+(5651) DO (1001) NEXT
+       DO .6 <- #0
+(5652) PLEASE FORGET #1
+       DO .5 <- '?"':4~:4'~#1"$#1'~#3
+       DO (5653) NEXT
+       DO .6 <- #1$.6
+       DO .1 <- :5~'#30720$#61440'
+       DO :1 <- '"':5~"#2047$#0"'$#2048"~"#2047$#2048"'$':5~"#0$#4095"'
+       DO :2 <- #0
+       PLEASE DO (5610) NEXT
+       DO (5570) NEXT
+       PLEASE DO .2 <- '"'":4~'#63488$#61440'"$#0'~'#511$#256'"$
+               #0'~'#1023$#256'
+       DO :3 <- '"'"':4~"#2047$#1"'$#4096"~"#4094$#4099"'$#0"~"#16383$
+               #3"'$'"'"'"':4~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #1"'$#0"~"#16383$#3"'
+       DO :4 <- #0
+       PLEASE DO (5530) NEXT
+       DO .5 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (5663) NEXT
+       PLEASE DO :2 <- '"'V:1~#1'$':2~"#0$#65534"'"~"#32768$#32767"'$
+               ':2~"#65535$#0"'
+       DO :1 <- :1~'#65535$#65534'
+       DO (1020) NEXT
+       DO (5664) NEXT
+(5663) DO (1001) NEXT
+(5664) PLEASE FORGET #1
+       DO (1000) NEXT
+       DO .1 <- .3
+       DO .2 <- #119
+       DO (1010) NEXT
+       DO .1 <- .3
+       PLEASE DO (5620) NEXT
+       DO (5570) NEXT
+       DO (5654) NEXT
+(5653) DO (1001) NEXT
+(5654) PLEASE FORGET #1
+       DO .5 <- .6
+       PLEASE DO (5659) NEXT
+       DO .5 <- '?.7$#1'~#3
+       DO (5657) NEXT
+       DO .2 <- .8
+       DO (1010) NEXT
+       DO .2 <- .3~#2047
+       DO :3 <- :7~'#65535$#65534'
+       PLEASE DO :4 <- '"'V:7~#1'$':8~"#0$#65534"'"~"#32768$#32767"'$
+               ':8~"#65535$#0"'
+       PLEASE DO (5540) NEXT
+       DO (1009) NEXT
+       DO .1 <- .3
+       PLEASE DO :2 <- '&"V:1~#64"'$'"':1~#63'$.5"~#2735'
+       DO :1 <- :1~'#65528$#65520'
+       DO .5 <- #2
+       DO (5658) NEXT
+(5657) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :3 <- :7
+       DO :4 <- :8
+       PLEASE DO (5530) NEXT
+       DO .2 <- #630
+       DO (1010) NEXT
+       DO .1 <- .3
+       DO .2 <- .8
+       DO (1009) NEXT
+       DO .1 <- .3~#2047
+       DO .5 <- #2
+       DO (5658) NEXT
+(5661) DO (1001) NEXT
+       PLEASE FORGET #2
+       DO .5 <- '?.7$#1'~#3
+       DO (5666) NEXT
+       DO .1 <- #1399
+       DO .2 <- .8
+       DO (1010) NEXT
+       DO .2 <- .3~#2047
+       DO :1 <- #32768$#0
+       DO :2 <- #0
+       DO :3 <- :7~'#65535$#65534'
+       DO :4 <- '"'V:7~#1'$':8~"#0$#65534"'"~"#32768$#32767"'$
+               ':8~"#65535$#0"'
+       PLEASE DO (5540) NEXT
+       DO (1009) NEXT
+       DO .1 <- .3
+       PLEASE DO :2 <- '&"V:1~#64"'$'"':1~#63'$.5"~#2735'
+       DO :1 <- :1~'#65528$#65520'
+       DO .5 <- #2
+       DO (5658) NEXT
+(5666) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :1 <- :7
+       DO :2 <- :8
+       DO .1 <- .8
+       PLEASE DO .5 <- #2
+       DO (5658) NEXT
+(5655) DO (1001) NEXT
+       PLEASE FORGET #1
+       DO (5658) NEXT
+(5659) DO (5661) NEXT
+(5658) PLEASE RETRIEVE .2 + .3 + .4 + .6 + .7 + .8 + :4 + :5 + :6 +
+               :7 + :8
+       PLEASE RESUME #2
+
+(5670) PLEASE STASH .2 + .3 + .5 + :3 + :4
+       DO .1 <- :1~'#30720$#61440'
+       DO .5 <- '?.1$#128'~#21845
+       DO .5 <- '?"!1~.5'~'"?.5~.5"~#255'"$#1'~#3
+       DO (5677) NEXT
+       DO .5 <- :1~'#32768$#0'
+       PLEASE DO :1 <- '"'"':1~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #3"'$'"'"':1~"#2047$#1"'$#32768"~"#4094$#32771"'$
+               #0"~"#16383$#3"'
+       DO :2 <- #0
+       DO .2 <- #129
+       PLEASE DO :3 <- #18912$#41917
+       PLEASE DO :4 <- #3139$#18068
+       DO (5550) NEXT
+       DO .2 <- .5
+       DO (5678) NEXT
+(5677) DO (1001) NEXT
+       DO .2 <- .1
+       DO .1 <- #129
+       DO (1010) NEXT
+       DO .2 <- :1~'#32768$#0'
+       PLEASE DO :3 <- '"'"':1~"#0$#4095"'$#0"~"#4095$#1"'$#0"~"#8191$
+               #3"'$'"'"':1~"#2047$#1"'$#32768"~"#4094$#32771"'$
+               #0"~"#16383$#3"'
+       DO :4 <- #0
+       DO (5580) NEXT
+       DO :1 <- ':3~"#0$#65535"'$'"':3~"#32767$#0"'$':4~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :2 <- ':4~"#0$#65535"'$'"':4~"#32767$#0"'$#0"~"#32767$#1"'
+(5678) PLEASE FORGET #1
+       PLEASE DO :3 <- '"?':1~"#65535$#0"'$#18912"~"#0$#65535"'$
+               '"?':1~"#0$#65535"'$#41917"~"#0$#65535"'
+       DO .5 <- '?"#3~'"'":1~:3"~"'?:3~:3'~'#32767$#65535'"'~#1"$
+               "'":1~'#32768$#0'"~"':3~:3'~'#32768$#0'"'~#1"'"$#1'~#3
+       DO (5671) NEXT
+       DO (5560) NEXT
+       PLEASE DO :3 <- #41917$#37824
+       PLEASE DO :4 <- #18068$#6279
+       DO (5500) NEXT
+       DO .2 <- '?.2$#1'~#1
+       DO (5672) NEXT
+(5671) DO (1001) NEXT
+(5672) PLEASE FORGET #1
+       PLEASE DO :3 <- '"?':1~"#32767$#0"'$#20958"~"#0$#32767"'$
+               '"?':1~"#0$#65535"'$#18913"~"#0$#65535"'
+       DO .5 <- '?"':1~:3'~'"?:3~:3"~"#32767$#65535"'"$#1'~#3
+       DO (5673) NEXT
+       DO (5560) NEXT
+       PLEASE DO :3 <- #18912$#41917
+       PLEASE DO :4 <- #3139$#18068
+       DO (5500) NEXT
+       DO .1 <- #1024
+       DO (5674) NEXT
+(5673) DO (1001) NEXT
+       DO .1 <- #2048
+(5674) PLEASE FORGET #1
+       DO :1 <- ':1~"#0$#65535"'$'"':1~"#32767$#0"'$':2~"#32768$
+               #0"'"~"#32767$#1"'
+       DO :2 <- ':2~"#0$#65535"'$'"':2~"#32767$#0"'$#0"~"#32767$#1"'
+       DO .5 <- '?.2$#1'~#3
+       DO (5675) NEXT
+       DO (5560) NEXT
+       DO (5676) NEXT
+(5675) DO (1001) NEXT
+(5676) PLEASE RETRIEVE .2 + .3 + .5 + :3 + :4
+       PLEASE RESUME #2
+
+(5680) PLEASE STASH .1 + .2 + .3 + .5 + :5 + :6 + :7 + :8 + :9 + :10 +
+               :11 + ;1
+       DO .5 <- ':2~"#32768$#32768"'$'":1~:1"~"#32768$#1"'
+       PLEASE DO .5 <- '?"'?".5~.5"~#9'~#1"$#1'~#3
+       DO (5681) NEXT
+       PLEASE DO (5693) NEXT
+       DO :5 <- :1
+       DO :6 <- :2
+       DO :7 <- #0
+       DO :8 <- #0
+       PLEASE DO :9 <- #23159$#12120
+       PLEASE DO :10 <- #2459$#20324
+       DO :11 <- #32768$#0
+       DO .1 <- #0
+       DO (5685) NEXT
+(5685) PLEASE FORGET #1
+       DO .3 <- .1
+       DO (1020) NEXT
+       DO .5 <- '?".1~#32"$#1'~#3
+       DO (5688) NEXT
+       DO :1 <- #0
+       DO :2 <- :11
+       DO :11 <- :11~'#65535$#65534'
+       PLEASE DO .5 <- '?"'V":1~:1"$":2~:2"'~':11~:11'"$#1'~#3
+       DO (5683) NEXT
+       DO (5687) NEXT
+(5688) DO (1001) NEXT
+       DO :1 <- ;1SUB.1#1
+       DO :2 <- ;1SUB.1#2
+(5687) PLEASE FORGET #1
+       DO :3 <- :5
+       DO :4 <- :6
+       DO .5 <- '?":5~'#32768$#0'"$#1'~#3
+       DO (5684) NEXT
+       DO (5500) NEXT
+       DO :5 <- :1
+       DO :6 <- :2
+       PLEASE DO :1 <- :9
+       DO :2 <- :10
+       DO (5560) NEXT
+       DO :3 <- :1
+       DO :4 <- :2
+       PLEASE STASH :3 + :4
+       DO :3 <- :7
+       DO :4 <- :8
+       DO (5686) NEXT
+(5684) DO (1001) NEXT
+       DO (5560) NEXT
+       DO (5500) NEXT
+       DO :5 <- :1
+       DO :6 <- :2
+       DO :3 <- :9
+       DO :4 <- :10
+       PLEASE STASH :3 + :4
+       DO :1 <- :7
+       DO :2 <- :8
+       DO (5560) NEXT
+       DO :3 <- :1
+       DO :4 <- :2
+(5686) PLEASE FORGET #1
+       PLEASE DO :1 <- :9
+       DO :2 <- :10
+       DO (5580) NEXT
+       DO (5500) NEXT
+       DO :9 <- :1
+       DO :10 <- :2
+       PLEASE RETRIEVE :3 + :4
+       PLEASE DO :1 <- :7
+       DO :2 <- :8
+       DO (5580) NEXT
+       DO (5500) NEXT
+       DO :7 <- :1
+       DO :8 <- :2
+       DO .5 <- '?".1~#32"$#1'~#3
+       DO (5685) NEXT
+(5683) DO (1001) NEXT
+       PLEASE DO :1 <- :7
+       DO :2 <- :8
+       DO :3 <- :9
+       DO :4 <- :10
+       DO (5682) NEXT
+(5681) DO (1001) NEXT
+       DO :3 <- #0$#32768
+       DO :4 <- #0
+       DO (5682) NEXT
+(5682) PLEASE RETRIEVE .1 + .2 + .3 + .5 + :5 + :6 + :7 + :8 + :9 +
+               :10 + :11 + ;1
+       PLEASE RESUME #3
+
+(5690) PLEASE DO ;1 <- #39
+       PLEASE DO ,1 <- #39
+       DO ;1SUB#1 <- #49152$#0
+       DO ,1SUB#1 <- #3
+       PLEASE DO ;1SUB#2 <- #40960$#32768
+       DO ,1SUB#2 <- #6
+       DO ;1SUB#3 <- #61440$#49152
+       DO ,1SUB#3 <- #9
+       PLEASE DO ;1SUB#4 <- #40960$#26624
+       DO ,1SUB#4 <- #13
+       DO ;1SUB#5 <- #36864$#39936
+       DO ,1SUB#5 <- #16
+       PLEASE DO ;1SUB#6 <- #50176$#57856
+       DO ,1SUB#6 <- #19
+       DO ;1SUB#7 <- #43392$#17920
+       DO ,1SUB#7 <- #23
+       PLEASE DO ;1SUB#8 <- #65088$#26112
+       DO ,1SUB#8 <- #26
+       DO ;1SUB#9 <- #63328$#43264
+       DO ,1SUB#9 <- #29
+       PLEASE DO ;1SUB#10 <- #33248$#28880
+       DO ,1SUB#10 <- #33
+       DO ;1SUB#11 <- #61904$#18808
+       DO ,1SUB#11 <- #36
+       PLEASE DO ;1SUB#12 <- #59584$#36404
+       DO ,1SUB#12 <- #39
+       DO ;1SUB#13 <- #35031$#21168
+       DO ,1SUB#13 <- #43
+       PLEASE DO ;1SUB#14 <- #52556$#31247
+       DO ,1SUB#14 <- #46
+       DO ;1SUB#15 <- #54245$#40724
+       DO ,1SUB#15 <- #49
+       PLEASE DO ;1SUB#16 <- #45999$#9623
+       DO ,1SUB#16 <- #53
+       DO ;1SUB#17 <- #52711$#20579
+       DO ,1SUB#17 <- #56
+       PLEASE DO ;1SUB#18 <- #45943$#57748
+       DO ,1SUB#18 <- #59
+       DO ;1SUB#19 <- #47440$#2835
+       DO ,1SUB#19 <- #63
+       PLEASE DO ;1SUB#20 <- #59129$#15514
+       DO ,1SUB#20 <- #66
+       DO ;1SUB#21 <- #43357$#53031
+       DO ,1SUB#21 <- #69
+       PLEASE DO ;1SUB#22 <- #39269$#12996
+       DO ,1SUB#22 <- #73
+       DO ;1SUB#23 <- #58903$#6247
+       DO ,1SUB#23 <- #76
+       PLEASE DO ;1SUB#24 <- #39227$#55387
+       DO ,1SUB#24 <- #79
+       DO ;1SUB#25 <- #33284$#11737
+       DO ,1SUB#25 <- #83
+       PLEASE DO ;1SUB#26 <- #51151$#15156
+       DO ,1SUB#26 <- #86
+       DO ;1SUB#27 <- #48054$#43312
+       DO ,1SUB#27 <- #89
+       PLEASE DO ;1SUB#28 <- #34662$#5981
+       DO ,1SUB#28 <- #93
+       DO ;1SUB#29 <- #51993$#4927
+       DO ,1SUB#29 <- #96
+       PLEASE DO ;1SUB#30 <- #44458$#40091
+       DO ,1SUB#30 <- #99
+       DO ;1SUB#31 <- #59232$#60392
+       DO ,1SUB#31 <- #102
+       PLEASE DO ;1SUB#32 <- #43246$#31536
+       DO ,1SUB#32 <- #106
+       DO ;1SUB#33 <- #34081$#46932
+       DO ,1SUB#33 <- #109
+       PLEASE DO ;1SUB#34 <- #55473$#58111
+       DO ,1SUB#34 <- #112
+       DO ;1SUB#35 <- #45369$#17686
+       DO ,1SUB#35 <- #116
+       PLEASE DO ;1SUB#36 <- #35254$#34734
+       DO ,1SUB#36 <- #119
+       DO ;1SUB#37 <- #52883$#51077
+       DO ,1SUB#37 <- #122
+       PLEASE DO ;1SUB#38 <- #38304$#28253
+       DO ,1SUB#38 <- #126
+       DO ;1SUB#39 <- #57468$#26227
+       DO ,1SUB#39 <- #129
+       PLEASE RESUME #1
+
+(5691) PLEASE DO ;1 <- #26 BY #2
+       DO ;1SUB#1#1 <- #714$#2352
+       DO ;1SUB#1#2 <- #2418$#44457
+       PLEASE DO ;1SUB#2#1 <- #1394$#55
+       DO ;1SUB#2#2 <- #943$#11147
+       DO ;1SUB#3#1 <- #138$#1076
+       DO ;1SUB#3#2 <- #52079$#30302
+       PLEASE DO ;1SUB#4#1 <- #591$#2
+       DO ;1SUB#4#2 <- #36307$#44292
+       DO ;1SUB#5#1 <- #32$#519
+       DO ;1SUB#5#2 <- #38032$#25317
+       PLEASE DO ;1SUB#6#1 <- #273$#0
+       DO ;1SUB#6#2 <- #64569$#9562
+       DO ;1SUB#7#1 <- #8$#256
+       DO ;1SUB#7#2 <- #2221$#63237
+       PLEASE DO ;1SUB#8#1 <- #32800           
+       DO ;1SUB#8#2 <- #16352$#554
+       DO ;1SUB#9#1 <- #16392
+       DO ;1SUB#9#2 <- #133$#8056
+       PLEASE DO ;1SUB#10#1 <- #8194
+       DO ;1SUB#10#2 <- #2047$#33
+       DO ;1SUB#11#1 <- #4096
+       DO ;1SUB#11#2 <- #32776$#1015
+       PLEASE DO ;1SUB#12#1 <- #2048
+       DO ;1SUB#12#2 <- #16639$#2
+       DO ;1SUB#13#1 <- #1024
+       DO ;1SUB#13#2 <- #8192$#127
+       PLEASE DO ;1SUB#14#1 <- #512
+       DO ;1SUB#14#2 <- #4127$#0
+       DO ;1SUB#15#1 <- #256
+       DO ;1SUB#15#2 <- #2048$#15
+       PLEASE DO ;1SUB#16#1 <- #128
+       DO ;1SUB#16#2 <- #1027$#0
+       DO ;1SUB#17#1 <- #64
+       DO ;1SUB#17#2 <- #512$#1
+       PLEASE DO ;1SUB#18#1 <- #32
+       DO ;1SUB#18#2 <- #256$#0
+       DO ;1SUB#19#1 <- #16
+       DO ;1SUB#19#2 <- #32768
+       PLEASE DO ;1SUB#20#1 <- #8
+       DO ;1SUB#20#2 <- #8192
+       DO ;1SUB#21#1 <- #4
+       DO ;1SUB#21#2 <- #2048
+       PLEASE DO ;1SUB#22#1 <- #2
+       DO ;1SUB#22#2 <- #512
+       DO ;1SUB#23#1 <- #1
+       DO ;1SUB#23#2 <- #128
+       PLEASE DO ;1SUB#24#1 <- #0
+       DO ;1SUB#24#2 <- #32772$#0
+       DO ;1SUB#25#1 <- #0
+       DO ;1SUB#25#2 <- #2$#32768
+       PLEASE DO ;1SUB#26#1 <- #0
+       DO ;1SUB#26#2 <- #16385$#0
+       PLEASE RESUME #1
+
+(5692) PLEASE DO ;1 <- #32 BY #2
+       DO ;1SUB#1#1 <- #42306$#17867
+       DO ;1SUB#1#2 <- #2944$#5824
+       PLEASE DO ;1SUB#2#1 <- #39940$#43084
+       DO ;1SUB#2#2 <- #48096$#35184
+       DO ;1SUB#3#1 <- #51944$#40133
+       DO ;1SUB#3#2 <- #33328$#62272
+       PLEASE DO ;1SUB#4#1 <- #51163$#52407
+       DO ;1SUB#4#2 <- #54240$#64048
+       DO ;1SUB#5#1 <- #58150$#51158
+       DO ;1SUB#5#2 <- #19712$#40320
+       PLEASE DO ;1SUB#6#1 <- #57854$#58249
+       DO ;1SUB#6#2 <- #51072$#36640
+       DO ;1SUB#7#1 <- #61666$#57853
+       DO ;1SUB#7#2 <- #16016$#44336
+       PLEASE DO ;1SUB#8#1 <- #61567$#61680
+       DO ;1SUB#8#2 <- #62928$#36608
+       DO ;1SUB#9#1 <- #63548$#61567
+       DO ;1SUB#9#2 <- #8672$#56672
+       PLEASE DO ;1SUB#10#1 <- #63519$#63550
+       DO ;1SUB#10#2 <- #65456$#2144
+       DO ;1SUB#11#1 <- #64527$#63519
+       DO ;1SUB#11#2 <- #33280$#65008
+       PLEASE DO ;1SUB#12#1 <- #64519$#64527
+       DO ;1SUB#12#2 <- #65520$#49296
+       DO ;1SUB#13#1 <- #65027$#64519
+       DO ;1SUB#13#2 <- #61472$#65488
+       PLEASE DO ;1SUB#14#1 <- #65025$#65027
+       DO ;1SUB#14#2 <- #65520$#63504
+       DO ;1SUB#15#1 <- #65280$#65025
+       DO ;1SUB#15#2 <- #65024$#65520
+       PLEASE DO ;1SUB#16#1 <- #65280$#65280
+       DO ;1SUB#16#2 <- #32752$#65296
+       DO ;1SUB#17#1 <- #65408$#65280
+       DO ;1SUB#17#2 <- #16320$#32752
+       PLEASE DO ;1SUB#18#1 <- #65408$#65408
+       DO ;1SUB#18#2 <- #8176$#16368
+       DO ;1SUB#19#1 <- #65472$#65408
+       DO ;1SUB#19#2 <- #4096$#0
+       PLEASE DO ;1SUB#20#1 <- #65472$#65472
+       DO ;1SUB#20#2 <- #2048$#0
+       DO ;1SUB#21#1 <- #65504$#65472
+       DO ;1SUB#21#2 <- #1024$#0
+       PLEASE DO ;1SUB#22#1 <- #65504$#65504
+       DO ;1SUB#22#2 <- #512$#0
+       DO ;1SUB#23#1 <- #65520$#65504
+       DO ;1SUB#23#2 <- #256$#0
+       PLEASE DO ;1SUB#24#1 <- #65520$#65520
+       DO ;1SUB#24#2 <- #32768
+       DO ;1SUB#25#1 <- #65528$#65520
+       DO ;1SUB#25#2 <- #8192
+       PLEASE DO ;1SUB#26#1 <- #65528$#65528
+       DO ;1SUB#26#2 <- #2048
+       DO ;1SUB#27#1 <- #65532$#65528
+       DO ;1SUB#27#2 <- #512
+       PLEASE DO ;1SUB#28#1 <- #65532$#65532
+       DO ;1SUB#28#2 <- #0
+       DO ;1SUB#29#1 <- #65534$#65532
+       DO ;1SUB#29#2 <- #0
+       PLEASE DO ;1SUB#30#1 <- #65534$#65534
+       DO ;1SUB#30#2 <- #0
+       DO ;1SUB#31#1 <- #65535$#65534
+       DO ;1SUB#31#2 <- #0
+       PLEASE DO ;1SUB#32#1 <- #65535$#65535
+       DO ;1SUB#32#2 <- #0
+       PLEASE RESUME #1
+
+(5693) PLEASE DO ;1 <- #31 BY #2
+       DO ;1SUB#1#1 <- #20958$#18912
+       DO ;1SUB#1#2 <- #41802$#3139
+       PLEASE DO ;1SUB#2#1 <- #11856$#29363
+       DO ;1SUB#2#2 <- #20278$#38329
+       DO ;1SUB#3#1 <- #16126$#13134
+       DO ;1SUB#3#2 <- #36988$#26789
+       PLEASE DO ;1SUB#4#1 <- #7293$#16290
+       DO ;1SUB#4#2 <- #62389$#4572
+       DO ;1SUB#5#1 <- #8181$#7710
+       DO ;1SUB#5#2 <- #52198$#46965
+       PLEASE DO ;1SUB#6#1 <- #3971$#8189
+       DO ;1SUB#6#2 <- #63827$#18313
+       DO ;1SUB#7#1 <- #4095$#4032
+       DO ;1SUB#7#2 <- #43913$#64878
+       PLEASE DO ;1SUB#8#1 <- #2032$#4095
+       DO ;1SUB#8#2 <- #8178$#60047
+       DO ;1SUB#9#1 <- #2047$#2040
+       DO ;1SUB#9#2 <- #64855$#2042
+       PLEASE DO ;1SUB#10#1 <- #1022$#2047
+       DO ;1SUB#10#2 <- #254$#65366
+       DO ;1SUB#11#1 <- #1023$#1023
+       DO ;1SUB#11#2 <- #65515$#62
+       PLEASE DO ;1SUB#12#1 <- #511$#1023
+       DO ;1SUB#12#2 <- #49159$#65531
+       DO ;1SUB#13#1 <- #511$#511
+       DO ;1SUB#13#2 <- #65535$#57345
+       PLEASE DO ;1SUB#14#1 <- #255$#511
+       DO ;1SUB#14#2 <- #63488$#65535
+       DO ;1SUB#15#1 <- #65535
+       DO ;1SUB#15#2 <- #65535$#64513
+       PLEASE DO ;1SUB#16#1 <- #32767
+       DO ;1SUB#16#2 <- #65280$#65535
+       DO ;1SUB#17#1 <- #16383
+       DO ;1SUB#17#2 <- #65535$#65409
+       PLEASE DO ;1SUB#18#1 <- #8191
+       DO ;1SUB#18#2 <- #65504$#65535
+       DO ;1SUB#19#1 <- #4095
+       DO ;1SUB#19#2 <- #65535$#65521
+       PLEASE DO ;1SUB#20#1 <- #2047
+       DO ;1SUB#20#2 <- #65532$#65535
+       DO ;1SUB#21#1 <- #1023
+       DO ;1SUB#21#2 <- #65535$#65535
+       PLEASE DO ;1SUB#22#1 <- #512
+       DO ;1SUB#22#2 <- #0
+       DO ;1SUB#23#1 <- #256
+       DO ;1SUB#23#2 <- #0
+       PLEASE DO ;1SUB#24#1 <- #128
+       DO ;1SUB#24#2 <- #0
+       DO ;1SUB#25#1 <- #64
+       DO ;1SUB#25#2 <- #0
+       PLEASE DO ;1SUB#26#1 <- #32
+       DO ;1SUB#26#2 <- #0
+       DO ;1SUB#27#1 <- #16
+       DO ;1SUB#27#2 <- #0
+       PLEASE DO ;1SUB#28#1 <- #8
+       DO ;1SUB#28#2 <- #0
+       DO ;1SUB#29#1 <- #4
+       DO ;1SUB#29#2 <- #0
+       PLEASE DO ;1SUB#30#1 <- #2
+       DO ;1SUB#30#2 <- #0
+       DO ;1SUB#31#1 <- #1
+       DO ;1SUB#31#2 <- #0
+       PLEASE RESUME #1
diff --git a/pit/lib/lib2.doc b/pit/lib/lib2.doc
new file mode 100644 (file)
index 0000000..39418b6
--- /dev/null
@@ -0,0 +1,35 @@
+
+lib2.i contains general-purpose library routines that are not included
+in the standard library.
+
+The first section, with entry at lines (2000), (2010) and (2020),
+was written for the Life program.  Line (2000) is the entry point
+for a decrement routine setting .1 <- .1 minus #1.  This is very
+similar to the increment routine (1020) in the system library,
+which I also use.  Line (2010) is the decrement and branch on zero
+operation.  It decrements .1, then if .1 is not zero returns to the
+calling point, but if .1 is zero pops an additional entry off the
+RESUME stack and returns to that point instead.  Line (2020) is an
+alternative entry point to the (1020) routine which performs an add
+bit operation.  It sets .1 <- .1 plus .2, where .2 is already known
+to be either #0 or #1.
+
+For the pi and primes programs I added the (2030) routine, which
+performs a 16-bit division with remainder.  It is faster than the
+(1040) routine for two reasons:  First, it is a true 16-bit version,
+whereas the (1040) routine just shifts over its operands and then
+calls the 32-bit division routine (1550).  Second, the (1550) routine
+generates a remainder as part of the computation, but then simply
+throws it away.  I needed the remainder, so I have my (2030) routine
+return it in .4 and the quotient in .3.  In other respects this is
+just a 16-bit translation of the (1550) routine.
+
+(2040) and (2049) are entry points to an exponentiation routine that
+raises .1 to the .2 power and returns the answer in :1.  If entered
+through (2040) the routine dies with an error on overflow.  If entered
+through (2049) then .4 is set to #2 if there is an overflow, otherwise
+.4 is set to #1.  There is a more detailed description of how this
+routine works on the web page.
+
+                                Louis Howell
+                                May 27, 1996
diff --git a/pit/lib/lib2.i b/pit/lib/lib2.i
new file mode 100644 (file)
index 0000000..eda0691
--- /dev/null
@@ -0,0 +1,97 @@
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+(2030) DO STASH .1 + .5
+       DO .3 <- #0
+       DO .5 <- '?"!2~.2'~#1"$#1'~#3
+       PLEASE DO (2031) NEXT
+       DO .4 <- #1
+       PLEASE DO (2033) NEXT
+(2033) DO FORGET #1
+       DO .5 <- '?".2~#32768"$#2'~#3
+       DO (2032) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       PLEASE DO .4 <- !4$#0'~'#32767$#1'
+       DO (2033) NEXT
+(2032) DO (1001) NEXT
+(2036) PLEASE FORGET #1
+        DO .5 <- '?.1$.2'~'#0$#65535'
+        DO .5 <- '?"'&"!2~.5'~'"?'?.5~.5'$#32768"~"#0$#65535"'"$
+                 ".5~.5"'~#1"$#2'~#3
+       DO (2034) NEXT
+       DO .5 <- .3
+       DO (1010) NEXT
+       PLEASE DO .1 <- .3
+        DO .3 <- 'V.4$.5'~'#0$#65535'
+       DO (2035) NEXT
+(2034) PLEASE DO (1001) NEXT
+(2035) DO FORGET #1
+       DO .5 <- "?'.4~#1'$#2"~#3
+       DO (2031) NEXT
+       DO .2 <- .2~#65534
+       DO .4 <- .4~#65534
+       PLEASE DO (2036) NEXT
+(2031) DO (1001) NEXT
+       PLEASE DO .4 <- .1
+       DO RETRIEVE .1 + .5
+       PLEASE RESUME #2
+(2040)  PLEASE STASH .4
+       DO ABSTAIN FROM (2047)
+(2049)  DO STASH .2 + .5 + :2 + :3 + :4 + :5 + :6
+       PLEASE DO .4 <- #0
+       DO :5 <- .1
+       DO :6 <- #1
+       DO (2044) NEXT
+       DO .4 <- '?.4$#1'~#3
+(2047) DO (2048) NEXT
+       DO .5 <- .4
+       DO (2046) NEXT
+       DO (1999) NEXT
+(2046)  DO (1001) NEXT
+       PLEASE REINSTATE (2047)
+       PLEASE RETRIEVE .4
+(2048) DO :1 <- :6
+       DO RETRIEVE .2 + .5 + :2 + :3 + :4 + :5 + :6
+       PLEASE RESUME #2
+(2044)  DO (2045) NEXT
+(2045) PLEASE FORGET #1
+       DO .5 <- "?!2~#1'$#1"~#3
+       DO (2041) NEXT
+       DO :3 <- :6~"#65535$#65534"
+       DO .5 <- '?"':3~:3'~#1"$#1'~#3
+       DO (2042) NEXT
+       PLEASE DO :1 <- :6
+       PLEASE DO :2 <- :5
+       DO (1549) NEXT
+       DO :6 <- :3
+       DO .4 <- 'V.4$":4~#2"'~#1
+       DO (2043) NEXT
+(2042)  DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :6 <- :5
+       DO (2043) NEXT
+(2041)  DO (1001) NEXT
+(2043) PLEASE FORGET #1
+       DO .2 <- .2~#65534
+       DO .5 <- '?"!2~.2'~#1"$#2'~#3
+       DO (1001) NEXT
+       PLEASE DO :1 <- :5
+       PLEASE DO :2 <- :5
+       DO (1549) NEXT
+       DO :5 <- :3
+       DO .4 <- 'V.4$":4~#2"'~#1
+       DO (2045) NEXT
diff --git a/pit/lib/numio.doc b/pit/lib/numio.doc
new file mode 100644 (file)
index 0000000..c509534
--- /dev/null
@@ -0,0 +1,98 @@
+Summary of routines in numio.i:
+
+(3000)   .1 <- character from input
+(3001)   Prints .2 as a character
+(3010)   ,1 <- a string of input from the user, no longer than .1, and
+         excluding the terminating newline.
+         .2 <- the real length of the user input.
+         .3 <- #1 if .2 <= .1 (i.e., no characters were lost).
+         Otherwise, .3 <- #2.
+(3020)   ,1 <- a string of input from the user, no longer than .1,
+         translated (where possible) into indices into ,2
+         .3 <- the real length of the user input.
+         .4 <- #1 if .3 <= .1 and all characters in the input are
+         listed in ,2. Otherwise, .4 <- #2.
+(3080)   .1 <- a 16-bit number from the user
+(3089)   .1 <- a 16-bit number from the user, with an error message if
+         non-digits are encountered
+(3090)   Displays the value in .1
+(3099)   Displays the value in .1 and prints a newline
+(3180)   :1 <- a 32-bit number from the user
+(3189)   :1 <- a 32-bit number from the user, with an error message if
+         non-digits are encountered
+(3190)   Displays the value in :1
+(3199)   Displays the value in :1 and prints a newline
+(3990)   Initializes internal arrays.
+
+numio.i reserves the use of two arrays - ,3000 and ,3001 - for input
+and output respectively. Each array has one dimension of one element,
+and they are used to provide a getchar routine, at (3000), and a
+putchar routine, (3001). Note that (3001) expects that the character
+values have already been bit-reversed.
+
+The arrays are initialized by routine (3990); this should be called
+before using any other routines in this library.
+
+Routines (3010) and (3020) provide line input capabilities. The
+routines write in characters until they see a newline (or
+end-of-file), and store them in ,1. They are called with .1 being the
+number of characters to save; any input after that is thrown
+away. (Already they're better than C's gets()!)
+
+(3010) returns the actual number of characters that were input in .2,
+and .3 is set to #2 if characters were lost (i.e., if .2 is longer
+than .1). I decided to add .3, even though the caller could check for
+this themselves, as inequal comparisons are a bit painful in INTERCAL.
+Or, to be accurate, they're more painful than equal comparisons. Note
+also that if .1 is #0, the routine becomes a press-Enter-to-continue
+type of function, and ,1 need not actually be defined.
+
+(3020) is a filtering, or translating, input routine. When called, the
+array ,2 should contain a set of "approved" characters that are
+expected to be in the input, and .2 should contain the number of
+characters in ,2. As input is retrieved, the routine tries to look up
+each character in ,2. If the character is found, the routine stores in
+,1 the index of the character instead. (Otherwise the actual character
+number is stored, as with (3010).) Upon return, .3 has the number of
+characters that were input, and .4 is set to #2 if characters were
+lost OR if any characters in the input were not in the set of approved
+characters.
+
+The remaining routines are for doing "wimpmode"-style I/O - or in
+other words, the C-INTERCAL equivalent of atoi and itoa. (3080) and
+(3090) translate the ASCII input as a number (yes, a number as in
+[0-9]*), and (3090) and (3190) do the same for displaying numbers in
+ASCII. (By the way, the routines can also be made to support EBCDIC:
+simply replace #3 with #15 on lines 119, 159, and 185.)
+
+Each routine also has a "niner" variation. For itoa, (3099) and (3190)
+print a newline at the end of the number. In the case of atoi, (3089)
+and (3189) make sure that the number ends with a newline. In other
+words, they ensure there are no other non-numeric characters in the
+input line. If there are, a typically snide INTERCAL error message is
+displayed. (The regular versions work like C's atoi in that they
+return as soon as they see any non-digit.)
+
+There's not too much to note about these routines. The atoi routines
+use the shift-and-add trick to avoid multiplying by 10, so they should
+be pretty efficient (snort). itoa has no such shortcuts, and the
+routines use modified division routines which also returns the
+remainder. The 16-bit version is at (2030), and is the familiar one
+created by Louis Howell, copied from lib2.i. The 32-bit version is at
+(2530), and is just a copy of the standard library routine without the
+lines that throw away the remainder at the end.
+
+Note also that for these routines to work properly, they must be used
+more or less exclusively in regards to other array I/O. Otherwise, the
+getchar and putchar subroutines will get out of sync with the
+Turing-text character loop. If you do want to do other I/O while using
+these routines, you can use (3000) and (3001) as a getchar and
+putchar. Or, you can simply re-initialize the ,3000 and/or ,3001
+values after you are done, by storing in them the bit-reversed ASCII
+value of the last character that you wrote in and/or read out. For
+example, if you READ OUT some strings and the last thing to be printed
+was a newline, then:
+
+       DO ,3001SUB#1 <- #80
+
+would then allow you to safely call the itoa routines.
diff --git a/pit/lib/numio.i b/pit/lib/numio.i
new file mode 100644 (file)
index 0000000..e75f19d
--- /dev/null
@@ -0,0 +1,304 @@
+       PLEASE USE THE AUTHORIZED CHANNELS
+
+(3000) DO STASH .2 + .3 + .5
+       DO .2 <- ,3000SUB#1
+       PLEASE WRITE IN ,3000
+       DO .1 <- ,3000SUB#1
+       DO .5 <- '?".1~#256"$#2'~#3
+       DO (3008) NEXT
+       DO (1000) NEXT
+       DO .1 <- .3~#255
+       DO ,3000SUB#1 <- .1
+       DO (3009) NEXT
+(3008) DO (1001) NEXT
+(3009) DO RETRIEVE .2 + .3 + .5
+       PLEASE RESUME #2
+
+(3001) DO STASH .1 + .3
+       DO .1 <- ,3001SUB#1
+       DO (1010) NEXT
+       DO ,3001SUB#1 <- .3~#255
+       PLEASE READ OUT ,3001
+       DO ,3001SUB#1 <- .2
+       DO .1 <- .2
+       DO RETRIEVE .1 + .3
+       PLEASE RESUME #1
+
+(3010) PLEASE STASH .1 + .4 + .5
+       PLEASE DO (1020) NEXT
+       DO .2 <- #0
+       DO .3 <- #2
+       DO .4 <- .1
+       DO (3012) NEXT
+(3011) DO (1001) NEXT
+(3012) PLEASE FORGET #1
+       DO (3000) NEXT
+       DO .5 <- '?"?.1~#256"$#2'~#3
+       DO (3013) NEXT
+       DO .5 <- '?"'#65535~"'?.1$#10'~#21845"'~#1"$#1'~#3
+       DO (3013) NEXT
+       DO .5 <- .1
+       DO .1 <- .2
+       PLEASE DO (1020) NEXT
+       DO .2 <- .1
+       DO .1 <- .5
+       DO .5 <- .3
+       DO (3011) NEXT
+       DO .5 <- '?"'#65535~"'?.2$.4'~'#0$#65535'"'~#1"$#1'~#3
+       DO .3 <- .5
+       DO (3011) NEXT
+       PLEASE DO ,1SUB.2 <- .1
+       DO (3012) NEXT
+(3013) DO (1001) NEXT
+       PLEASE RETRIEVE .1 + .4 + .5
+       PLEASE DO .3 <- '?.3$#3'~#5
+       PLEASE RESUME #2
+
+(3020) PLEASE STASH .1 + .5 + .6 + .7
+       DO (1020) NEXT
+       DO .3 <- #0
+       DO .4 <- #6
+       DO .6 <- .1
+       DO (3022) NEXT
+(3021) DO (1001) NEXT
+(3022) PLEASE FORGET #1
+       DO (3000) NEXT
+       DO .5 <- '?"?.1~#256"$#2'~#3
+       DO (3023) NEXT
+       DO .5 <- '?"'#65535~"'?.1$#10'~#21845"'~#1"$#1'~#3
+       DO (3023) NEXT
+       DO .7 <- .1
+       DO .1 <- .3
+       PLEASE DO (1020) NEXT
+       DO .3 <- .1
+       DO .5 <- .4~#3
+       DO (3021) NEXT
+       DO .5 <- '?"'#65535~"'?.3$.6'~'#0$#65535'"'~#1"$#1'~#3
+       DO .4 <- !4$.5'~#37
+       DO (3021) NEXT
+(3027) DO .1 <- #0
+       PLEASE COME FROM (3024)
+       PLEASE DO (1020) NEXT
+       DO .5 <- '?"'#65535~"'?.7$",2SUB.1"'~#21845"'~#1"$#1'~#3
+       DO (3025) NEXT
+       PLEASE COME FROM (3027)
+       DO .5 <- '?"'#65535~"'?.1$.2'~'#0$#65535'"'~#1"$#1'~#3
+(3024) DO (3026) NEXT
+(3026) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO ,1SUB.3 <- .7
+       DO .4 <- .4~#3
+       DO (3022) NEXT
+(3025) DO (1001) NEXT
+       PLEASE FORGET #1
+       PLEASE DO ,1SUB.3 <- .1
+       DO (3022) NEXT
+(3023) DO (1001) NEXT
+       PLEASE RETRIEVE .1 + .5 + .6 + .7
+       DO .4 <- '?#2$.&4'~#6
+       PLEASE RESUME #2
+
+(3089) PLEASE ABSTAIN FROM (3087)
+(3080) PLEASE STASH .2 + .3 + .4
+       DO .3 <- #0
+       DO (3081) NEXT
+(3087) DO (3088) NEXT
+       PLEASE REINSTATE (3087)
+       DO .4 <- '?.1$#10'~'#0$#65535'
+       DO .4 <- .4~.4
+       DO (3085) NEXT
+(3998) DOES "ENTER A NUMBER" MEAN SOMETHING ELSE WHERE YOU COME FROM?
+(3085) DO (3086) NEXT
+(3088) PLEASE FORGET #1
+       DO .1 <- .3
+       PLEASE RETRIEVE .2 + .3 + .4
+       PLEASE RESUME #1
+(3086) PLEASE RESUME '?.V4$#1'~#3
+(3081) DO COME FROM (3082)
+       DO (3000) NEXT
+       DO .4 <- '?".1~#240"$#3'~#85
+       DO .4 <- '".4~.4"~#1'$'&".1~#8"$".V1~#2"'
+       DO (3086) NEXT
+       DO .4 <- .3~#57344
+       DO .4 <- .4~.4
+       DO (3083) NEXT
+       DO (1999) NEXT
+(3083) DO (3086) NEXT
+       PLEASE FORGET #1
+       DO .4 <- .1
+       DO .2 <- !3$#0'~'#32767$#1'
+       DO .1 <- !2$#0'~'#16383$#3'
+       DO (1000) NEXT
+       DO .1 <- .3
+       DO .2 <- .4~#15
+(3082) DO (1000) NEXT
+
+(3090) PLEASE ABSTAIN FROM (3097)
+(3099) PLEASE STASH .1 + .2 + .3 + .4
+       DO .2 <- #256
+       PLEASE STASH .2
+       DO (3091) NEXT
+       DO (3095) NEXT
+       DO .2 <- #80
+(3097) DO (3001) NEXT
+       PLEASE REINSTATE (3097)
+       PLEASE RETRIEVE .1 + .2 + .3 + .4
+       PLEASE RESUME #1
+(3098) PLEASE RESUME '?"!1~.1'~#1"$#2'~#3
+(3091) DO COME FROM (3092)
+       DO .2 <- #10
+       DO (2030) NEXT
+       DO .2 <- .4
+       PLEASE STASH .2
+       DO .1 <- .3
+(3092) DO (3098) NEXT
+
+(3095) DO COME FROM (3094)
+       PLEASE RETRIEVE .2
+       DO (3093) NEXT
+       DO .2 <- .2$#3
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+(3094) DO (3001) NEXT
+(3093) PLEASE RESUME '?".2~#256"$#1'~#3
+
+(3189) PLEASE ABSTAIN FROM (3187)
+(3180) PLEASE STASH :2 + :3 + .1 + .4
+       DO :3 <- #0
+       PLEASE STASH :4
+       DO (3181) NEXT
+       PLEASE RETRIEVE :4
+(3187) DO (3188) NEXT
+       PLEASE REINSTATE (3187)
+       DO .4 <- '?.1$#10'~'#0$#65535'
+       DO .4 <- .4~.4
+       DO (3185) NEXT
+       DO (3998) NEXT
+(3185) DO (3186) NEXT
+(3188) PLEASE FORGET #1
+       DO :1 <- :3
+       PLEASE RETRIEVE :2 + :3 + .1 + .4
+       PLEASE RESUME #1
+(3186) PLEASE RESUME '?.V4$#1'~#3
+(3181) DO COME FROM (3182)
+       DO (3000) NEXT
+       DO .4 <- '?".1~#240"$#3'~#85
+       DO .4 <- '".4~.4"~#1'$'&".1~#8"$".V1~#2"'
+       DO (3186) NEXT
+       DO .4 <- :3~'#49152$#32768'
+       DO .4 <- .4~.4
+       DO (3183) NEXT
+       DO (1999) NEXT
+(3183) DO (3186) NEXT
+       PLEASE FORGET #1
+       DO :2 <- ':3~"#0$#65535"'$'"':3~"#32767$#0"'$#0"~"#32767$#1"'
+       DO :1 <- ':2~"#32767$#1"'$'"':2~"#0$#32767"'$#0"~"#32767$#1"'
+       DO (1500) NEXT
+       DO :1 <- :3
+       DO :2 <- .1~#15
+(3182) DO (1500) NEXT
+
+(3190) PLEASE ABSTAIN FROM (3197)
+(3199) PLEASE STASH :1 + :2 + :3 + :4 + .2 + .4
+       DO :2 <- #10
+       DO .2 <- #256
+       PLEASE STASH .2
+       DO (3191) NEXT
+       DO (3095) NEXT
+       DO .2 <- #80
+(3197) DO (3001) NEXT
+       PLEASE REINSTATE (3197)
+       PLEASE RETRIEVE :1 + :2 + :3 + :4 + .2 + .4
+       PLEASE RESUME #1
+(3198) PLEASE RESUME '?"':1~:1'~#1"$#2'~#3
+(3191) DO COME FROM (3192)
+       DO (2530) NEXT
+       DO .2 <- :4
+       PLEASE STASH .2
+       DO :1 <- :3
+(3192) DO (3198) NEXT
+
+(3990) PLEASE DO ,3000 <- #1
+       DO ,3000SUB#1 <- #0
+       PLEASE DO ,3001 <- #1
+       DO ,3001SUB#1 <- #0
+       PLEASE RESUME #1
+
+
+(2030) DO STASH .1 + .5
+       DO .3 <- #0
+       DO .5 <- '?"!2~.2'~#1"$#1'~#3
+       PLEASE DO (2031) NEXT
+       DO .4 <- #1
+       PLEASE DO (2033) NEXT
+(2033) DO FORGET #1
+       DO .5 <- '?".2~#32768"$#2'~#3
+       DO (2032) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       PLEASE DO .4 <- !4$#0'~'#32767$#1'
+       DO (2033) NEXT
+(2032) DO (1001) NEXT
+(2036) PLEASE FORGET #1
+        DO .5 <- '?.1$.2'~'#0$#65535'
+        DO .5 <- '?"'&"!2~.5'~'"?'?.5~.5'$#32768"~"#0$#65535"'"$
+                 ".5~.5"'~#1"$#2'~#3
+       DO (2034) NEXT
+       DO .5 <- .3
+       DO (1010) NEXT
+       PLEASE DO .1 <- .3
+        DO .3 <- 'V.4$.5'~'#0$#65535'
+       DO (2035) NEXT
+(2034) PLEASE DO (1001) NEXT
+(2035) DO FORGET #1
+       DO .5 <- "?'.4~#1'$#2"~#3
+       DO (2031) NEXT
+       DO .2 <- .2~#65534
+       DO .4 <- .4~#65534
+       PLEASE DO (2036) NEXT
+(2031) DO (1001) NEXT
+       PLEASE DO .4 <- .1
+       PLEASE RETRIEVE .1 + .5
+       PLEASE RESUME #2
+
+(2530) DO STASH :1 + :5 + .5
+       DO :3 <- #0
+       DO .5 <- '?"':2~:2'~#1"$#1'~#3
+       PLEASE DO (2531) NEXT
+       DO :4 <- #1
+       PLEASE DO (2533) NEXT
+(2533) DO FORGET #1
+       DO .5 <- '?":2~'#32768$#0'"$#2'~#3
+       DO (2532) NEXT
+       DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+          0'~'#32767$#1'"
+       PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767
+            $#0'"$#0'~'#32767$#1'"
+       DO (2533) NEXT
+(2532) DO (1001) NEXT
+(2536) PLEASE FORGET #1
+       DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"'
+            ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$
+            #65535'"'~'#0$#65535'"
+       DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535$
+            #65535"'~'#65535$#0'"$#32768'~'#0$#65535'"
+            $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"'
+            "$"':5~:5'~#1"'~#1"$#2'~#3
+       DO (2534) NEXT
+       DO :5 <- :3
+       DO (1510) NEXT
+       PLEASE DO :1 <- :3
+       DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"'
+            ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$
+            #65535'"'~'#0$#65535'"
+       DO (2535) NEXT
+(2534) PLEASE DO (1001) NEXT
+(2535) DO FORGET #1
+       DO .5 <- "?':4~#1'$#2"~#3
+       DO (2531) NEXT
+       DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'"
+       DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'"
+       PLEASE DO (2536) NEXT
+(2531) DO (1001) NEXT
+       DO :4 <- :1
+       PLEASE RETRIEVE :1 + :5 + .5
+       PLEASE RESUME #2
diff --git a/pit/lib/plus.i b/pit/lib/plus.i
new file mode 100644 (file)
index 0000000..436f14c
--- /dev/null
@@ -0,0 +1,16 @@
+(2000) PLEASE DO STASH .1 + .2 + .3
+       DO .2 <- #1
+       DO (2001) NEXT
+(2001) PLEASE FORGET #1
+       DO .3 <- "?!1~#1'$#1"~#3
+       DO (2002) NEXT
+       PLEASE DO .2 <- !2$#1'~'#65535$#1'
+       DO .1 <- .1~#65534
+       DO (2001) NEXT
+(2002) PLEASE DO (2003) NEXT
+       DO RETRIEVE .1
+       DO .3 <- .1
+       PLEASE DO .1 <- '?.2$.3'~'#0$#65535'
+       DO RETRIEVE .2 + .3
+       DO RESUME #2
+(2003) DO RESUME .3
diff --git a/pit/lib/syslib-orig.i b/pit/lib/syslib-orig.i
new file mode 100644 (file)
index 0000000..7536f03
--- /dev/null
@@ -0,0 +1,290 @@
+               PLEASE KNOCK BEFORE ENTERING
+
+       (1000)  PLEASE IGNORE .4
+               PLEASE ABSTAIN FROM (1005)
+       (1009)  DO STASH .1 + .2 + .5 + .6
+               DO .4 <- #1
+               DO (1004) NEXT
+       (1004)  PLEASE FORGET #1
+               DO .3 <- '?.1$.2'~'#0$#65535'
+               DO .6 <- '&.1$.2'~'#0$#65535'
+               PLEASE DO .5 <- "?!6~#32768'$#1"~#3
+               DO (1002) NEXT
+               DO .4 <- #2
+       (1005)  DO (1006) NEXT
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW
+       (1002)  DO (1001) NEXT
+       (1006)  PLEASE FORGET #1
+               DO .5 <- '?"!6~.6'~#1"$#1'~#3
+               DO (1003) NEXT
+               DO .1 <- .3
+               DO .2 <- !6$#0'~'#32767$#1'
+               DO (1004) NEXT
+       (1003)  DO (1001) NEXT
+               DO REINSTATE (1005)
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6
+               DO REMEMBER .4
+               PLEASE RESUME #2
+       (1001)  DO RESUME .5
+       (1010)  DO STASH .1 + .2 + .4
+               DO .4 <- .1
+               DO .1 <- '?.2$#65535'~'#0$#65535'
+               DO (1020) NEXT
+               PLEASE DO .2 <- .4
+               PLEASE DO (1009) NEXT
+               DO RETRIEVE .1 + .2 + .4
+               PLEASE RESUME #1
+       (1020)  DO STASH .2 + .3
+               DO .2 <- #1
+               PLEASE DO (1021) NEXT
+       (1021)  DO FORGET #1
+               DO .3 <- "?!1~.2'$#1"~#3
+               PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+               DO (1022) NEXT
+               DO .2 <- !2$#0'~'#32767$#1'
+               DO (1021) NEXT
+       (1023)  PLEASE RESUME .3
+       (1022)  DO (1023) NEXT
+               PLEASE RETRIEVE .2 + .3
+               PLEASE RESUME #2
+       (1030)  DO ABSTAIN FROM (1033)
+               PLEASE ABSTAIN FROM (1032)
+       (1039)  DO STASH :1 + .5
+               DO (1530) NEXT
+               DO .3 <- :1~#65535
+               PLEASE DO .5 <- :1~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1031) NEXT
+       (1032)  DO (1033) NEXT
+               DO (1999) NEXT
+       (1031)  DO (1001) NEXT
+       (1033)  DO .4 <- .5
+               DO REINSTATE (1032)
+               PLEASE REINSTATE (1033)
+               DO RETRIEVE :1 + .5
+               PLEASE RESUME #2
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3
+               DO .2 <- #0
+               DO (1520) NEXT
+               DO STASH :1
+               PLEASE RETRIEVE .2
+               DO .1 <- .2
+               DO .2 <- #0
+               PLEASE DO (1520) NEXT
+               DO :2 <- :1
+               DO RETRIEVE .1 + .2 + :1
+               DO (1550) NEXT
+               PLEASE DO .3 <- :3
+               DO RETRIEVE :1 + :2 + :3
+               DO RESUME #1
+       (1050)  PLEASE STASH :2 + :3 + .5
+               DO :2 <- .1
+               PLEASE DO (1550) NEXT
+               DO .5 <- :3~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1051) NEXT
+               DO (1999) NEXT
+       (1051)  DO (1001) NEXT
+               DO .2 <- :3
+               PLEASE RETRIEVE :2 + :3 + .5
+               DO RESUME #2
+       (1500)  PLEASE ABSTAIN FROM (1502)
+               PLEASE ABSTAIN FROM (1506)
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~#65535
+               DO (1009) NEXT
+               DO .5 <- .3
+               PLEASE DO .6 <- .4
+               DO .1 <- :1~'#65280$#65280'
+               DO .2 <- :2~'#65280$#65280'
+               DO (1009) NEXT
+               DO .1 <- .3
+               PLEASE DO (1503) NEXT
+               DO .6 <- .4
+               DO .2 <- #1
+               DO (1009) NEXT
+               DO .1 <- .3
+               DO (1501) NEXT
+       (1504)  PLEASE RESUME .6
+       (1503)  DO (1504) NEXT
+       (1501)  DO .2 <- .5
+               DO .5 <- '?"'&.6$.4'~#1"$#2'~#3
+               DO (1505) NEXT
+       (1506)  DO (1502) NEXT
+               PLEASE DO (1999) NEXT
+       (1505)  DO (1001) NEXT
+       (1502)  DO :4 <- .5
+               DO (1520) NEXT
+               DO :3 <- :1
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO REINSTATE (1502)
+               DO REINSTATE (1506)
+               PLEASE RESUME #3
+       (1510)  DO STASH :1 + :2 + :4
+               DO :1 <- "'?":2~'#65535$#0'"$#65535'~'#0$#6553
+           5'"$"'?":2~'#0$#65535'"$#65535'~'#0$#65535
+           '"
+               DO :2 <- #1
+               DO (1509) NEXT
+               PLEASE RETRIEVE :1
+               DO :2 <- :3
+               PLEASE DO (1509) NEXT
+               DO RETRIEVE :2 + :4
+               PLEASE RESUME #1
+       (1520)  PLEASE STASH .3 + .4
+               DO .3 <- .1~#43690
+               DO (1525) NEXT
+               PLEASE DO .4 <- 'V.3$".2~#43690"'~'#0$#65535'
+               DO .3 <- .1~#21845
+               PLEASE DO (1525) NEXT
+               DO :1 <- .4$"'V.3$".2~#21845"'~'#0$#65535'"
+               PLEASE RETRIEVE .3 + .4
+               DO RESUME #1
+       (1525)  DO .3 <- '"'"'"!3$#0'~'#32767$#1'"$#0'~'#32767
+           $#1'"$#0'~'#16383$#3'"$#0'~'#4095$#15'
+               PLEASE RESUME #1
+       (1530)  DO STASH :2 + :3 + .3 + .5
+               DO :1 <- #0
+               DO :2 <- .2
+               DO .3 <- #1
+               DO (1535) NEXT
+       (1535)  PLEASE FORGET #1
+               DO .5 <- "?!1~.3'$#1"~#3
+               DO (1531) NEXT
+               DO (1500) NEXT
+               DO :1 <- :3
+               PLEASE DO (1533) NEXT
+       (1531)  PLEASE DO (1001) NEXT
+       (1533)  DO FORGET #1
+               DO .3 <- !3$#0'~'#32767$#1'
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+           0'~'#32767$#1'"
+               PLEASE DO .5 <- "?!3~.3'$#1"~#3
+               DO (1532) NEXT
+               DO (1535) NEXT
+       (1532)  DO (1001) NEXT
+               PLEASE RETRIEVE :2 + :3 + .3 + .5
+               DO RESUME #2
+       (1540)  PLEASE ABSTAIN FROM (1541)
+               DO ABSTAIN FROM (1542)
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~'#65280$#65280'
+               DO .5 <- :1~'#65280$#65280'
+               DO (1530) NEXT
+               DO :3 <- :1
+               DO .2 <- :2~#65535
+               PLEASE DO (1530) NEXT
+               DO :5 <- :1
+               DO .1 <- .5
+               DO (1530) NEXT
+               DO :4 <- :1
+               PLEASE DO :1 <- ":3~'#65280$#65280'"$":5~'#652
+           80$#65280'"
+               DO .5 <- ':1~:1'~#1
+               DO .2 <- :2~'#65280$#65280'
+               DO (1530) NEXT
+               PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3
+               DO .1 <- :3~#65535
+               DO .2 <- #0
+               DO (1520) NEXT
+               PLEASE DO :2 <- :1
+               PLEASE DO .1 <- :4~#65535
+               DO (1520) NEXT
+               DO (1509) NEXT
+               DO .5 <- !5$":4~#3"'~#15
+               DO :1 <- :3
+               DO :2 <- :5
+               DO (1509) NEXT
+               PLEASE DO .5 <- !5$":4~#3"'~#63
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               PLEASE RETRIEVE :4
+       (1541)  DO :4 <- .5
+               DO (1543) NEXT
+       (1542)  DO (1544) NEXT
+               PLEASE DO (1999) NEXT
+       (1543)  DO (1001) NEXT
+       (1544)  DO REINSTATE (1541)
+               PLEASE REINSTATE (1542)
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5
+               DO RESUME #2
+       (1550)  DO STASH :1 + :4 + :5 + .5
+               DO :3 <- #0
+               DO .5 <- '?"':2~:2'~#1"$#1'~#3
+               PLEASE DO (1551) NEXT
+               DO :4 <- #1
+               PLEASE DO (1553) NEXT
+       (1553)  DO FORGET #1
+               DO .5 <- '?":2~'#32768$#0'"$#2'~#3
+               DO (1552) NEXT
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+                  0'~'#32767$#1'"
+               PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767
+                    $#0'"$#0'~'#32767$#1'"
+               DO (1553) NEXT
+       (1552)  DO (1001) NEXT
+       (1556)  PLEASE FORGET #1
+               DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"'
+                    ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535~
+                    #65535"'~'#65535$#0'"$#32768'~'#0$#65535'"
+                    $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"'
+                    "$"':5~:5'~#1"'~#1"$#2'~#3
+               DO (1554) NEXT
+               DO :5 <- :3
+               DO (1510) NEXT
+               PLEASE DO :1 <- :3
+               DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"'
+                    ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO (1555) NEXT
+       (1554)  PLEASE DO (1001) NEXT
+       (1555)  DO FORGET #1
+               DO .5 <- "?':4~#1'$#2"~#3
+               DO (1551) NEXT
+               DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'"
+               DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'"
+               PLEASE DO (1556) NEXT
+       (1551)  DO (1001) NEXT
+               PLEASE RETRIEVE :1 + :4 + :5 + .5
+               PLEASE RESUME #2
+       (1900)  DO STASH .2 + .3 + .5
+               DO .1 <- #0
+               DO .2 <- #1
+               PLEASE DO (1901) NEXT
+       (1901)  DO FORGET #1
+               DO %50 .1 <- 'V.1$.2'~'#0$#65535'
+               DO .2 <- !2$#0'~'#32767$#1'
+               PLEASE DO .5 <- "?!2~.2'$#1"~#3
+               DO (1902) NEXT
+               DO (1901) NEXT
+       (1902)  DO (1001) NEXT
+               DO RETRIEVE .2 + .3 + .5
+               PLEASE RESUME #2
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3
+               DO .3 <- #65524
+               DO :1 <- #6
+               DO (1911) NEXT
+               PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE
+       (1912)  DO (1001) NEXT
+       (1911)  DO FORGET #1
+               PLEASE DO (1900) NEXT
+               DO :2 <- .1
+               DO (1500) NEXT
+               PLEASE DO :1 <- :3
+               DO .1 <- .3
+               DO (1020) NEXT
+               PLEASE DO .3 <- .1
+               DO .5 <- '?"!3~.3'~#1"$#2'~#3
+               DO (1912) NEXT
+               DO .1 <- #12
+               PLEASE DO (1050) NEXT
+               DO RETRIEVE .1
+               DO (1530) NEXT
+               DO :2 <- #32768
+               DO (1500) NEXT
+               PLEASE DO .2 <- :3~'#65280$#65280'
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3
+               DO RESUME #1
diff --git a/pit/lib/syslib.3i b/pit/lib/syslib.3i
new file mode 100644 (file)
index 0000000..44b3ba9
--- /dev/null
@@ -0,0 +1,323 @@
+               PLEASE KNOCK THREE TIMES BEFORE ENTERING\r
+\r
+       (1000)  PLEASE IGNORE .4\r
+               PLEASE ABSTAIN FROM (1005)\r
+       (1009)  DO STASH .1 + .2 + .5 + .6\r
+               DO .4 <- #1\r
+               DO (1004) NEXT\r
+       (1004)  PLEASE FORGET #1\r
+               DO .3 <- '^.1$.2'~'#0$#29524'\r
+               DO .6 <- '?"'V"'&.1$.2'~'#0$#29524'"$#29524'\r
+                    ~'#0$#29524'"$#29524'~'#0$#29524'\r
+               PLEASE DO .5 <- 'V".6~#39366"$#1'~#1\r
+               DO (1002) NEXT\r
+               DO .4 <- #2\r
+       (1005)  DO (1006) NEXT\r
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW\r
+       (1002)  DO (1001) NEXT\r
+       (1006)  PLEASE FORGET #1\r
+               DO .5 <- 'V"!6~.6'~#2"$#1'~#1\r
+               DO (1003) NEXT\r
+               DO .1 <- .3\r
+               DO .2 <- !6$#0'~'#9841$#1'\r
+               DO (1004) NEXT\r
+       (1003)  DO (1001) NEXT\r
+               DO REINSTATE (1005)\r
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6\r
+               DO REMEMBER .4\r
+               PLEASE RESUME #2\r
+       (1001)  DO RESUME .5\r
+       (1010)  DO STASH .1 + .2 + .4\r
+               DO .4 <- .1\r
+               DO .1 <- '?#59048$.2'~'#0$#29524'\r
+               DO (1020) NEXT\r
+               PLEASE DO .2 <- .4\r
+               PLEASE DO (1009) NEXT\r
+               DO RETRIEVE .1 + .2 + .4\r
+               PLEASE RESUME #1\r
+       (1020)  DO STASH .2 + .3\r
+               DO .2 <- #1\r
+               PLEASE DO (1021) NEXT\r
+       (1021)  DO FORGET #1\r
+               DO .3 <- 'V"!1~.2'$#1"'~#1\r
+               PLEASE DO .1 <- '^.1$.2'~'#0$#29524'\r
+               DO (1022) NEXT\r
+               DO .2 <- !2$#0'~'#9841$#1'\r
+               DO (1021) NEXT\r
+       (1023)  PLEASE RESUME .3\r
+       (1022)  DO (1023) NEXT\r
+               PLEASE RETRIEVE .2 + .3\r
+               PLEASE RESUME #2\r
+       (1030)  DO ABSTAIN FROM (1033)\r
+               PLEASE ABSTAIN FROM (1032)\r
+       (1039)  DO STASH :1 + .5\r
+               DO (1530) NEXT\r
+               DO .3 <- :1~#29524\r
+               PLEASE DO .5 <- :1~'#29403$#29403'\r
+               DO .5 <- 'V"!5~.5'~#2"$#1'~#1\r
+               DO (1031) NEXT\r
+       (1032)  DO (1033) NEXT\r
+               DO (1999) NEXT\r
+       (1031)  DO (1001) NEXT\r
+       (1033)  DO .4 <- .5\r
+               DO REINSTATE (1032)\r
+               PLEASE REINSTATE (1033)\r
+               DO RETRIEVE :1 + .5\r
+               PLEASE RESUME #2\r
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               DO STASH :1\r
+               PLEASE RETRIEVE .2\r
+               DO .1 <- .2\r
+               DO .2 <- #0\r
+               PLEASE DO (1520) NEXT\r
+               DO :2 <- :1\r
+               DO RETRIEVE .1 + .2 + :1\r
+               DO (1550) NEXT\r
+               PLEASE DO .3 <- :3\r
+               DO RETRIEVE :1 + :2 + :3\r
+               DO RESUME #1\r
+       (1050)  PLEASE STASH :2 + :3 + .5\r
+               DO :2 <- .1\r
+               PLEASE DO (1550) NEXT\r
+               DO .5 <- :3~'#29403$#29403'\r
+               DO .5 <- 'V"!5~.5'~#2"$#1'~#1\r
+               DO (1051) NEXT\r
+               DO (1999) NEXT\r
+       (1051)  DO (1001) NEXT\r
+               DO .2 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .5\r
+               DO RESUME #2\r
+       (1500)  PLEASE ABSTAIN FROM (1502)\r
+               PLEASE ABSTAIN FROM (1506)\r
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO .1 <- :1~#29524\r
+               PLEASE DO .2 <- :2~#29524\r
+               DO (1009) NEXT\r
+               DO .5 <- .3\r
+               PLEASE DO .6 <- .4\r
+               DO .1 <- :1~'#29403$#29403'\r
+               DO .2 <- :2~'#29403$#29403'\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               PLEASE DO (1503) NEXT\r
+               DO .6 <- .4\r
+               DO .2 <- #1\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               DO (1501) NEXT\r
+       (1504)  PLEASE RESUME .6\r
+       (1503)  DO (1504) NEXT\r
+       (1501)  DO .2 <- .5\r
+               DO .5 <- '&.6$.4'\r
+               DO (1505) NEXT\r
+       (1506)  DO (1502) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1505)  DO (1001) NEXT\r
+       (1502)  DO :4 <- .5\r
+               DO (1520) NEXT\r
+               DO :3 <- :1\r
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO REINSTATE (1502)\r
+               DO REINSTATE (1506)\r
+               PLEASE RESUME #3\r
+       (1510)  DO STASH :1 + :2 + :4\r
+               DO :1 <- "'?#59048$":2~'#29524$#0'"'~'#0$#29524'"\r
+                    $"'?#59048$":2~'#0$#29524'"'~'#0$#29524'"\r
+               DO :2 <- #1\r
+               DO (1509) NEXT\r
+               PLEASE RETRIEVE :1\r
+               DO :2 <- :3\r
+               PLEASE DO (1509) NEXT\r
+               DO RETRIEVE :2 + :4\r
+               PLEASE RESUME #1\r
+       (1520)  PLEASE STASH .3 + .4\r
+               DO .3 <- .1~#22143\r
+               DO (1525) NEXT\r
+               PLEASE DO .4 <- 'V.3$".2~#22143"'~'#0$#29524'\r
+               DO .3 <- .1~#7381\r
+               PLEASE DO (1525) NEXT\r
+               DO :1 <- .4$"'V.3$".2~#7381"'~'#0$#29524'"\r
+               PLEASE RETRIEVE .3 + .4\r
+               DO RESUME #1\r
+       (1525)  DO .3 <- '"'"!3$#0'~'#9841$#1'"$#0'~'#3280$#4'"\r
+                    $#0'~'#3280$#4'\r
+               PLEASE RESUME #1\r
+       (1530)  DO STASH :2 + :3 + .3 + .5\r
+               DO :1 <- #0\r
+               DO :2 <- .2\r
+               DO .3 <- #1\r
+               DO (1535) NEXT\r
+       (1535)  PLEASE FORGET #1\r
+               DO .5 <- '@"'^".1~.3"$#7'~#4"$#2'~#10\r
+               DO (1534) NEXT\r
+               DO (1500) NEXT\r
+               DO :1 <- :3\r
+               DO (1536) NEXT\r
+       (1534)  DO (1531) NEXT\r
+       (1536)  DO (1500) NEXT\r
+               DO :1 <- :3\r
+               PLEASE DO (1533) NEXT\r
+       (1531)  PLEASE DO (1001) NEXT\r
+       (1533)  DO FORGET #2\r
+               DO .3 <- !3$#0'~'#9841$#1'\r
+               DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0'\r
+                    ~'#9841$#1'"\r
+               PLEASE DO .5 <- 'V"!3~.3'~#2"$#1'~#1\r
+               DO (1532) NEXT\r
+               DO (1535) NEXT\r
+       (1532)  DO (1001) NEXT\r
+               PLEASE RETRIEVE :2 + :3 + .3 + .5\r
+               DO RESUME #2\r
+       (1540)  PLEASE ABSTAIN FROM (1541)\r
+               DO ABSTAIN FROM (1542)\r
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5\r
+               DO .1 <- :1~#29524\r
+               PLEASE DO .2 <- :2~'#29403$#29403'\r
+               DO .5 <- :1~'#29403$#29403'\r
+               DO (1530) NEXT\r
+               DO :3 <- :1\r
+               DO .2 <- :2~#29524\r
+               PLEASE DO (1530) NEXT\r
+               DO :5 <- :1\r
+               DO .1 <- .5\r
+               DO (1530) NEXT\r
+               DO :4 <- :1\r
+               PLEASE DO :1 <- ":3~'#29403$#29403'"$":4~'#29403\r
+                    $#29403'"\r
+               DO .5 <- ':1~:1'~#2\r
+               DO .2 <- :2~'#29403$#29403'\r
+               DO (1530) NEXT\r
+               PLEASE DO .5 <- '"':1~:1'~#2"$.5'~#4\r
+               DO .1 <- :3~#29524\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               PLEASE DO :2 <- :1\r
+               PLEASE DO .1 <- :4~#29524\r
+               DO (1520) NEXT\r
+               DO (1509) NEXT\r
+               DO .5 <- !5$":4~#1"'~#31\r
+               DO :1 <- :3\r
+               DO :2 <- :5\r
+               DO (1509) NEXT\r
+               PLEASE DO .5 <- !5$":4~#1"'~#274\r
+               DO .5 <- !5~.5'~#1\r
+               PLEASE RETRIEVE :4\r
+       (1541)  DO :4 <- .5\r
+               DO (1543) NEXT\r
+       (1542)  DO (1544) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1543)  DO (1001) NEXT\r
+       (1544)  DO REINSTATE (1541)\r
+               PLEASE REINSTATE (1542)\r
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1550)  DO STASH :1 + :4 + :5 + :6 + .5\r
+               DO :3 <- #0\r
+               DO .5 <- 'V"':2~:2'~#2"$#1'~#1\r
+               PLEASE DO (1551) NEXT\r
+               DO :4 <- #1\r
+               PLEASE DO (1553) NEXT\r
+       (1553)  DO FORGET #1\r
+               DO .5 <- '?"':2~"#39366$#0"'"$#1'~#1\r
+               DO (1552) NEXT\r
+               DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0'\r
+                    ~'#9841$#1'"\r
+               PLEASE DO :4 <- ":4~'#0$#29524'"$"'":4~'#9841\r
+                    $#0'"$#0'~'#9841$#1'"\r
+               DO (1553) NEXT\r
+       (1552)  DO (1001) NEXT\r
+       (1556)  PLEASE FORGET #1\r
+               DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1\r
+                    ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$\r
+                    "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$\r
+                    #29524'"'~'#0$#29524'"'~'#0$#29524'"\r
+               DO :5 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"'\r
+                    ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$\r
+                    #29524'"'~'#0$#59048'"\r
+               DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#29524$#0'"$\r
+                    #19683'~'#0$#29524'"$"'?:5~:5'~'#9841$#0'"'\r
+                    ~'#19683$#9841'"$"'?:5~:5'~'#0$#29524'"'"\r
+                    ~#1'$#1"~#1\r
+               DO (1554) NEXT\r
+               DO :5 <- :3\r
+               DO (1510) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1\r
+                    ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$\r
+                    "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$\r
+                    #29524'"'~'#0$#29524'"'~'#0$#29524'"\r
+               DO :3 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"'\r
+                    ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$\r
+                    #29524'"'~'#0$#59048'"\r
+               DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#29524$#0'"$\r
+                    #19683'~'#0$#29524'"$"'?:3~:3'~'#9841$#0'"'\r
+                    ~'#19683$#9841'"$"'?:3~:3'~'#0$#29524'"'"\r
+                    ~#1'$#1"~#1\r
+               DO (1557) NEXT\r
+               DO (1510) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO :3 <- "'V":4~'#59048$#0'"$":5~'#29524$#0'"'\r
+                    ~'#0$#29524'"$"'V":4~'#0$#59048'"$":5~'#0$\r
+                    #29524'"'~'#0$#29524'"\r
+               PLEASE DO (1555) NEXT\r
+       (1557)  PLEASE DO (1001) NEXT\r
+               PLEASE FORGET #1\r
+               DO :3 <- "'V":4~'#29524$#0'"$":5~'#29524$#0'"'\r
+                    ~'#0$#29524'"$"'V":4~'#0$#29524'"$":5~'#0$\r
+                    #29524'"'~'#0$#29524'"\r
+               PLEASE DO (1555) NEXT\r
+       (1554)  PLEASE DO (1001) NEXT\r
+       (1555)  PLEASE FORGET #1\r
+               DO .5 <- "?':4~#2'$#1"~#1\r
+               DO (1551) NEXT\r
+               DO :2 <- :2~'#29524$#29523'\r
+               DO :4 <- :4~'#29524$#29523'\r
+               PLEASE DO (1556) NEXT\r
+       (1551)  DO (1001) NEXT\r
+               PLEASE RETRIEVE :1 + :4 + :5 + :6 + .5\r
+               PLEASE RESUME #2\r
+       (1900)  DO STASH .2 + .5\r
+               DO .1 <- #0\r
+               DO .2 <- #1\r
+               PLEASE DO (1901) NEXT\r
+       (1901)  DO FORGET #1\r
+               DO %50 (1904) NEXT\r
+               DO %50 (1901) NEXT\r
+               PLEASE DO (1903) NEXT\r
+       (1904)  DO .1 <- '^.1$.2'~'#0$#29524'\r
+               DO %50 .1 <- '^.1$.2'~'#0$#29524'\r
+       (1903)  PLEASE FORGET #1\r
+               DO .2 <- !2$#0'~'#9841$#1'\r
+               PLEASE DO .5 <- 'V"!2~.2'~#2"$#1'~#1\r
+               DO (1902) NEXT\r
+               DO (1901) NEXT\r
+       (1902)  DO (1001) NEXT\r
+               DO RETRIEVE .2 + .5\r
+               PLEASE RESUME #2\r
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3\r
+               DO .3 <- #59037\r
+               DO :1 <- #6\r
+               DO (1911) NEXT\r
+               PLEASE NOTE THAT YOU CAN'T GET THREE FROM HERE\r
+       (1912)  DO (1001) NEXT\r
+       (1911)  DO FORGET #1\r
+               PLEASE DO (1900) NEXT\r
+               DO :2 <- .1\r
+               DO (1500) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .1 <- .3\r
+               DO (1020) NEXT\r
+               PLEASE DO .3 <- .1\r
+               DO .5 <- '?"!3~.3'~#2"$#1'~#1\r
+               DO (1912) NEXT\r
+               DO .1 <- #12\r
+               PLEASE DO (1050) NEXT\r
+               DO RETRIEVE .1\r
+               DO (1530) NEXT\r
+               DO :2 <- #29524\r
+               DO (1500) NEXT\r
+               PLEASE DO .2 <- :3~'#29403$#29403'\r
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3\r
+               DO RESUME #1\r
diff --git a/pit/lib/syslib.4i b/pit/lib/syslib.4i
new file mode 100644 (file)
index 0000000..1710a1f
--- /dev/null
@@ -0,0 +1,354 @@
+               PLEASE KNOCK TWICE TWO TIMES BEFORE ENTERING\r
+\r
+       (1000)  PLEASE IGNORE .4\r
+               PLEASE ABSTAIN FROM (1005)\r
+       (1009)  DO STASH .1 + .2 + .5 + .6\r
+               DO .4 <- #1\r
+               DO (1004) NEXT\r
+       (1004)  PLEASE FORGET #1\r
+               DO .3 <- '^.1$.2'~'#0$#21845'\r
+               DO .6 <- '?"'V"'&.1$.2'~'#0$#21845'"$"'^"'@.1$\r
+                     .2'~'#0$#21845'"$#21845'~'#0$#43690'"'\r
+                     ~'#0$#21845'"$#43690'~'#0$#21845'\r
+               PLEASE DO .5 <- '?".6~#49152"$#4'~#4\r
+               DO (1002) NEXT\r
+               DO .4 <- #2\r
+       (1005)  DO (1006) NEXT\r
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW\r
+       (1002)  DO (1001) NEXT\r
+       (1006)  PLEASE FORGET #1\r
+               DO .5 <- '?"!6~.6'~#3"$#4'~#4\r
+               DO (1003) NEXT\r
+               DO .1 <- .3\r
+               DO .2 <- !6$#0'~'#5461$#1'\r
+               DO (1004) NEXT\r
+       (1003)  DO (1001) NEXT\r
+               DO REINSTATE (1005)\r
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6\r
+               DO REMEMBER .4\r
+               PLEASE RESUME #2\r
+       (1001)  DO RESUME .5\r
+       (1010)  DO STASH .1 + .2 + .4\r
+               DO .4 <- .1\r
+               DO .1 <- '?#65535$.2'~'#0$#21845'\r
+               DO (1020) NEXT\r
+               PLEASE DO .2 <- .4\r
+               PLEASE DO (1009) NEXT\r
+               DO RETRIEVE .1 + .2 + .4\r
+               PLEASE RESUME #1\r
+       (1020)  DO STASH .2 + .3\r
+               DO .2 <- #1\r
+               PLEASE DO (1021) NEXT\r
+       (1021)  DO FORGET #1\r
+               DO .3 <- '?"'V".1~.2"$#2'~#1"$#1'~#1\r
+               PLEASE DO .1 <- '^.1$.2'~'#0$#21845'\r
+               DO (1022) NEXT\r
+               DO .2 <- !2$#0'~'#5461$#1'\r
+               DO (1021) NEXT\r
+       (1023)  PLEASE RESUME .3\r
+       (1022)  DO (1023) NEXT\r
+               PLEASE RETRIEVE .2 + .3\r
+               PLEASE RESUME #2\r
+       (1030)  DO ABSTAIN FROM (1033)\r
+               PLEASE ABSTAIN FROM (1032)\r
+       (1039)  DO STASH :1 + .5\r
+               DO (1530) NEXT\r
+               DO .3 <- :1~#21845\r
+               PLEASE DO .5 <- :1~'#21760$#21760'\r
+               DO .5 <- '?"!5~.5'~#3"$#4'~#4\r
+               DO (1031) NEXT\r
+       (1032)  DO (1033) NEXT\r
+               DO (1999) NEXT\r
+       (1031)  DO (1001) NEXT\r
+       (1033)  DO .4 <- .5\r
+               DO REINSTATE (1032)\r
+               PLEASE REINSTATE (1033)\r
+               DO RETRIEVE :1 + .5\r
+               PLEASE RESUME #2\r
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               DO STASH :1\r
+               PLEASE RETRIEVE .2\r
+               DO .1 <- .2\r
+               DO .2 <- #0\r
+               PLEASE DO (1520) NEXT\r
+               DO :2 <- :1\r
+               DO RETRIEVE .1 + .2 + :1\r
+               DO (1550) NEXT\r
+               PLEASE DO .3 <- :3\r
+               DO RETRIEVE :1 + :2 + :3\r
+               DO RESUME #1\r
+       (1050)  PLEASE STASH :2 + :3 + .5\r
+               DO :2 <- .1\r
+               PLEASE DO (1550) NEXT\r
+               DO .5 <- :3~'#21760$#21760'\r
+               DO .5 <- '?"!5~.5'~#3"$#4'~#4\r
+               DO (1051) NEXT\r
+               DO (1999) NEXT\r
+       (1051)  DO (1001) NEXT\r
+               DO .2 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .5\r
+               DO RESUME #2\r
+       (1200)  DO .2 <- '^.1$.1'~'#0$#21845'\r
+               DO .3 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535'\r
+                    ~'#0$#21845'"'~'#0$#21845'\r
+               DO .2 <- '^.2$"!3$#0'~'#5461$#1'"'~'#0$#21845'\r
+               DO .3 <- .3~#16384\r
+               PLEASE RESUME #1\r
+       (1210)  DO .2 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535'\r
+                    ~'#0$#21845'"'~'#0$#21845'\r
+               DO .3 <- '^.1$.1'~'#0$#21845'\r
+               DO .2 <- '^.2$".3~#21844"'~'#0$#21845'\r
+               DO .3 <- .3~#1\r
+               PLEASE RESUME #1\r
+       (1500)  PLEASE ABSTAIN FROM (1502)\r
+               PLEASE ABSTAIN FROM (1506)\r
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO .1 <- :1~#21845\r
+               PLEASE DO .2 <- :2~#21845\r
+               DO (1009) NEXT\r
+               DO .5 <- .3\r
+               PLEASE DO .6 <- .4\r
+               DO .1 <- :1~'#21760$#21760'\r
+               DO .2 <- :2~'#21760$#21760'\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               PLEASE DO (1503) NEXT\r
+               DO .6 <- .4\r
+               DO .2 <- #1\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               DO (1501) NEXT\r
+       (1504)  PLEASE RESUME .6\r
+       (1503)  DO (1504) NEXT\r
+       (1501)  DO .2 <- .5\r
+               DO .5 <- '&.6$.4'\r
+               DO (1505) NEXT\r
+       (1506)  DO (1502) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1505)  DO (1001) NEXT\r
+       (1502)  DO :4 <- .5\r
+               DO (1520) NEXT\r
+               DO :3 <- :1\r
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO REINSTATE (1502)\r
+               DO REINSTATE (1506)\r
+               PLEASE RESUME #3\r
+       (1510)  DO STASH :1 + :2 + :4\r
+               DO :1 <- "'?#65535$":2~'#21845$#0'"'~'#0$#21845'"$\r
+                    "'?#65535$":2~'#0$#21845'"'~'#0$#21845'"\r
+               DO :2 <- #1\r
+               DO (1509) NEXT\r
+               PLEASE RETRIEVE :1\r
+               DO :2 <- :3\r
+               PLEASE DO (1509) NEXT\r
+               DO RETRIEVE :2 + :4\r
+               PLEASE RESUME #1\r
+       (1520)  PLEASE STASH .3 + .4\r
+               DO .3 <- .1~#17476\r
+               DO (1525) NEXT\r
+               PLEASE DO .4 <- 'V.3$".2~#17476"'~'#0$#21845'\r
+               DO .3 <- .1~#4369\r
+               PLEASE DO (1525) NEXT\r
+               DO :1 <- .4$"'V.3$".2~#4369"'~'#0$#21845'"\r
+               PLEASE RETRIEVE .3 + .4\r
+               DO RESUME #1\r
+       (1525)  DO .3 <- '"'"!3$#0'~'#5461$#1'"$#0'~'#5461$#1'"$\r
+                    #0'~'#1365$#5'\r
+               PLEASE RESUME #1\r
+       (1530)  DO STASH :2 + :3 + .1 + .2 + .3\r
+               DO :3 <- #0\r
+               DO :2 <- .1\r
+               DO (1535) NEXT\r
+       (1535)  PLEASE FORGET #1\r
+               DO .3 <- '?"!2~.2'~#3"$#4'~#4\r
+               DO (1532) NEXT\r
+               DO .1 <- .2\r
+               DO (1210) NEXT\r
+               DO .3 <- 'V.3$#1'~#1\r
+               DO (1531) NEXT\r
+               DO :1 <- :3\r
+               DO (1500) NEXT\r
+               PLEASE DO (1533) NEXT\r
+       (1531)  PLEASE DO (1534) NEXT\r
+       (1533)  DO FORGET #1\r
+               DO :1 <- :2\r
+               DO (1700) NEXT\r
+               DO (1535) NEXT\r
+       (1534)  PLEASE RESUME .3\r
+       (1532)  DO (1534) NEXT\r
+               DO :1 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3\r
+               DO RESUME #2\r
+       (1540)  PLEASE ABSTAIN FROM (1541)\r
+               DO ABSTAIN FROM (1542)\r
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5\r
+               DO .1 <- :1~#21845\r
+               PLEASE DO .2 <- :2~'#21760$#21760'\r
+               DO .5 <- :1~'#21760$#21760'\r
+               DO (1530) NEXT\r
+               DO :3 <- :1\r
+               DO .2 <- :2~#21845\r
+               PLEASE DO (1530) NEXT\r
+               DO :5 <- :1\r
+               DO .1 <- .5\r
+               DO (1530) NEXT\r
+               DO :4 <- :1\r
+               PLEASE DO :1 <- ":3~'#21760$#21760'"$":4\r
+                    ~'#21760$#21760'"\r
+               DO .5 <- ':1~:1'~#3\r
+               DO .2 <- :2~'#21760$#21760'\r
+               DO (1530) NEXT\r
+               PLEASE DO .5 <- '"':1~:1'~#3"$.5'~#5\r
+               DO .1 <- :3~#21845\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               PLEASE DO :2 <- :1\r
+               PLEASE DO .1 <- :4~#21845\r
+               DO (1520) NEXT\r
+               DO (1509) NEXT\r
+               DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#69\r
+               DO :1 <- :3\r
+               DO :2 <- :5\r
+               DO (1509) NEXT\r
+               PLEASE DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#1093\r
+               DO .5 <- '?"!5~.5'~#1"$#1'~#1\r
+               PLEASE RETRIEVE :4\r
+       (1541)  DO :4 <- .5\r
+               DO (1543) NEXT\r
+       (1542)  DO (1544) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1543)  DO (1001) NEXT\r
+       (1544)  DO REINSTATE (1541)\r
+               PLEASE REINSTATE (1542)\r
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1550)  DO STASH :1 + :1 + :4 + :5 + :6 + .1 + .5\r
+               DO :3 <- #0\r
+               DO .5 <- '?"':2~:2'~#3"$#4'~#4\r
+               PLEASE DO (1551) NEXT\r
+               DO :4 <- #1\r
+               PLEASE DO (1553) NEXT\r
+       (1553)  DO FORGET #1\r
+               DO .5 <- '?#0$"'V"'@":2~'#16384$#0'"$#3'~#1"$#2'\r
+                    ~#1"'~#1\r
+               DO (1552) NEXT\r
+               DO :5 <- :2\r
+               DO :1 <- :4\r
+               PLEASE DO (1700) NEXT\r
+               DO :4 <- :2\r
+               DO :1 <- :5\r
+               PLEASE DO (1700) NEXT\r
+               DO (1553) NEXT\r
+       (1552)  DO (1001) NEXT\r
+               DO RETRIEVE :1\r
+       (1556)  PLEASE FORGET #1\r
+               DO :6 <- "'&":2~'#21845$#0'"$"'?#65535$":1\r
+                    ~'#21845$#0'"'~'#0$#21845'"'~'#0$#21845'"$\r
+                    "'&":2~'#0$#21845'"$"'?#65535$":1~'#0$\r
+                    #21845'"'~'#0$#21845'"'~'#0$#21845'"\r
+               DO :6 <- "'?"'V":6~'#21845$#0'"$#21845'~'#0$\r
+                    #21845'"$#21845'~'#0$#65535'"$"'?"'V":6\r
+                    ~'#0$#21845'"$#21845'~'#0$#21845'"$#21845'\r
+                    ~'#0$#65535'"\r
+               DO :5 <- "'?":1~'#21845$#0'"$":2~'#21845$#0'"'\r
+                    ~'#0$#65535'"$"'?":1~'#0$#21845'"$":2~'#0$\r
+                    #21845'"'~'#0$#65535'"\r
+               DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#21845$#0'"$\r
+                    #16384'~'#0$#21845'"$"'?:5~:5'~'#5461$#0'"'\r
+                    ~'#16384$#5461'"$"'?:5~:5'~'#0$#21845'"'"\r
+                    ~#1'$#2"~#1\r
+               DO (1554) NEXT\r
+               DO :5 <- :3\r
+               DO (1510) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO :3 <- "'^":4~'#21845$#0'"$":5~'#21845$#0'"'\r
+                    ~'#0$#21845'"$"'^":4~'#0$#21845'"$":5~'#0$\r
+                    #21845'"'~'#0$#21845'"\r
+               DO (1555) NEXT\r
+       (1554)  PLEASE DO (1001) NEXT\r
+       (1555)  DO FORGET #1\r
+               DO .5 <- 'V":4~#1"$"'?#2$":4~#1"'~#1"'~#1\r
+               DO (1551) NEXT\r
+               DO :5 <- :1\r
+               DO :1 <- :4\r
+               DO :4 <- :2\r
+               DO (1710) NEXT\r
+               DO :1 <- :4\r
+               DO :4 <- :2\r
+               DO (1710) NEXT\r
+               DO :1 <- :5\r
+               PLEASE DO (1556) NEXT\r
+       (1551)  DO (1001) NEXT\r
+               PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5\r
+               PLEASE RESUME #2\r
+       (1700)  PLEASE STASH .2\r
+               DO .1 <- :1~'#0$#21845'\r
+               DO .2 <- :1~'#21845$#0'\r
+               DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$\r
+                    #21845'"\r
+               DO .1 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535'\r
+                    ~'#0$#21845'"'~'#0$#21845'\r
+               DO .2 <- '?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535'\r
+                    ~'#0$#21845'"'~'#0$#21845'\r
+               DO :2 <- "'^":2~'#21845$#0'"$.1'~'#0$#21845'"$\r
+                    "'^":2~'#0$#21845'"$"'.2$#0'~'#5461$#1'"'\r
+                    ~'#0$#21845'"\r
+               DO .1 <- .2~#16384\r
+               PLEASE RETRIEVE .2\r
+               PLEASE RESUME #1\r
+       (1710)  PLEASE STASH :1 + .2\r
+               DO .1 <- :1~'#0$#21845'\r
+               DO .2 <- :1~'#21845$#0'\r
+               DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$\r
+                    #21845'"\r
+               DO :1 <- "'?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535'\r
+                    ~'#0$#21845'"'~'#0$#21845'"$"'?"'@.1$#0'\r
+                    ~'#0$#21845'"$"'@.1$#65535'~'#0$#21845'"'\r
+                    ~'#0$#21845'"\r
+               DO .1 <- :2~#1\r
+               DO :2 <- "'^":1~'#21845$#0'"$":2~'#0$#21844'"'\r
+                    ~'#0$#21845'"$"'^":1~'#0$#21845'"$":2\r
+                    ~'#21845$#0'"'~'#0$#21845'"\r
+               PLEASE RETRIEVE :1 + .2\r
+               PLEASE RESUME #1\r
+       (1900)  DO STASH .2 + .5\r
+               DO .1 <- #0\r
+               DO .2 <- #1\r
+               PLEASE DO (1901) NEXT\r
+       (1901)  PLEASE FORGET #1\r
+               DO %50 .1 <- 'V.1$.2'~'#0$#21845'\r
+               DO %50 .1 <- '^.1$".2~#43690"'~'#0$#21845'\r
+               DO .2 <- !2$#0'~'#5461$#1'\r
+               PLEASE DO .5 <- '^".2~.2"$#1'~#1\r
+               DO (1902) NEXT\r
+               DO (1901) NEXT\r
+       (1902)  DO (1001) NEXT\r
+               DO RETRIEVE .2 + .5\r
+               PLEASE RESUME #2\r
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3\r
+               DO .3 <- #65524\r
+               DO :1 <- #6\r
+               DO (1911) NEXT\r
+               PLEASE NOTE THAT YOU CAN'T GET ANYWHERE FROM HERE\r
+       (1912)  DO (1001) NEXT\r
+       (1911)  DO FORGET #1\r
+               PLEASE DO (1900) NEXT\r
+               DO :2 <- .1\r
+               DO (1500) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .1 <- .3\r
+               DO (1020) NEXT\r
+               PLEASE DO .3 <- .1\r
+               DO .5 <- '?"!3~.3'~#3"$#2'~#1\r
+               DO (1912) NEXT\r
+               DO .1 <- #12\r
+               PLEASE DO (1050) NEXT\r
+               DO RETRIEVE .1\r
+               DO (1530) NEXT\r
+               DO :2 <- #32768\r
+               DO (1500) NEXT\r
+               PLEASE DO .2 <- :3~'#21760$#21760'\r
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3\r
+               DO RESUME #1\r
diff --git a/pit/lib/syslib.5i b/pit/lib/syslib.5i
new file mode 100644 (file)
index 0000000..c768250
--- /dev/null
@@ -0,0 +1,355 @@
+               PLEASE KNOCK "SHAVE-AND-A-HAIRCUT" BEFORE ENTERING\r
+\r
+       (1000)  PLEASE IGNORE .4\r
+               PLEASE ABSTAIN FROM (1005)\r
+       (1009)  DO STASH .1 + .2 + .5 + .6\r
+               DO .4 <- #1\r
+               DO (1004) NEXT\r
+       (1004)  PLEASE FORGET #1\r
+               DO .3 <- '^.1$.2'~'#0$#3906'\r
+               DO .6 <- '?"'V"'&.1$.2'~'#0$#3906'"$"'^"'@.1$\r
+                     .2'~'#0$#3906'"$#3906'~'#0$#11718'"'\r
+                     ~'#0$#3906'"$#11718'~'#0$#3906'\r
+               PLEASE DO .5 <- "?!6~#12500'$#5"~#5\r
+               DO (1002) NEXT\r
+               DO .4 <- #2\r
+       (1005)  DO (1006) NEXT\r
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW\r
+       (1002)  DO (1001) NEXT\r
+       (1006)  PLEASE FORGET #1\r
+               DO .5 <- '?"!6~.6'~#4"$#5'~#5\r
+               DO (1003) NEXT\r
+               DO .1 <- .3\r
+               DO .2 <- !6$#0'~'#781$#1'\r
+               DO (1004) NEXT\r
+       (1003)  DO (1001) NEXT\r
+               DO REINSTATE (1005)\r
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6\r
+               DO REMEMBER .4\r
+               PLEASE RESUME #2\r
+       (1001)  DO RESUME .5\r
+       (1010)  DO STASH .1 + .2 + .4\r
+               DO .4 <- .1\r
+               DO .1 <- '?#15624$.2'~'#0$#3906'\r
+               DO (1020) NEXT\r
+               PLEASE DO .2 <- .4\r
+               PLEASE DO (1009) NEXT\r
+               DO RETRIEVE .1 + .2 + .4\r
+               PLEASE RESUME #1\r
+       (1020)  DO STASH .2 + .3\r
+               DO .2 <- #1\r
+               PLEASE DO (1021) NEXT\r
+       (1021)  DO FORGET #1\r
+               DO .3 <- '?"'V".1~.2"$#3'~#1"$#2'~#1\r
+               PLEASE DO .1 <- '^.1$.2'~'#0$#3906'\r
+               DO (1022) NEXT\r
+               DO .2 <- !2$#0'~'#781$#1'\r
+               DO (1021) NEXT\r
+       (1023)  PLEASE RESUME .3\r
+       (1022)  DO (1023) NEXT\r
+               PLEASE RETRIEVE .2 + .3\r
+               PLEASE RESUME #2\r
+       (1030)  DO ABSTAIN FROM (1033)\r
+               PLEASE ABSTAIN FROM (1032)\r
+       (1039)  DO STASH :1 + .5\r
+               DO (1530) NEXT\r
+               DO .3 <- :1~#3906\r
+               PLEASE DO .5 <- :1~'#3875$#3875'\r
+               DO .5 <- '?"!5~.5'~#4"$#5'~#5\r
+               DO (1031) NEXT\r
+       (1032)  DO (1033) NEXT\r
+               DO (1999) NEXT\r
+       (1031)  DO (1001) NEXT\r
+       (1033)  DO .4 <- .5\r
+               DO REINSTATE (1032)\r
+               PLEASE REINSTATE (1033)\r
+               DO RETRIEVE :1 + .5\r
+               PLEASE RESUME #2\r
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               DO STASH :1\r
+               PLEASE RETRIEVE .2\r
+               DO .1 <- .2\r
+               DO .2 <- #0\r
+               PLEASE DO (1520) NEXT\r
+               DO :2 <- :1\r
+               DO RETRIEVE .1 + .2 + :1\r
+               DO (1550) NEXT\r
+               PLEASE DO .3 <- :3\r
+               DO RETRIEVE :1 + :2 + :3\r
+               DO RESUME #1\r
+       (1050)  PLEASE STASH :2 + :3 + .5\r
+               DO :2 <- .1\r
+               PLEASE DO (1550) NEXT\r
+               DO .5 <- :3~'#3875$#3875'\r
+               DO .5 <- '?"!5~.5'~#4"$#5'~#5\r
+               DO (1051) NEXT\r
+               DO (1999) NEXT\r
+       (1051)  DO (1001) NEXT\r
+               DO .2 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .5\r
+               DO RESUME #2\r
+       (1500)  PLEASE ABSTAIN FROM (1502)\r
+               PLEASE ABSTAIN FROM (1506)\r
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO .1 <- :1~#3906\r
+               PLEASE DO .2 <- :2~#3906\r
+               DO (1009) NEXT\r
+               DO .5 <- .3\r
+               PLEASE DO .6 <- .4\r
+               DO .1 <- :1~'#3875$#3875'\r
+               DO .2 <- :2~'#3875$#3875'\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               PLEASE DO (1503) NEXT\r
+               DO .6 <- .4\r
+               DO .2 <- #1\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               DO (1501) NEXT\r
+       (1504)  PLEASE RESUME .6\r
+       (1503)  DO (1504) NEXT\r
+       (1501)  DO .2 <- .5\r
+               DO .5 <- '&.6$.4'\r
+               DO (1505) NEXT\r
+       (1506)  DO (1502) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1505)  DO (1001) NEXT\r
+       (1502)  DO :4 <- .5\r
+               DO (1520) NEXT\r
+               DO :3 <- :1\r
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO REINSTATE (1502)\r
+               DO REINSTATE (1506)\r
+               PLEASE RESUME #3\r
+       (1510)  DO STASH :1 + :2 + :4\r
+               DO :1 <- "'?#15624$":2~'#3906$#0'"'~'#0$#3906'"$\r
+                    "'?#15624$":2~'#0$#3906'"'~'#0$#3906'"\r
+               DO :2 <- #1\r
+               DO (1509) NEXT\r
+               PLEASE RETRIEVE :1\r
+               DO :2 <- :3\r
+               PLEASE DO (1509) NEXT\r
+               DO RETRIEVE :2 + :4\r
+               PLEASE RESUME #1\r
+       (1520)  PLEASE STASH .3 + .4\r
+               DO .3 <- .1~#3255\r
+               DO (1525) NEXT\r
+               PLEASE DO .4 <- 'V.3$".2~#3255"'~'#0$#3906'\r
+               DO .3 <- .1~#651\r
+               PLEASE DO (1525) NEXT\r
+               DO :1 <- .4$"'V.3$".2~#651"'~'#0$#3906'"\r
+               PLEASE RETRIEVE .3 + .4\r
+               DO RESUME #1\r
+       (1525)  DO .3 <- '"!3$#0'~'#781$#1'"$#0'~'#156$#6'\r
+               PLEASE RESUME #1\r
+       (1530)  DO STASH :2 + :3 + :4 + .1 + .2 + .5\r
+               DO :3 <- #0\r
+               DO :4 <- .2\r
+               DO (1535) NEXT\r
+       (1535)  PLEASE FORGET #1\r
+               DO .5 <- '?".1~#4"$#5'~#5\r
+               DO (1531) NEXT\r
+               DO :1 <- :4\r
+               DO (1720) NEXT\r
+               DO :1 <- :3\r
+               DO (1500) NEXT\r
+               PLEASE DO (1533) NEXT\r
+       (1531)  PLEASE DO (1001) NEXT\r
+       (1533)  DO FORGET #1\r
+               DO .1 <- .1~#3905\r
+               DO :4 <- ":4~'#0$#3906'"$"'":4~'#781$#0'"$#0'\r
+                   ~'#781$#1'"\r
+               PLEASE DO .5 <- '?"!1~.1'~#4"$#5'~#5\r
+               DO (1532) NEXT\r
+               DO (1535) NEXT\r
+       (1532)  DO (1001) NEXT\r
+               DO :1 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1540)  PLEASE ABSTAIN FROM (1541)\r
+               DO ABSTAIN FROM (1542)\r
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5\r
+               DO .1 <- :1~#3906\r
+               PLEASE DO .2 <- :2~'#3875$#3875'\r
+               DO .5 <- :1~'#3875$#3875'\r
+               DO (1530) NEXT\r
+               DO :3 <- :1\r
+               DO .2 <- :2~#3906\r
+               PLEASE DO (1530) NEXT\r
+               DO :5 <- :1\r
+               DO .1 <- .5\r
+               DO (1530) NEXT\r
+               DO :4 <- :1\r
+               PLEASE DO :1 <- ":3~'#3875$#3875'"$":4\r
+                    ~'#3875$#3875'"\r
+               DO .5 <- ':1~:1'~#4\r
+               DO .2 <- :2~'#3875$#3875'\r
+               DO (1530) NEXT\r
+               PLEASE DO .5 <- '"':1~:1'~#4"$.5'~#6\r
+               DO .1 <- :3~#3906\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               PLEASE DO :2 <- :1\r
+               PLEASE DO .1 <- :4~#3906\r
+               DO (1520) NEXT\r
+               DO (1509) NEXT\r
+               DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#131\r
+               DO :1 <- :3\r
+               DO :2 <- :5\r
+               DO (1509) NEXT\r
+               PLEASE DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#3256\r
+               DO .5 <- '?"!5~.5'~#1"$#2'~#1\r
+               PLEASE RETRIEVE :4\r
+       (1541)  DO :4 <- .5\r
+               DO (1543) NEXT\r
+       (1542)  DO (1544) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1543)  DO (1001) NEXT\r
+       (1544)  DO REINSTATE (1541)\r
+               PLEASE REINSTATE (1542)\r
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1550)  DO STASH :1 + :4 + :5 + :6 + .1 + .5\r
+               DO :5 <- #0\r
+               DO .5 <- '?"':2~:2'~#4"$#5'~#5\r
+               PLEASE DO (1551) NEXT\r
+               DO :4 <- #1\r
+               PLEASE DO (1553) NEXT\r
+       (1553)  DO FORGET #1\r
+               DO .5 <- '?"':2~"#12500$#0"'"$#3'~#1\r
+               DO (1552) NEXT\r
+               DO :2 <- ":2~'#0$#3906'"$"'":2~'#781$#0'"$#0'\r
+                    ~'#781$#1'"\r
+               PLEASE DO :4 <- ":4~'#0$#3906'"$"'":4~'#781\r
+                    $#0'"$#0'~'#781$#1'"\r
+               DO (1553) NEXT\r
+       (1552)  DO (1001) NEXT\r
+               DO .1 <- #0\r
+       (1556)  PLEASE FORGET #1\r
+               DO :6 <- "'&":2~'#3906$#0'"$"'?#15624$":1\r
+                    ~'#3906$#0'"'~'#0$#3906'"'~'#0$#3906'"$\r
+                    "'&":2~'#0$#3906'"$"'?#15624$":1~'#0$\r
+                    #3906'"'~'#0$#3906'"'~'#0$#3906'"\r
+               DO :6 <- "'?"'V":6~'#3906$#0'"$#7812'~'#0$\r
+                    #3906'"$#7812'~'#0$#15624'"$"'?"'V":6\r
+                    ~'#0$#3906'"$#7812'~'#0$#3906'"$#7812'\r
+                    ~'#0$#15624'"\r
+               DO :3 <- "'?":1~'#3906$#0'"$":2~'#3906$#0'"'\r
+                    ~'#0$#15624'"$"'?":1~'#0$#3906'"$":2~'#0$\r
+                    #3906'"'~'#0$#15624'"\r
+               DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#3906$#0'"$\r
+                    #3125'~'#0$#3906'"$"'?:3~:3'~'#781$#0'"'\r
+                    ~'#3125$#781'"$"'?:3~:3'~'#0$#3906'"'"~#1'$\r
+                    #3"~#1\r
+               PLEASE DO (1557) NEXT\r
+               DO (1510) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .5 <- '?#0$"'V.1$#3'~#1"'~#1\r
+               DO (1557) NEXT\r
+               DO .1 <- '^.1$#3906'~'#0$#3906'\r
+               DO (1556) NEXT\r
+       (1557)  PLEASE DO (1001) NEXT\r
+               PLEASE FORGET #1\r
+               DO :5 <- "'V":4~'.1$#0'"$":5~'#3906$#0'"'\r
+                    ~'#0$#3906'"$"'V":4~'#0$.1'"$":5~'#0$\r
+                    #3906'"'~'#0$#3906'"\r
+               DO .5 <- "?#2$':4~#1'"~#1\r
+               DO (1551) NEXT\r
+               DO :2 <- :2~'#3906$#3905'\r
+               DO :4 <- :4~'#3906$#3905'\r
+               DO .1 <- #0\r
+               PLEASE DO (1556) NEXT\r
+       (1551)  DO (1001) NEXT\r
+               DO :3 <- :5\r
+               PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5\r
+               PLEASE RESUME #2\r
+       (1720)  PLEASE STASH :1 + :3 + :4 + .1 + .5\r
+               DO :2 <- #0\r
+               DO .2 <- #0\r
+               DO .5 <- '?".1~#4"$#5'~#5\r
+               DO (1729) NEXT\r
+               DO .5 <- .1~#1\r
+               DO .2 <- :1~'#3906$#0'\r
+               DO .1 <- :1~'#0$#3906'\r
+               PLEASE DO (1724) NEXT\r
+               DO :1 <- '"?#0$.2"~"#0$#3906"'$'"?#0$.1"~"#0$\r
+                    #3906"'\r
+               DO :2 <- '"?'"V.2$#3906"~"#0$#3906"'$\r
+                    #3906"~"#0$#3906"'$'"?'"V.1$#3906"\r
+                    ~"#0$#3906"'$#3906"~"#0$#3906"'\r
+               DO (1728) NEXT\r
+       (1724)  PLEASE DO (1723) NEXT\r
+               DO :1 <- '"?#0$'"^.2$.2"~"#0$#3906"'"~"#0$#3906"'$\r
+                    '"?#0$'"^.1$.1"~"#0$#3906"'"~"#0$#3906"'\r
+               DO :2 <- '"?'"V'"@.2$#11718"~"#0$#3906"'$#7812"\r
+                    ~"#0$#3906"'$#7812"~"#0$#3906"'$'"?'"V'"@.1$\r
+                    #11718"~"#0$#3906"'$#7812"~"#0$#3906"'$#7812"\r
+                    ~"#0$#3906"'\r
+       (1728)  DO .2 <- :2~'#3125$#0'\r
+               DO :2 <- ':2~"#0$#3906"'$'"':2~"#781$#0"'$#0"\r
+                    ~"#781$#1"'\r
+               DO (1509) NEXT\r
+               DO :2 <- :3\r
+               DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1\r
+               DO (1721) NEXT\r
+       (1723)  PLEASE DO (1722) NEXT\r
+               DO :1 <- '"^.2$.2"~"#0$#3906"'$'"^.1$.1"~"#0$\r
+                    #3906"'\r
+               DO :2 <- '"?'"V'"2@.2$#15624"~"#0$#3906"'$\r
+                    #11718"~"#0$#3906"'$#11718"~"#0$#3906"'$\r
+                    '"?'"V'"2@.1$#15624"~"#0$#3906"'$#11718"\r
+                    ~"#0$#3906"'$#11718"~"#0$#3906"'\r
+               PLEASE FORGET #2\r
+               DO (1728) NEXT\r
+       (1729)  DO (1001) NEXT\r
+               DO (1721) NEXT\r
+       (1722)  PLEASE DO (1001) NEXT\r
+               DO :2 <- :1\r
+               DO .2 <- #0\r
+               DO FORGET #1\r
+       (1721)  PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5\r
+               PLEASE RESUME #3\r
+       (1900)  DO STASH .2 + .5\r
+               DO .1 <- #0\r
+               DO .2 <- #1\r
+               PLEASE DO (1901) NEXT\r
+       (1901)  DO %20 (1903) NEXT\r
+               DO .1 <- 'V.1$.2'~'#0$#3906'\r
+               DO %50 .1 <- '^.1$".2~#7812"'~'#0$#3906'\r
+               DO %50 .1 <- '^.1$.2'~'#0$#3906'\r
+               PLEASE DO (1903) NEXT\r
+       (1903)  PLEASE FORGET #2\r
+               DO .2 <- !2$#0'~'#781$#1'\r
+               PLEASE DO .5 <- '^".2~.2"$#1'~#1\r
+               DO (1902) NEXT\r
+               DO (1901) NEXT\r
+       (1902)  DO (1001) NEXT\r
+               DO RETRIEVE .2 + .5\r
+               PLEASE RESUME #2\r
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3\r
+               DO .3 <- #15613\r
+               DO :1 <- #6\r
+               DO (1911) NEXT\r
+               PLEASE NOTE THAT YOU CAN'T GET SOMETHING FROM NOTHING\r
+       (1912)  DO (1001) NEXT\r
+       (1911)  DO FORGET #1\r
+               PLEASE DO (1900) NEXT\r
+               DO :2 <- .1\r
+               DO (1500) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .1 <- .3\r
+               DO (1020) NEXT\r
+               PLEASE DO .3 <- .1\r
+               DO .5 <- '?"!3~.3'~#4"$#3'~#1\r
+               DO (1912) NEXT\r
+               DO .1 <- #12\r
+               PLEASE DO (1050) NEXT\r
+               DO RETRIEVE .1\r
+               DO (1530) NEXT\r
+               DO :2 <- #7812\r
+               DO (1500) NEXT\r
+               PLEASE DO .2 <- :3~'#3875$#3875'\r
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3\r
+               DO RESUME #1\r
diff --git a/pit/lib/syslib.6i b/pit/lib/syslib.6i
new file mode 100644 (file)
index 0000000..43e5f52
--- /dev/null
@@ -0,0 +1,373 @@
+               PLEASE KNOCK THRICE TWO TIMES BEFORE ENTERING\r
+\r
+       (1000)  PLEASE IGNORE .4\r
+               PLEASE ABSTAIN FROM (1005)\r
+       (1009)  DO STASH .1 + .2 + .5 + .6\r
+               DO .4 <- #1\r
+               DO (1004) NEXT\r
+       (1004)  PLEASE FORGET #1\r
+               DO .3 <- '^.1$.2'~'#0$#9331'\r
+               DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#9331'"$"'^"'@.1$\r
+                    .2'~'#0$#9331'"$#9331'~'#0$#9331'"'~'#0$\r
+                    #9331'"$"'^"'2@.1$.2'~'#0$#9331'"$#18662'\r
+                    ~'#0$#9331'"'~'#0$#37324'"$#37324'~'#0$#9331'\r
+               PLEASE DO .5 <- "?!6~#38880'$#6"~#6\r
+               DO (1002) NEXT\r
+               DO .4 <- #2\r
+       (1005)  DO (1006) NEXT\r
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW\r
+       (1002)  DO (1001) NEXT\r
+       (1006)  PLEASE FORGET #1\r
+               DO .5 <- '?"!6~.6'~#5"$#6'~#6\r
+               DO (1003) NEXT\r
+               DO .1 <- .3\r
+               DO .2 <- !6$#0'~'#1555$#1'\r
+               DO (1004) NEXT\r
+       (1003)  DO (1001) NEXT\r
+               DO REINSTATE (1005)\r
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6\r
+               DO REMEMBER .4\r
+               PLEASE RESUME #2\r
+       (1001)  DO RESUME .5\r
+       (1010)  DO STASH .1 + .2 + .4\r
+               DO .4 <- .1\r
+               DO .1 <- '?#46655$.2'~'#0$#9331'\r
+               DO (1020) NEXT\r
+               PLEASE DO .2 <- .4\r
+               PLEASE DO (1009) NEXT\r
+               DO RETRIEVE .1 + .2 + .4\r
+               PLEASE RESUME #1\r
+       (1020)  DO STASH .2 + .3\r
+               DO .2 <- #1\r
+               PLEASE DO (1021) NEXT\r
+       (1021)  DO FORGET #1\r
+               DO .3 <- '?"'V".1~.2"$#4'~#1"$#3'~#1\r
+               PLEASE DO .1 <- '^.1$.2'~'#0$#9331'\r
+               DO (1022) NEXT\r
+               DO .2 <- !2$#0'~'#1555$#1'\r
+               DO (1021) NEXT\r
+       (1023)  PLEASE RESUME .3\r
+       (1022)  DO (1023) NEXT\r
+               PLEASE RETRIEVE .2 + .3\r
+               PLEASE RESUME #2\r
+       (1030)  DO ABSTAIN FROM (1033)\r
+               PLEASE ABSTAIN FROM (1032)\r
+       (1039)  DO STASH :1 + .5\r
+               DO (1530) NEXT\r
+               DO .3 <- :1~#9331\r
+               PLEASE DO .5 <- :1~'#9288$#9288'\r
+               DO .5 <- '?"!5~.5'~#5"$#6'~#6\r
+               DO (1031) NEXT\r
+       (1032)  DO (1033) NEXT\r
+               DO (1999) NEXT\r
+       (1031)  DO (1001) NEXT\r
+       (1033)  DO .4 <- .5\r
+               DO REINSTATE (1032)\r
+               PLEASE REINSTATE (1033)\r
+               DO RETRIEVE :1 + .5\r
+               PLEASE RESUME #2\r
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               DO STASH :1\r
+               PLEASE RETRIEVE .2\r
+               DO .1 <- .2\r
+               DO .2 <- #0\r
+               PLEASE DO (1520) NEXT\r
+               DO :2 <- :1\r
+               DO RETRIEVE .1 + .2 + :1\r
+               DO (1550) NEXT\r
+               PLEASE DO .3 <- :3\r
+               DO RETRIEVE :1 + :2 + :3\r
+               DO RESUME #1\r
+       (1050)  PLEASE STASH :2 + :3 + .5\r
+               DO :2 <- .1\r
+               PLEASE DO (1550) NEXT\r
+               DO .5 <- :3~'#9288$#9288'\r
+               DO .5 <- '?"!5~.5'~#5"$#6'~#6\r
+               DO (1051) NEXT\r
+               DO (1999) NEXT\r
+       (1051)  DO (1001) NEXT\r
+               DO .2 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .5\r
+               DO RESUME #2\r
+       (1200)  DO .2 <- '^.1$.1'~'#0$#9331'\r
+               DO .3 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'\r
+               DO .2 <- '^.2$"!3$#0'~'#1555$#1'"'~'#0$#9331'\r
+               DO .3 <- .3~#7776\r
+               PLEASE RESUME #1\r
+       (1210)  DO .2 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$\r
+                    #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$\r
+                    #9331'"'~'#0$#9331'\r
+               DO .3 <- '^"'^.1$.1'~'#0$#9331'"$.1'~'#0$#9331'\r
+               DO .2 <- '^.2$".3~#9330"'~'#0$#9331'\r
+               DO .3 <- .3~#1\r
+               PLEASE RESUME #1\r
+       (1500)  PLEASE ABSTAIN FROM (1502)\r
+               PLEASE ABSTAIN FROM (1506)\r
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO .1 <- :1~#9331\r
+               PLEASE DO .2 <- :2~#9331\r
+               DO (1009) NEXT\r
+               DO .5 <- .3\r
+               PLEASE DO .6 <- .4\r
+               DO .1 <- :1~'#9288$#9288'\r
+               DO .2 <- :2~'#9288$#9288'\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               PLEASE DO (1503) NEXT\r
+               DO .6 <- .4\r
+               DO .2 <- #1\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               DO (1501) NEXT\r
+       (1504)  PLEASE RESUME .6\r
+       (1503)  DO (1504) NEXT\r
+       (1501)  DO .2 <- .5\r
+               DO .5 <- '&.6$.4'\r
+               DO (1505) NEXT\r
+       (1506)  DO (1502) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1505)  DO (1001) NEXT\r
+       (1502)  DO :4 <- .5\r
+               DO (1520) NEXT\r
+               DO :3 <- :1\r
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO REINSTATE (1502)\r
+               DO REINSTATE (1506)\r
+               PLEASE RESUME #3\r
+       (1510)  DO STASH :1 + :2 + :4\r
+               DO :1 <- "'?#46655$":2~'#9331$#0'"'~'#0$#9331'"$\r
+                    "'?#46655$":2~'#0$#9331'"'~'#0$#9331'"\r
+               DO :2 <- #1\r
+               DO (1509) NEXT\r
+               PLEASE RETRIEVE :1\r
+               DO :2 <- :3\r
+               PLEASE DO (1509) NEXT\r
+               DO RETRIEVE :2 + :4\r
+               PLEASE RESUME #1\r
+       (1520)  PLEASE STASH .3 + .4\r
+               DO .3 <- .1~#7998\r
+               DO (1525) NEXT\r
+               PLEASE DO .4 <- 'V.3$".2~#7998"'~'#0$#9331'\r
+               DO .3 <- .1~#1333\r
+               PLEASE DO (1525) NEXT\r
+               DO :1 <- .4$"'V.3$".2~#1333"'~'#0$#9331'"\r
+               PLEASE RETRIEVE .3 + .4\r
+               DO RESUME #1\r
+       (1525)  DO .3 <- '"!3$#0'~'#1555$#1'"$#0'~'#259$#7'\r
+               PLEASE RESUME #1\r
+       (1530)  DO STASH :2 + :3 + .1 + .2 + .3\r
+               DO :3 <- #0\r
+               DO :2 <- .1\r
+               DO (1535) NEXT\r
+       (1535)  PLEASE FORGET #1\r
+               DO .3 <- '?"!2~.2'~#5"$#6'~#6\r
+               DO (1532) NEXT\r
+               DO .1 <- .2\r
+               DO (1210) NEXT\r
+               DO .3 <- '?#1$".3~#5"'~#1\r
+               DO (1531) NEXT\r
+               DO :1 <- :3\r
+               DO (1500) NEXT\r
+               PLEASE DO (1533) NEXT\r
+       (1531)  PLEASE DO (1534) NEXT\r
+       (1533)  DO FORGET #1\r
+               DO :1 <- :2\r
+               DO (1700) NEXT\r
+               DO (1535) NEXT\r
+       (1534)  PLEASE RESUME .3\r
+       (1532)  DO (1534) NEXT\r
+               DO :1 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3\r
+               DO RESUME #2\r
+       (1540)  PLEASE ABSTAIN FROM (1541)\r
+               DO ABSTAIN FROM (1542)\r
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5\r
+               DO .1 <- :1~#9331\r
+               PLEASE DO .2 <- :2~'#9288$#9288'\r
+               DO .5 <- :1~'#9288$#9288'\r
+               DO (1530) NEXT\r
+               DO :3 <- :1\r
+               DO .2 <- :2~#9331\r
+               PLEASE DO (1530) NEXT\r
+               DO :5 <- :1\r
+               DO .1 <- .5\r
+               DO (1530) NEXT\r
+               DO :4 <- :1\r
+               PLEASE DO :1 <- ":3~'#9288$#9288'"$":4\r
+                    ~'#9288$#9288'"\r
+               DO .5 <- ':1~:1'~#5\r
+               DO .2 <- :2~'#9288$#9288'\r
+               DO (1530) NEXT\r
+               PLEASE DO .5 <- '"':1~:1'~#5"$.5'~#7\r
+               DO .1 <- :3~#9331\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               PLEASE DO :2 <- :1\r
+               PLEASE DO .1 <- :4~#9331\r
+               DO (1520) NEXT\r
+               DO (1509) NEXT\r
+               DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#223\r
+               DO :1 <- :3\r
+               DO :2 <- :5\r
+               DO (1509) NEXT\r
+               PLEASE DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#7999\r
+               DO .5 <- '?"!5~.5'~#1"$#3'~#1\r
+               PLEASE RETRIEVE :4\r
+       (1541)  DO :4 <- .5\r
+               DO (1543) NEXT\r
+       (1542)  DO (1544) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1543)  DO (1001) NEXT\r
+       (1544)  DO REINSTATE (1541)\r
+               PLEASE REINSTATE (1542)\r
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1550)  DO STASH :1 + :1 + :4 + :5 + :6 + .1 + .5\r
+               DO :3 <- #0\r
+               DO .5 <- '?"':2~:2'~#5"$#6'~#6\r
+               PLEASE DO (1551) NEXT\r
+               DO :4 <- #1\r
+               PLEASE DO (1553) NEXT\r
+       (1553)  DO FORGET #1\r
+               DO .5 <- '?#0$"'V"'2@":2~'#7776$#0'"$#5'~#1"$#4'\r
+                    ~#1"'~#1\r
+               DO (1552) NEXT\r
+               DO :5 <- :2\r
+               DO :1 <- :4\r
+               PLEASE DO (1700) NEXT\r
+               DO :4 <- :2\r
+               DO :1 <- :5\r
+               PLEASE DO (1700) NEXT\r
+               DO (1553) NEXT\r
+       (1552)  DO (1001) NEXT\r
+               DO RETRIEVE :1\r
+       (1556)  PLEASE FORGET #1\r
+               DO :6 <- "'&":2~'#9331$#0'"$"'?#46655$":1\r
+                    ~'#9331$#0'"'~'#0$#9331'"'~'#0$#9331'"$\r
+                    "'&":2~'#0$#9331'"$"'?#46655$":1~'#0$\r
+                    #9331'"'~'#0$#9331'"'~'#0$#9331'"\r
+               DO :5 <- "'?":1~'#9331$#0'"$":2~'#9331$#0'"'\r
+                    ~'#0$#9331'"$"'?":1~'#0$#9331'"$":2~'#0$\r
+                    #9331'"'~'#0$#9331'"\r
+               DO :6 <- "'&":6~'#9331$#0'"$":5~'#9331$#0'"'\r
+                    ~'#0$#9331'"$"'&":6~'#0$#9331'"$":5~'#0$\r
+                    #9331'"'~'#0$#9331'"\r
+               DO :5 <- :5~'#46655$#46655'\r
+               DO :6 <- "'?"'V":6~'#9331$#0'"$#27993'~'#0$\r
+                    #9331'"$#27993'~'#0$#46655'"$"'?"'V":6\r
+                    ~'#0$#9331'"$#27993'~'#0$#9331'"$#27993'\r
+                    ~'#0$#46655'"\r
+               DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#9331$#0'"$\r
+                    #7776'~'#0$#9331'"$"'?:5~:5'~'#1555$#0'"'\r
+                    ~'#7776$#1555'"$"'?:5~:5'~'#0$#9331'"'"~#1'$\r
+                    #4"~#1\r
+               DO (1554) NEXT\r
+               DO :5 <- :3\r
+               DO (1510) NEXT\r
+               DO :1 <- :4\r
+               DO :4 <- :2\r
+               DO :2 <- :5\r
+               DO :5 <- :3\r
+               DO (1500) NEXT\r
+               DO :2 <- :4\r
+               DO :4 <- :1\r
+               DO :1 <- :5\r
+               DO (1555) NEXT\r
+       (1554)  PLEASE DO (1001) NEXT\r
+       (1555)  DO FORGET #1\r
+               DO .5 <- '?#2$"'@#0$":4~#1"'~#1"'~#1\r
+               DO (1551) NEXT\r
+               DO :5 <- :1\r
+               DO :1 <- :4\r
+               DO :4 <- :2\r
+               DO (1710) NEXT\r
+               DO :1 <- :4\r
+               DO :4 <- :2\r
+               DO (1710) NEXT\r
+               DO :1 <- :5\r
+               PLEASE DO (1556) NEXT\r
+       (1551)  DO (1001) NEXT\r
+               PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5\r
+               PLEASE RESUME #2\r
+       (1700)  PLEASE STASH .2\r
+               DO .1 <- :1~'#0$#9331'\r
+               DO .2 <- :1~'#9331$#0'\r
+               DO :2 <- "'^.2$.2'~'#0$#9331'"$"'^.1$.1'~'#0$\r
+                    #9331'"\r
+               DO .1 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'\r
+               DO .2 <- '?"'2@.2$#0'~'#0$#9331'"$"'2@.2$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'\r
+               DO :2 <- "'^":2~'#9331$#0'"$.1'~'#0$#9331'"$"'^":2\r
+                    ~'#0$#9331'"$"'.2$#0'~'#1555$#1'"'~'#0$#9331'"\r
+               DO .1 <- .2~#7776\r
+               PLEASE RETRIEVE .2\r
+               PLEASE RESUME #1\r
+       (1710)  PLEASE STASH :1 + .2\r
+               DO .2 <- :1~'#9331$#0'\r
+               DO .1 <- :1~'#0$#9331'\r
+               DO :2 <- "'^"'^.2$.2'~'#0$#9331'"$.2'~'#0$\r
+                    #9331'"$"'^"'^.1$.1'~'#0$#9331'"$.1'~'#0$\r
+                    #9331'"\r
+               DO .1 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$\r
+                    #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$\r
+                    #9331'"'~'#0$#9331'\r
+               DO :1 <- "'^"'?"'@.2$#0'~'#0$#9331'"$"'@.2$#46655'\r
+                    ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.2$#0'~'#0$\r
+                    #9331'"$"'3@.2$#46655'~'#0$#9331'"'~'#0$\r
+                    #9331'"'~'#0$#9331'"$.1\r
+               DO .1 <- :2~#1\r
+               DO :2 <- "'^":1~'#9331$#0'"$":2~'#0$#9330'"'\r
+                    ~'#0$#9331'"$"'^":1~'#0$#9331'"$":2~'#9331$\r
+                    #0'"'~'#0$#9331'"\r
+               PLEASE RETRIEVE :1 + .2\r
+               PLEASE RESUME #1\r
+       (1900)  DO STASH .2 + .5\r
+               DO .1 <- #0\r
+               DO .2 <- #1\r
+               PLEASE DO (1901) NEXT\r
+       (1901)  DO FORGET #1\r
+               DO %50 (1904) NEXT\r
+               DO %50 (1901) NEXT\r
+               PLEASE DO (1903) NEXT\r
+       (1904)  DO .1 <- '^.1$.2'~'#0$#9331'\r
+               DO %50 .1 <- '^.1$.2'~'#0$#9331'\r
+       (1903)  PLEASE FORGET #1\r
+               DO %50 .1 <- '^.1$".2~#27993"'~'#0$#9331'\r
+               DO .2 <- !2$#0'~'#1555$#1'\r
+               PLEASE DO .5 <- '^".2~.2"$#1'~#1\r
+               DO (1902) NEXT\r
+               DO (1901) NEXT\r
+       (1902)  DO (1001) NEXT\r
+               DO RETRIEVE .2 + .5\r
+               PLEASE RESUME #2\r
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3\r
+               DO .3 <- #46644\r
+               DO :1 <- #6\r
+               DO (1911) NEXT\r
+               PLEASE NOTE THAT YOU CAN'T GET BLOOD FROM A TURNIP\r
+       (1912)  DO (1001) NEXT\r
+       (1911)  DO FORGET #1\r
+               PLEASE DO (1900) NEXT\r
+               DO :2 <- .1\r
+               DO (1500) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .1 <- .3\r
+               DO (1020) NEXT\r
+               PLEASE DO .3 <- .1\r
+               DO .5 <- '?"!3~.3'~#5"$#4'~#1\r
+               DO (1912) NEXT\r
+               DO .1 <- #12\r
+               PLEASE DO (1050) NEXT\r
+               DO RETRIEVE .1\r
+               DO (1530) NEXT\r
+               DO :2 <- #23328\r
+               DO (1500) NEXT\r
+               PLEASE DO .2 <- :3~'#9288$#9288'\r
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3\r
+               DO RESUME #1\r
diff --git a/pit/lib/syslib.7i b/pit/lib/syslib.7i
new file mode 100644 (file)
index 0000000..ea218e0
--- /dev/null
@@ -0,0 +1,402 @@
+               PLEASE KNOCK "SHAVE-AND-A-HAIRCUT-TWO-PLEASE" BEFORE ENTERING\r
+\r
+       (1000)  PLEASE IGNORE .4\r
+               PLEASE ABSTAIN FROM (1005)\r
+       (1009)  DO STASH .1 + .2 + .5 + .6\r
+               DO .4 <- #1\r
+               DO (1004) NEXT\r
+       (1004)  PLEASE FORGET #1\r
+               DO .3 <- '^.1$.2'~'#0$#2801'\r
+               DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#2801'"$"'^"'@.1$\r
+                    .2'~'#0$#2801'"$#2801'~'#0$#2801'"'~'#0$\r
+                    #2801'"$"'^"'2@.1$.2'~'#0$#2801'"$#5602'\r
+                    ~'#0$#2801'"'~'#0$#14005'"$#14005'~'#0$#2801'\r
+               PLEASE DO .5 <- "?!6~#14406'$#7"~#7\r
+               DO (1002) NEXT\r
+               DO .4 <- #2\r
+       (1005)  DO (1006) NEXT\r
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW\r
+       (1002)  DO (1001) NEXT\r
+       (1006)  PLEASE FORGET #1\r
+               DO .5 <- '?"!6~.6'~#6"$#7'~#7\r
+               DO (1003) NEXT\r
+               DO .1 <- .3\r
+               DO .2 <- !6$#0'~'#400$#1'\r
+               DO (1004) NEXT\r
+       (1003)  DO (1001) NEXT\r
+               DO REINSTATE (1005)\r
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6\r
+               DO REMEMBER .4\r
+               PLEASE RESUME #2\r
+       (1001)  DO RESUME .5\r
+       (1010)  DO STASH .1 + .2 + .4\r
+               DO .4 <- .1\r
+               DO .1 <- '?#16806$.2'~'#0$#2801'\r
+               DO (1020) NEXT\r
+               PLEASE DO .2 <- .4\r
+               PLEASE DO (1009) NEXT\r
+               DO RETRIEVE .1 + .2 + .4\r
+               PLEASE RESUME #1\r
+       (1020)  DO STASH .2 + .3\r
+               DO .2 <- #1\r
+               PLEASE DO (1021) NEXT\r
+       (1021)  DO FORGET #1\r
+               DO .3 <- '?"'V".1~.2"$#5'~#1"$#4'~#1\r
+               PLEASE DO .1 <- '^.1$.2'~'#0$#2801'\r
+               DO (1022) NEXT\r
+               DO .2 <- !2$#0'~'#400$#1'\r
+               DO (1021) NEXT\r
+       (1023)  PLEASE RESUME .3\r
+       (1022)  DO (1023) NEXT\r
+               PLEASE RETRIEVE .2 + .3\r
+               PLEASE RESUME #2\r
+       (1030)  DO ABSTAIN FROM (1033)\r
+               PLEASE ABSTAIN FROM (1032)\r
+       (1039)  DO STASH :1 + .5\r
+               DO (1530) NEXT\r
+               DO .3 <- :1~#2801\r
+               PLEASE DO .5 <- :1~'#2793$#2744'\r
+               DO .5 <- '?"!5~.5'~#6"$#7'~#7\r
+               DO (1031) NEXT\r
+       (1032)  DO (1033) NEXT\r
+               DO (1999) NEXT\r
+       (1031)  DO (1001) NEXT\r
+       (1033)  DO .4 <- .5\r
+               DO REINSTATE (1032)\r
+               PLEASE REINSTATE (1033)\r
+               DO RETRIEVE :1 + .5\r
+               PLEASE RESUME #2\r
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               DO STASH :1\r
+               PLEASE RETRIEVE .2\r
+               DO .1 <- .2\r
+               DO .2 <- #0\r
+               PLEASE DO (1520) NEXT\r
+               DO :2 <- :1\r
+               DO RETRIEVE .1 + .2 + :1\r
+               DO (1550) NEXT\r
+               PLEASE DO .3 <- :3\r
+               DO RETRIEVE :1 + :2 + :3\r
+               DO RESUME #1\r
+       (1050)  PLEASE STASH :2 + :3 + .5\r
+               DO :2 <- .1\r
+               PLEASE DO (1550) NEXT\r
+               DO .5 <- :3~'#2793$#2744'\r
+               DO .5 <- '?"!5~.5'~#6"$#7'~#7\r
+               DO (1051) NEXT\r
+               DO (1999) NEXT\r
+       (1051)  DO (1001) NEXT\r
+               DO .2 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + .5\r
+               DO RESUME #2\r
+       (1500)  PLEASE ABSTAIN FROM (1502)\r
+               PLEASE ABSTAIN FROM (1506)\r
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO .1 <- :1~#2801\r
+               PLEASE DO .2 <- :2~#2801\r
+               DO (1009) NEXT\r
+               DO .5 <- .3\r
+               PLEASE DO .6 <- .4\r
+               DO .1 <- :1~'#2793$#2744'\r
+               DO .2 <- :2~'#2793$#2744'\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               PLEASE DO (1503) NEXT\r
+               DO .6 <- .4\r
+               DO .2 <- #1\r
+               DO (1009) NEXT\r
+               DO .1 <- .3\r
+               DO (1501) NEXT\r
+       (1504)  PLEASE RESUME .6\r
+       (1503)  DO (1504) NEXT\r
+       (1501)  DO .2 <- .5\r
+               DO .5 <- '&.6$.4'\r
+               DO (1505) NEXT\r
+       (1506)  DO (1502) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1505)  DO (1001) NEXT\r
+       (1502)  DO :4 <- .5\r
+               DO (1520) NEXT\r
+               DO :3 <- :1\r
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6\r
+               DO REINSTATE (1502)\r
+               DO REINSTATE (1506)\r
+               PLEASE RESUME #3\r
+       (1510)  DO STASH :1 + :2 + :4\r
+               DO :1 <- "'?#16806$":2~'#2801$#0'"'~'#0$#2801'"$\r
+                    "'?#16806$":2~'#0$#2801'"'~'#0$#2801'"\r
+               DO :2 <- #1\r
+               DO (1509) NEXT\r
+               PLEASE RETRIEVE :1\r
+               DO :2 <- :3\r
+               PLEASE DO (1509) NEXT\r
+               DO RETRIEVE :2 + :4\r
+               PLEASE RESUME #1\r
+       (1520)  PLEASE STASH .3 + .4\r
+               DO .3 <- .1~#2451\r
+               DO (1525) NEXT\r
+               PLEASE DO .4 <- 'V.3$".2~#350"'~'#0$#2801'\r
+               DO .3 <- .1~#350\r
+               PLEASE DO (1526) NEXT\r
+               DO :1 <- .4$"'V.3$".2~#2451"'~'#0$#2801'"\r
+               PLEASE RETRIEVE .3 + .4\r
+               DO RESUME #1\r
+       (1525)  DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#400$#1'\r
+               PLEASE RESUME #1\r
+       (1526)  DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#57$#8'\r
+               PLEASE RESUME #1\r
+       (1530)  DO STASH :2 + :3 + :4 + .1 + .2 + .5\r
+               DO :3 <- #0\r
+               DO :4 <- .2\r
+               DO (1535) NEXT\r
+       (1535)  PLEASE FORGET #1\r
+               DO .5 <- '?".1~#6"$#7'~#7\r
+               DO (1531) NEXT\r
+               DO :1 <- :4\r
+               DO (1720) NEXT\r
+               DO :1 <- :3\r
+               DO (1500) NEXT\r
+               PLEASE DO (1533) NEXT\r
+       (1531)  PLEASE DO (1001) NEXT\r
+       (1533)  DO FORGET #1\r
+               DO .1 <- .1~#2800\r
+               DO :4 <- ":4~'#0$#2801'"$"'":4~'#400$#0'"$#0'\r
+                   ~'#400$#1'"\r
+               PLEASE DO .5 <- '?"!1~.1'~#6"$#7'~#7\r
+               DO (1532) NEXT\r
+               DO (1535) NEXT\r
+       (1532)  DO (1001) NEXT\r
+               DO :1 <- :3\r
+               PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1540)  PLEASE ABSTAIN FROM (1541)\r
+               DO ABSTAIN FROM (1542)\r
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5\r
+               DO .1 <- :1~#2801\r
+               PLEASE DO .2 <- :2~'#2793$#2744'\r
+               DO .5 <- :1~'#2793$#2744'\r
+               DO (1530) NEXT\r
+               DO :3 <- :1\r
+               DO .2 <- :2~#2801\r
+               PLEASE DO (1530) NEXT\r
+               DO :5 <- :1\r
+               DO .1 <- .5\r
+               DO (1530) NEXT\r
+               DO :4 <- :1\r
+               PLEASE DO :1 <- ":3~'#2793$#2744'"$":4\r
+                    ~'#2793$#2744'"\r
+               DO .5 <- ':1~:1'~#6\r
+               DO .2 <- :2~'#2793$#2744'\r
+               DO (1530) NEXT\r
+               PLEASE DO .5 <- '"':1~:1'~#6"$.5'~#8\r
+               DO .1 <- :3~#2801\r
+               DO .2 <- #0\r
+               DO (1520) NEXT\r
+               PLEASE DO :2 <- :1\r
+               PLEASE DO .1 <- :4~#2801\r
+               DO (1520) NEXT\r
+               DO (1509) NEXT\r
+               DO .5 <- !5$"'^":4~#1"$#4'~#1"'~#351\r
+               DO :1 <- :3\r
+               DO :2 <- :5\r
+               DO (1509) NEXT\r
+               PLEASE DO .5 <- !5$"'^":4~#1"$#4'~#1"'~'#57$#1'\r
+               DO .5 <- '?"!5~.5'~#1"$#4'~#1\r
+               PLEASE RETRIEVE :4\r
+       (1541)  DO :4 <- .5\r
+               DO (1543) NEXT\r
+       (1542)  DO (1544) NEXT\r
+               PLEASE DO (1999) NEXT\r
+       (1543)  DO (1001) NEXT\r
+       (1544)  DO REINSTATE (1541)\r
+               PLEASE REINSTATE (1542)\r
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5\r
+               DO RESUME #2\r
+       (1550)  DO STASH :1 + :4 + :5 + :6 + .1 + .5\r
+               DO :5 <- #0\r
+               DO .5 <- '?"':2~:2'~#6"$#7'~#7\r
+               PLEASE DO (1551) NEXT\r
+               DO :4 <- #1\r
+               PLEASE DO (1553) NEXT\r
+       (1553)  DO FORGET #1\r
+               DO .5 <- '?"':2~"#14406$#0"'"$#5'~#1\r
+               DO (1552) NEXT\r
+               DO :2 <- ":2~'#0$#2801'"$"'":2~'#400$#0'"$#0'\r
+                    ~'#400$#1'"\r
+               PLEASE DO :4 <- ":4~'#0$#2801'"$"'":4~'#400\r
+                    $#0'"$#0'~'#400$#1'"\r
+               DO (1553) NEXT\r
+       (1552)  DO (1001) NEXT\r
+               DO .1 <- #0\r
+       (1556)  PLEASE FORGET #1\r
+               DO :6 <- "'&":2~'#2801$#0'"$"'?#16806$":1\r
+                    ~'#2801$#0'"'~'#0$#2801'"'~'#0$#2801'"$\r
+                    "'&":2~'#0$#2801'"$"'?#16806$":1~'#0$\r
+                    #2801'"'~'#0$#2801'"'~'#0$#2801'"\r
+               DO :3 <- "'?":1~'#2801$#0'"$":2~'#2801$#0'"'\r
+                    ~'#0$#2801'"$"'?":1~'#0$#2801'"$":2~'#0$\r
+                    #2801'"'~'#0$#2801'"\r
+               DO :6 <- "'&":6~'#2801$#0'"$":3~'#2801$#0'"'\r
+                    ~'#0$#2801'"$"'&":6~'#0$#2801'"$":3~'#0$\r
+                    #2801'"'~'#0$#2801'"\r
+               DO :3 <- :3~'#16806$#16806'\r
+               DO :6 <- "'?"'V":6~'#2801$#0'"$#11204'~'#0$\r
+                    #2801'"$#11204'~'#0$#16806'"$"'?"'V":6\r
+                    ~'#0$#2801'"$#11204'~'#0$#2801'"$#11204'\r
+                    ~'#0$#16806'"\r
+               DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#2801$#0'"$\r
+                    #2401'~'#0$#2801'"$"'?:3~:3'~'#400$#0'"'\r
+                    ~'#2401$#400'"$"'?:3~:3'~'#0$#2801'"'"~#1'$\r
+                    #5"~#1\r
+               PLEASE DO (1557) NEXT\r
+               DO (1510) NEXT\r
+               DO :1 <- :3\r
+               DO .5 <- '?#0$"'V.1$#5'~#1"'~#1\r
+               DO (1557) NEXT\r
+               DO .1 <- '^.1$#2801'~'#0$#2801'\r
+               DO (1556) NEXT\r
+       (1557)  PLEASE DO (1001) NEXT\r
+               PLEASE FORGET #1\r
+               DO :5 <- "'V":4~'.1$#0'"$":5~'#2801$#0'"'\r
+                    ~'#0$#2801'"$"'V":4~'#0$.1'"$":5~'#0$\r
+                    #2801'"'~'#0$#2801'"\r
+               DO .5 <- "?#2$':4~#1'"~#1\r
+               DO (1551) NEXT\r
+               DO :2 <- :2~'#2801$#2800'\r
+               DO :4 <- :4~'#2801$#2800'\r
+               DO .1 <- #0\r
+               PLEASE DO (1556) NEXT\r
+       (1551)  DO (1001) NEXT\r
+               DO :3 <- :5\r
+               PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5\r
+               PLEASE RESUME #2\r
+       (1720)  PLEASE STASH :1 + :3 + :4 + .1 + .5\r
+               DO :2 <- #0\r
+               DO .2 <- #0\r
+               DO .5 <- '?".1~#6"$#7'~#7\r
+               DO (1729) NEXT\r
+               DO .5 <- .1~#1\r
+               DO .2 <- :1~'#2801$#0'\r
+               DO .1 <- :1~'#0$#2801'\r
+               PLEASE DO (1726) NEXT\r
+               DO :1 <- '"?#0$.2"~"#0$#2801"'$'"?#0$.1"~"#0$\r
+                    #2801"'\r
+               DO :2 <- '"?'"V.2$#2801"~"#0$#2801"'$#2801"\r
+                    ~"#0$#2801"'$'"?'"V.1$#2801"~"#0$#2801"'$\r
+                    #2801"~"#0$#2801"'\r
+               DO (1728) NEXT\r
+       (1726)  PLEASE DO (1725) NEXT\r
+               DO :1 <- '"?#0$'"^.2$.2"~"#0$#2801"'"~"#0$\r
+                    #2801"'$'"?#0$'"^.1$.1"~"#0$#2801"'"~"#0$\r
+                    #2801"'\r
+               DO .2 <- "^'"V'"2@.2$#11204"~"#0$#2801"'$\r
+                    #5602"~"#0$#2801"'$'"2@.2$#2801"~"#0$\r
+                    #2801"'"~"#0$#2801"\r
+               DO .1 <- "^'"V'"2@.1$#11204"~"#0$#2801"'$\r
+                    #5602"~"#0$#2801"'$'"2@.1$#2801"~"#0$\r
+                    #2801"'"~"#0$#2801"\r
+               DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403"\r
+                    ~"#0$#2801"'\r
+       (1728)  DO .2 <- :2~'#2401$#0'\r
+               DO :2 <- ':2~"#0$#2801"'$'"':2~"#400$#0"'$#0"\r
+                    ~"#400$#1"'\r
+               DO (1509) NEXT\r
+               DO :2 <- :3\r
+               DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1\r
+               DO (1721) NEXT\r
+       (1725)  PLEASE DO (1724) NEXT\r
+               DO :2 <- '"?'"V'"?'"3@.2$#14005"~"#0$#2801"'$\r
+                    '"@.2$#0"~"#0$#2801"'"~"#0$#11204"'$#8403"\r
+                    ~"#0$#2801"'$#8403"~"#0$#2801"'$\r
+                    '"?'"V'"?'"3@.1$#14005"~"#0$#2801"'$'"@.1$\r
+                    #0"~"#0$#2801"'"~"#0$#11204"'$#8403"~"#0$\r
+                    #2801"'$#8403"~"#0$#2801"'\r
+               DO .2 <- '^.2$.2'~'#0$#2801'\r
+               DO .1 <- '^.1$.1'~'#0$#2801'\r
+               DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$\r
+                    #2801"'\r
+               PLEASE FORGET #2\r
+               DO (1728) NEXT\r
+       (1724)  PLEASE DO (1723) NEXT\r
+               DO :1 <- '"^'"^.2$.2"~"#0$#2801"'$.2"~"#0$\r
+                    #2801"'$'"^'"^.1$.1"~"#0$#2801"'$.1"\r
+                    ~"#0$#2801"'\r
+               DO .2 <- "^'"V'"2@.2$#16806"~"#0$#2801"'$\r
+                    #14005"~"#0$#2801"'$'"V'"4@.2$#16806"\r
+                    ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$\r
+                    #2801"\r
+               DO .1 <- "^'"V'"2@.1$#16806"~"#0$#2801"'$\r
+                    #14005"~"#0$#2801"'$'"V'"4@.1$#16806"\r
+                    ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$\r
+                    #2801"\r
+               DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403"\r
+                    ~"#0$#2801"'\r
+               PLEASE FORGET #3\r
+               DO (1728) NEXT\r
+       (1723)  PLEASE DO (1722) NEXT\r
+               DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$\r
+                    #2801"'\r
+               DO :2 <- '"?'"V'"3@.2$#16806"~"#0$#2801"'$\r
+                    #14005"~"#0$#2801"'$#14005"~"#0$#2801"'$\r
+                    '"?'"V'"3@.1$#16806"~"#0$#2801"'$#14005"\r
+                    ~"#0$#2801"'$#14005"~"#0$#2801"'\r
+               PLEASE FORGET #4\r
+               DO (1728) NEXT\r
+       (1729)  DO (1001) NEXT\r
+               DO (1721) NEXT\r
+       (1722)  PLEASE DO (1001) NEXT\r
+               DO :2 <- :1\r
+               DO .2 <- #0\r
+               DO FORGET #3\r
+       (1721)  PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5\r
+               PLEASE RESUME #3\r
+       (1900)  DO STASH .2 + .5\r
+               DO .1 <- #0\r
+               DO .2 <- #1\r
+               PLEASE DO (1901) NEXT\r
+       (1901)  DO FORGET #1\r
+               DO %50 (1905) NEXT\r
+               DO %50 (1904) NEXT\r
+               DO %50 (1901) NEXT\r
+               PLEASE DO (1903) NEXT\r
+       (1905)  DO FORGET #1\r
+               DO .1 <- '^.1$".2~#8403"'~'#0$#2801'\r
+               PLEASE DO %50 .1 <- '^.1$".2~#5602"'~'#0$#2801'\r
+               DO (1906) NEXT\r
+       (1904)  DO .1 <- '^.1$.2'~'#0$#2801'\r
+       (1906)  DO %50 .1 <- '^.1$.2'~'#0$#2801'\r
+       (1903)  PLEASE FORGET #1\r
+               DO .2 <- !2$#0'~'#400$#1'\r
+               PLEASE DO .5 <- '^".2~.2"$#1'~#1\r
+               DO (1902) NEXT\r
+               DO (1901) NEXT\r
+       (1902)  DO (1001) NEXT\r
+               DO RETRIEVE .2 + .5\r
+               PLEASE RESUME #2\r
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3\r
+               DO .3 <- #16795\r
+               DO :1 <- #6\r
+               DO (1911) NEXT\r
+               PLEASE NOTE THAT YOU CAN'T GET SENSE FROM INTERCAL\r
+       (1912)  DO (1001) NEXT\r
+       (1911)  DO FORGET #1\r
+               PLEASE DO (1900) NEXT\r
+               DO :2 <- .1\r
+               DO (1500) NEXT\r
+               PLEASE DO :1 <- :3\r
+               DO .1 <- .3\r
+               DO (1020) NEXT\r
+               PLEASE DO .3 <- .1\r
+               DO .5 <- '?"!3~.3'~#6"$#5'~#1\r
+               DO (1912) NEXT\r
+               DO .1 <- #12\r
+               PLEASE DO (1050) NEXT\r
+               DO RETRIEVE .1\r
+               DO (1530) NEXT\r
+               DO :2 <- #8403\r
+               DO (1500) NEXT\r
+               PLEASE DO .2 <- :3~'#2793$#2744'\r
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3\r
+               DO RESUME #1\r
diff --git a/pit/lib/syslib.doc b/pit/lib/syslib.doc
new file mode 100644 (file)
index 0000000..e8e637d
--- /dev/null
@@ -0,0 +1,103 @@
+
+The file syslib_old.i is the version of the system library included
+in the original manual.  RTFM for descriptions of the routines.  Only
+minimal changes have been made in the current version, as follows:
+
+1.  Someone added
+                PLEASE KNOCK BEFORE ENTERING
+as the first line, presumably to prevent programs from running off the
+end and into the first library routine by mistake.
+
+The other two changes are bug fixes.  The bugs appear in all copies of
+the library that I have, including the manual from Don Woods (via Mike
+Ernst) with carriage controls in the first column.  Unless a still more
+ancient copy of the library can be found (like in the Dead Sea Scrolls,
+perhaps?) we have to assume these bugs have been in there from the
+beginning, or at least since the library was converted from EBCDIC to
+ASCII and incorporated into the manual.
+
+2.  Jacob Mandelson found a bug in the 32-bit division routine where a
+select (~) had been substituted for a mingle ($) by mistake.  This is at
+the end of line 229 of syslib_old.i.  I have not checked or tested this
+correction, but it seems reasonable since select at that position would
+be pointless, but mingle is plausible.
+
+3.  I have found either two or three bugs in the 32-bit multiplication
+routines, depending on how you count.  These only affected the overflow
+checking, but the effect was that every single call to (1540) or (1549)
+would behave as if there were an overflow.
+
+The first is straightforward.  The statement
+               PLEASE DO :1 <- ":3~'#65280$#65280'"$":5~'#652
+           80$#65280'"
+must be changed to
+               PLEASE DO :1 <- ":3~'#65280$#65280'"$":4~'#652
+           80$#65280'"
+Not only is this the "right thing to do", but the position of this
+statement just after :4 has been computed suggests that it was what
+the original author intended.
+
+The remaining problems, however, are not so clearly due to typos.  The
+32-bit multiplication is done by splitting each input into its low and
+high 16-bit halves, computing partial products with the (1530) 16 to
+32-bit multiplication routine, and then adding them together using
+(1509), addition with overflow check.  The statements to look at are
+the ones where the overflow flags from successive steps are accumulated
+in .5, as follows:
+
+       [a]     DO .5 <- ':1~:1'~#1
+                ...
+
+       [b]     PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3
+                ...
+
+               DO (1509) NEXT
+       [c]     DO .5 <- !5$":4~#3"'~#15
+                ...
+
+               DO (1509) NEXT
+       [d]     PLEASE DO .5 <- !5$":4~#3"'~#63
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+
+.5 gets a bit if the high-high product is nonzero (wasteful to even compute
+this product, actually), and another if either of the high-low products
+overflows (that's the statement with the previous bug, above).  It then
+gets combined with the overflow flags in :4 from the two addition calls.
+Each new flag is mingled with the ones already in .5, so various bits of
+.5 correspond to the different possible overflows.  Finally, .5 is tested
+to see if it is nonzero, and if so an overflow results.
+
+Note the expressions ":4~#3".  :4 is returned by (1509) as #2 if there is
+an overflow, #1 if not.  It either case a bit is set in .5.  This is why
+the routines signaled an overflow every time.  Note also the ~#63 in line
+[d].  At this point the bit representing existence of the high-high
+product has shifted out to the 128-bit, so ~#63 will miss it.
+
+I see three ways out, none of which are obviously the author's intent:
+
+  (1) At statement [d] the bit pattern is 101011XX, where 1's indicate
+  overflows and X's are set by (1509) without overflow.  If we replace
+  ~#63 with ~#172 we test exactly the bits we want.  This is the one
+  I've used since it is the minimal change.
+
+  (2) If we replace ":4~#3" with ":4~#2" we only have bits set on overflow,
+  which seems cleaner.  The bit pattern is 10001011 so we still can't use
+  ~#63, we have to use ~#139 or ~#255 or something similar to get all the
+  bits.  Actually, the final selects in lines [b], [c] and [d] are all
+  superfluous in this case since the bits discarded are all zero and the
+  selected quantity can be safely assigned to the 16-bit .5.
+
+  (3) If we replace ":4~#3" with ":4~#2" and reverse the mingles to look
+  like '":4~#2"$.5' then the final bit pattern is 10111 and ~#63 will work,
+  though it is not necessary.
+
+There are other solutions, of course, but I don't see any simpler ones
+than these.  If you think ":4~#3" accomplishes nothing, so ":4~#2" must be
+meant, note that ":4~#3" converts :4 to 16-bit.  The original compiler
+apparently required arguments to mingle to be 16-bit, whereas I think
+the C-INTERCAL compiler only requires them to be less than #0$#256.
+":4$.5" would thus be technically illegal, even though it might work in
+C-INTERCAL.
+
+                                Louis Howell
+                                May 25, 1996
diff --git a/pit/lib/syslib.i b/pit/lib/syslib.i
new file mode 100644 (file)
index 0000000..ace68f7
--- /dev/null
@@ -0,0 +1,289 @@
+               PLEASE KNOCK BEFORE ENTERING
+
+       (1000)  PLEASE IGNORE .4
+               PLEASE ABSTAIN FROM (1005)
+       (1009)  DO STASH .1 + .2 + .5 + .6
+               DO .4 <- #1
+               DO (1004) NEXT
+       (1004)  PLEASE FORGET #1
+               DO .3 <- '?.1$.2'~'#0$#65535'
+               DO .6 <- '&.1$.2'~'#0$#65535'
+               PLEASE DO .5 <- "?!6~#32768'$#1"~#3
+               DO (1002) NEXT
+               DO .4 <- #2
+       (1005)  DO (1006) NEXT
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW
+       (1002)  DO (1001) NEXT
+       (1006)  PLEASE FORGET #1
+               DO .5 <- '?"!6~.6'~#1"$#1'~#3
+               DO (1003) NEXT
+               DO .1 <- .3
+               DO .2 <- !6$#0'~'#32767$#1'
+               DO (1004) NEXT
+       (1003)  DO (1001) NEXT
+               DO REINSTATE (1005)
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6
+               DO REMEMBER .4
+               PLEASE RESUME #2
+       (1001)  DO RESUME .5
+       (1010)  DO STASH .1 + .2 + .4
+               DO .4 <- .1
+               DO .1 <- '?.2$#65535'~'#0$#65535'
+               DO (1020) NEXT
+               PLEASE DO .2 <- .4
+               PLEASE DO (1009) NEXT
+               DO RETRIEVE .1 + .2 + .4
+               PLEASE RESUME #1
+       (1020)  DO STASH .2 + .3
+               DO .2 <- #1
+               PLEASE DO (1021) NEXT
+       (1021)  DO FORGET #1
+               DO .3 <- "?!1~.2'$#1"~#3
+               PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+               DO (1022) NEXT
+               DO .2 <- !2$#0'~'#32767$#1'
+               DO (1021) NEXT
+       (1023)  PLEASE RESUME .3
+       (1022)  DO (1023) NEXT
+               PLEASE RETRIEVE .2 + .3
+               PLEASE RESUME #2
+       (1030)  DO ABSTAIN FROM (1033)
+               PLEASE ABSTAIN FROM (1032)
+       (1039)  DO STASH :1 + .5
+               DO (1530) NEXT
+               DO .3 <- :1~#65535
+               PLEASE DO .5 <- :1~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1031) NEXT
+       (1032)  DO (1033) NEXT
+               DO (1999) NEXT
+       (1031)  DO (1001) NEXT
+       (1033)  DO .4 <- .5
+               DO REINSTATE (1032)
+               PLEASE REINSTATE (1033)
+               DO RETRIEVE :1 + .5
+               PLEASE RESUME #2
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3
+               DO .2 <- #0
+               DO (1520) NEXT
+               DO STASH :1
+               PLEASE RETRIEVE .2
+               DO .1 <- .2
+               DO .2 <- #0
+               PLEASE DO (1520) NEXT
+               DO :2 <- :1
+               DO RETRIEVE .1 + .2 + :1
+               DO (1550) NEXT
+               PLEASE DO .3 <- :3
+               DO RETRIEVE :1 + :2 + :3
+               DO RESUME #1
+       (1050)  PLEASE STASH :2 + :3 + .5
+               DO :2 <- .1
+               PLEASE DO (1550) NEXT
+               DO .5 <- :3~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1051) NEXT
+               DO (1999) NEXT
+       (1051)  DO (1001) NEXT
+               DO .2 <- :3
+               PLEASE RETRIEVE :2 + :3 + .5
+               DO RESUME #2
+       (1500)  PLEASE ABSTAIN FROM (1502)
+               PLEASE ABSTAIN FROM (1506)
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~#65535
+               DO (1009) NEXT
+               DO .5 <- .3
+               PLEASE DO .6 <- .4
+               DO .1 <- :1~'#65280$#65280'
+               DO .2 <- :2~'#65280$#65280'
+               DO (1009) NEXT
+               DO .1 <- .3
+               PLEASE DO (1503) NEXT
+               DO .6 <- .4
+               DO .2 <- #1
+               DO (1009) NEXT
+               DO .1 <- .3
+               DO (1501) NEXT
+       (1504)  PLEASE RESUME .6
+       (1503)  DO (1504) NEXT
+       (1501)  DO .2 <- .5
+               DO .5 <- '?"'&.6$.4'~#1"$#2'~#3
+               DO (1505) NEXT
+       (1506)  DO (1502) NEXT
+               PLEASE DO (1999) NEXT
+       (1505)  DO (1001) NEXT
+       (1502)  DO :4 <- .5
+               DO (1520) NEXT
+               DO :3 <- :1
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO REINSTATE (1502)
+               DO REINSTATE (1506)
+               PLEASE RESUME #3
+       (1510)  DO STASH :1 + :2 + :4
+               DO :1 <- "'?":2~'#65535$#0'"$#65535'~'#0$#65535'"$
+                    "'?":2~'#0$#65535'"$#65535'~'#0$#65535'"
+               DO :2 <- #1
+               DO (1509) NEXT
+               PLEASE RETRIEVE :1
+               DO :2 <- :3
+               PLEASE DO (1509) NEXT
+               DO RETRIEVE :2 + :4
+               PLEASE RESUME #1
+       (1520)  PLEASE STASH .3 + .4
+               DO .3 <- .1~#43690
+               DO (1525) NEXT
+               PLEASE DO .4 <- 'V.3$".2~#43690"'~'#0$#65535'
+               DO .3 <- .1~#21845
+               PLEASE DO (1525) NEXT
+               DO :1 <- .4$"'V.3$".2~#21845"'~'#0$#65535'"
+               PLEASE RETRIEVE .3 + .4
+               DO RESUME #1
+       (1525)  DO .3 <- '"'"'"!3$#0'~'#32767$#1'"$#0'~'#32767$
+                    #1'"$#0'~'#16383$#3'"$#0'~'#4095$#15'
+               PLEASE RESUME #1
+       (1530)  DO STASH :2 + :3 + .3 + .5
+               DO :1 <- #0
+               DO :2 <- .2
+               DO .3 <- #1
+               DO (1535) NEXT
+       (1535)  PLEASE FORGET #1
+               DO .5 <- "?!1~.3'$#1"~#3
+               DO (1531) NEXT
+               DO (1500) NEXT
+               DO :1 <- :3
+               PLEASE DO (1533) NEXT
+       (1531)  PLEASE DO (1001) NEXT
+       (1533)  DO FORGET #1
+               DO .3 <- !3$#0'~'#32767$#1'
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$
+                    #0'~'#32767$#1'"
+               PLEASE DO .5 <- "?!3~.3'$#1"~#3
+               DO (1532) NEXT
+               DO (1535) NEXT
+       (1532)  DO (1001) NEXT
+               PLEASE RETRIEVE :2 + :3 + .3 + .5
+               DO RESUME #2
+       (1540)  PLEASE ABSTAIN FROM (1541)
+               DO ABSTAIN FROM (1542)
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~'#65280$#65280'
+               DO .5 <- :1~'#65280$#65280'
+               DO (1530) NEXT
+               DO :3 <- :1
+               DO .2 <- :2~#65535
+               PLEASE DO (1530) NEXT
+               DO :5 <- :1
+               DO .1 <- .5
+               DO (1530) NEXT
+               DO :4 <- :1
+               PLEASE DO :1 <- ":3~'#65280$#65280'"$":4~'#65280$
+                    #65280'"
+               DO .5 <- ':1~:1'~#1
+               DO .2 <- :2~'#65280$#65280'
+               DO (1530) NEXT
+               PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3
+               DO .1 <- :3~#65535
+               DO .2 <- #0
+               DO (1520) NEXT
+               PLEASE DO :2 <- :1
+               PLEASE DO .1 <- :4~#65535
+               DO (1520) NEXT
+               DO (1509) NEXT
+               DO .5 <- !5$":4~#3"'~#15
+               DO :1 <- :3
+               DO :2 <- :5
+               DO (1509) NEXT
+               PLEASE DO .5 <- !5$":4~#3"'~#172
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               PLEASE RETRIEVE :4
+       (1541)  DO :4 <- .5
+               DO (1543) NEXT
+       (1542)  DO (1544) NEXT
+               PLEASE DO (1999) NEXT
+       (1543)  DO (1001) NEXT
+       (1544)  DO REINSTATE (1541)
+               PLEASE REINSTATE (1542)
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5
+               DO RESUME #2
+       (1550)  DO STASH :1 + :4 + :5 + .5
+               DO :3 <- #0
+               DO .5 <- '?"':2~:2'~#1"$#1'~#3
+               PLEASE DO (1551) NEXT
+               DO :4 <- #1
+               PLEASE DO (1553) NEXT
+       (1553)  DO FORGET #1
+               DO .5 <- '?":2~'#32768$#0'"$#2'~#3
+               DO (1552) NEXT
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+                    0'~'#32767$#1'"
+               PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767
+                    $#0'"$#0'~'#32767$#1'"
+               DO (1553) NEXT
+       (1552)  DO (1001) NEXT
+       (1556)  PLEASE FORGET #1
+               DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"'
+                    ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535$
+                    #65535"'~'#65535$#0'"$#32768'~'#0$#65535'"
+                    $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"'
+                    "$"':5~:5'~#1"'~#1"$#2'~#3
+               DO (1554) NEXT
+               DO :5 <- :3
+               DO (1510) NEXT
+               PLEASE DO :1 <- :3
+               DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"'
+                    ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO (1555) NEXT
+       (1554)  PLEASE DO (1001) NEXT
+       (1555)  DO FORGET #1
+               DO .5 <- "?':4~#1'$#2"~#3
+               DO (1551) NEXT
+               DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'"
+               DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'"
+               PLEASE DO (1556) NEXT
+       (1551)  DO (1001) NEXT
+               PLEASE RETRIEVE :1 + :4 + :5 + .5
+               PLEASE RESUME #2
+       (1900)  DO STASH .2 + .3 + .5
+               DO .1 <- #0
+               DO .2 <- #1
+               PLEASE DO (1901) NEXT
+       (1901)  DO FORGET #1
+               DO %50 .1 <- 'V.1$.2'~'#0$#65535'
+               DO .2 <- !2$#0'~'#32767$#1'
+               PLEASE DO .5 <- "?!2~.2'$#1"~#3
+               DO (1902) NEXT
+               DO (1901) NEXT
+       (1902)  DO (1001) NEXT
+               DO RETRIEVE .2 + .3 + .5
+               PLEASE RESUME #2
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3
+               DO .3 <- #65524
+               DO :1 <- #6
+               DO (1911) NEXT
+               PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE
+       (1912)  DO (1001) NEXT
+       (1911)  DO FORGET #1
+               PLEASE DO (1900) NEXT
+               DO :2 <- .1
+               DO (1500) NEXT
+               PLEASE DO :1 <- :3
+               DO .1 <- .3
+               DO (1020) NEXT
+               PLEASE DO .3 <- .1
+               DO .5 <- '?"!3~.3'~#1"$#2'~#3
+               DO (1912) NEXT
+               DO .1 <- #12
+               PLEASE DO (1050) NEXT
+               DO RETRIEVE .1
+               DO (1530) NEXT
+               DO :2 <- #32768
+               DO (1500) NEXT
+               PLEASE DO .2 <- :3~'#65280$#65280'
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3
+               DO RESUME #1
diff --git a/pit/lib/syslib3-7.doc b/pit/lib/syslib3-7.doc
new file mode 100644 (file)
index 0000000..f3a372d
--- /dev/null
@@ -0,0 +1,53 @@
+Although the non-binary libraries syslib.[3-7]i are meant to be
+treated as workalikes with the original system library, it should be
+noted that several of them contain some new routines. These are used
+internally by the standard routines, and are there to provide methods
+for doing a few things that are taken for granted in base 2. While
+they were not intended to be used by other programs, there is nothing
+stopping them from being so used.
+
+The even bases have routines to double and halve values, and use a
+third variable as a carry/borrow flag. Since halving in odd bases
+produces infinite fractions, bases 5 and 7 instead use a single-digit
+multiplication routine. (Base 3 multiplication is still simple enough
+to be handled without a separate support routine.)
+
+syslib.4i
+---------
+(1200) .2 <- .1 times two
+       .3 <- #0 if no overflow, otherwise .3 contains the quart that
+       was "shifted" off the left end
+(1210) .2 <- .1 divided by two
+       .3 <- #0 if .1 is even, otherwise .3 contains #2
+(1700) :2 <- :1 times two
+       .1 <- #0 if no overflow, otherwise .1 contains the quart that
+       was "shifted" off the left end
+(1710) :2 <- :1 divided by two
+       .1 <- #0 if .1 is even, otherwise .1 contains #2
+
+syslib.5i
+---------
+(1720) :2 <- :1 times the least significant quint of .1 (the remaining
+       quints of .1 are ignored)
+       .2 <- #0 if no overflow, otherwise .2 contains the quint that
+       was "shifted" off the left end
+
+syslib.6i
+---------
+(1200) .2 <- .1 times two
+       .3 <- #0 if no overflow, otherwise .3 contains the sext that
+       was "shifted" off the left end
+(1210) .2 <- .1 divided by two
+       .3 <- #0 if .1 is even, otherwise .3 contains #3
+(1700) :2 <- :1 times two
+       .1 <- #0 if no overflow, otherwise .1 contains the sext that
+       was "shifted" off the left end
+(1710) :2 <- :1 divided by two
+       .1 <- #0 if .1 is even, otherwise .1 contains #3
+
+syslib.7i
+---------
+(1720) :2 <- :1 times the least significant sept of .1 (the remaining
+       septs of .1 are ignored)
+       .2 <- #0 if no overflow, otherwise .2 contains the sept that
+       was "shifted" off the left end
diff --git a/pit/life.doc b/pit/life.doc
new file mode 100644 (file)
index 0000000..494886e
--- /dev/null
@@ -0,0 +1,162 @@
+
+As documentation for the program life.i, I am including below the original
+posting message, with the program itself deleted.  The present program
+life.i is nearly identical to the one that was posted.  The only two
+changes are that I have fixed a bug where a 32-bit number was assigned
+to a 16-bit variable, and I have streamlined the decrement routine---
+entry points (2000) and (2010)---by eliminating a temporary variable.
+The old versions of these code fragments are included at the end of
+the file.
+
+                           Louis Howell
+                           November 24, 1991
+
+-----------------------------------------------------------------------------
+
+Subject: Life with Intercal (long)
+Newsgroups: alt.lang.intercal
+From: Louis Howell
+Date: Mon, 28 Jan 91 09:17:36 PST
+
+I suppose some of you are wondering if anyone ever actually writes anything
+in Intercal, or if we all just sit around beating on the compiler and
+talking about how wonderful this crock would be if XXX feature were added
+to it.  I submit the following beast as a demonstration that a vaguely
+interesting program can be written in the language.  Of course, none of
+you can actually RUN this program, since the 0.6 compiler doesn't handle
+arrays.  Take my word for it that it works, and I promise to finish up
+a couple of remaining details in the array implementation and send it
+off to Steve Real Soon Now (sometime this week, with luck).
+
+The program first takes three numbers as input:  The dimensions of the
+grid and the desired number of time steps.  It then accepts pairs of
+numbers indicating which cells are live in the initial state; this
+list of pairs is terminated by a ZERO or OH.  Then it plays Life.
+When the final timestep is reached, or when the system overflows the
+grid, the program prints out pairs of numbers indicating which cells
+were live in the last state reached, followed by the number of time
+steps that were actually executed.
+
+The implementation is not as efficient as it could be by a long shot---
+I just wanted to get something that worked.  I use two arrays, ,1 and ,2,
+both with dimensions .11 BY .12.  At each time step the next position
+based on data in ,1 is computed and stored in ,2 for all cells in the
+interior of the grid.  Then this portion of the grid is copied back
+into ,1.  (The cells on the edge of the grid are never changed, they just
+hold zeroes that are seen by the neighborhood calculations of interior
+cells.)  Then the current time step is incremented, and if equal to the
+desired final time step the program jumps to the output routine.  If
+not, it checks the ring of cells next in from the edge cells.  If it
+finds three live cells in a row on one of the interior edges it jumps
+to the output routine, since on the next timestep the configuration
+would overflow into the boundary ring.  Note that this boundary check
+is not done until after the first time step, so the user is responsible
+for providing an input state that is not about to overflow.
+
+An overflow recovery procedure that actually increased the size of the
+grid might be interesting, but wouldn't be terribly practical since
+any configuration that throws off gliders would quickly push it to the
+limit.
+
+The following configuration has four live cells and grows into traffic
+lights.  To see the blinkers in the other position, change the final
+time step from ONE OH to NINE or ONE ONE.
+
+ONE ONE
+ONE ONE
+ONE OH
+FIVE
+SIX
+SIX
+SIX
+SEVEN
+SIX
+SIX
+SEVEN
+OH
+
+This is a glider aimed up the main diagonal.  Specifying ZERO for the
+final timestep tells the program to run until overflow, since the first
+test is at step one.  In this case it halts at step XVI with the glider
+translated four cells up the diagonal.  You can make it run longer by
+increasing the dimensions of the array.
+
+NINE
+NINE
+ZERO
+TWO
+FOUR
+THREE
+FOUR
+FOUR
+FOUR
+FOUR
+THREE
+THREE
+TWO
+OH
+
+Here are a few of the features of the program which may be of interest to
+Intercal programmers.  One obvious one not mentioned in the manual is the
+test for equality:  XOR the two numbers and test if the result is zero.
+There are many examples of indexed loops.  The loops over array indices
+fall into two different classes, decrement and branch on zero, and
+decrement and branch on equal.  The time step loop uses increment and
+branch on equal.  The nested loop computing the next state has three
+indices for each dimension, since it is easier to keep i-1, i and i+1
+around than to recompute them on the fly.  This also allows me to use
+the simpler branch on zero test at the base of these loops since i-1 was
+already available.
+
+Three new subroutines may be of general interest.  Line (2000) is the
+entry point for a decrement routine setting .1 <- .1 minus #1.  This
+is very similar to the increment routine (1020) in the system library,
+which I also use.  Line (2010) is the decrement and branch on zero
+operation.  It decrements .1, then if .1 is not zero returns to the
+calling point, but if .1 is zero pops an additional entry off the
+RESUME stack and returns to that point instead.  Line (2020) is an
+alternative entry point to the (1020) routine which performs an add
+bit operation.  It sets .1 <- .1 plus .2, where .2 is already known
+to be either #0 or #1.
+
+The need for some kind of string I/O is painfully obvious.  It would be
+so much nicer to be able to show the final state using a grid of O's and
+.'s instead of having to print out all the coordinates.  I have some more
+ideas about string I/O which I will post later.
+
+Enough talk, on with the program:
+
+
+  [Program deleted, see life.i for the current version.]
+
+
+This is where the original program had an assignment type error:
+
+       DO .2 <- #0$#65535
+       DO .1 <- "?'"V.1$,1SUB.7.8"~.2'$#3"~.2
+       DO ,2 SUB .7.8 <- "?!1~.1'$#1"~#1
+
+This is the old, less efficient version of the decrement routine:
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2 + .3
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO .3 <- "?!1~.2'$#1"~#3
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME .3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2 + .3
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+
+-- 
+Louis Howell
+
+  "But when we got into the street I viddied that thinking is for the gloopy
+ones and that the oomny ones use like inspiration and what Bog sends."
diff --git a/pit/life.i b/pit/life.i
new file mode 100644 (file)
index 0000000..e58eec1
--- /dev/null
@@ -0,0 +1,276 @@
+
+       PLEASE NOTE BEGINNING OF BEGINNING
+        DO WRITE IN .11
+        DO WRITE IN .12
+        DO ,1 <- .11 BY .12
+        DO ,2 <- .11 BY .12
+       DO WRITE IN .13
+       DO .14 <- #0
+
+       PLEASE NOTE INITIALIZING ,1 TO ZEROES
+       DO .2 <- .11
+       DO .1 <- .12
+       DO (110) NEXT
+(110)  PLEASE FORGET #1
+       DO ,1 SUB .2.1 <- #0
+       DO (111) NEXT
+(112)  DO (2010) NEXT
+       PLEASE FORGET #2
+       DO (110) NEXT
+(111)   DO (112) NEXT
+       DO (113) NEXT
+(114)  DO .1 <- .2
+       DO (2010) NEXT
+       PLEASE FORGET #3
+       DO .2 <- .1
+       DO .1 <- .12
+       DO (110) NEXT
+(113)   DO (114) NEXT
+       PLEASE FORGET #2
+
+       PLEASE NOTE INITIAL POSITION INPUT
+       DO (120) NEXT
+(120)   PLEASE FORGET #1
+       DO WRITE IN .1
+       DO (121) NEXT
+       DO WRITE IN .2
+       DO ,1 SUB .1.2 <- #1
+       DO (120) NEXT
+(122)  DO RESUME "?!1~.1'$#1"~#3
+(121)   DO (122) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE END OF BEGINNING, BEGINNING OF MIDDLE
+       DO (200) NEXT
+(200)  DO FORGET #1
+
+       PLEASE NOTE PUTTING NEXT POSITION IN ,2
+       DO .1 <- .11
+       DO .9 <- .1
+       DO (2000) NEXT
+       DO .7 <- .1
+       DO (2000) NEXT
+       DO .5 <- .1
+       DO .1 <- .12
+       DO .10 <- .1
+       DO (2000) NEXT
+       DO .8 <- .1
+       DO (2000) NEXT
+       DO .6 <- .1
+       DO (210) NEXT
+(210)  PLEASE FORGET #1
+
+       DO .1 <- #0
+       DO .2 <- ,1 SUB .5.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .5.8
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .5.10
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .7.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .7.10
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.8
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.10
+       DO (2020) NEXT
+       DO :2 <- #0$#65535
+       DO .1 <- "?'"V.1$,1SUB.7.8"~:2'$#3"~:2
+       DO ,2 SUB .7.8 <- "?!1~.1'$#1"~#1
+
+       DO (211) NEXT
+(212)   DO .10 <- .8
+       DO .8 <- .6
+       DO .1 <- .6
+       DO (2010) NEXT
+       PLEASE FORGET #2
+       DO .6 <- .1
+       DO (210) NEXT
+(211)   DO (212) NEXT
+       DO (213) NEXT
+(214)  DO .9 <- .7
+       DO .7 <- .5
+       DO .1 <- .5
+       DO (2010) NEXT
+       PLEASE FORGET #3
+       DO .5 <- .1
+       DO .1 <- .12
+       DO .10 <- .1
+       DO (2000) NEXT
+       DO .8 <- .1
+       DO (2000) NEXT
+       DO .6 <- .1
+       DO (210) NEXT
+(213)   DO (214) NEXT
+       PLEASE FORGET #2
+
+       PLEASE NOTE COPYING ,2 BACK INTO ,1
+       DO .1 <- .11
+       DO (2000) NEXT
+       DO .2 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO (220) NEXT
+(220)  PLEASE FORGET #1
+       DO ,1 SUB .2.1 <- ,2 SUB .2.1
+       DO (221) NEXT
+       DO (220) NEXT
+(222)  DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(221)   DO (222) NEXT
+       PLEASE FORGET #1
+       DO (223) NEXT
+       DO .2 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO (220) NEXT
+(224)  DO .1 <- .2
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(223)   DO (224) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE INCREMENT TIMESTEP AND TEST
+       DO .1 <- .14
+       DO (1020) NEXT
+       DO .14 <- .1
+       DO (231) NEXT
+       DO (299) NEXT
+(232)  DO .3 <- "?.14$.13"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#2'~#3
+(231)  DO (232) NEXT
+       DO FORGET #1
+
+       PLEASE NOTE OVERFLOW TESTING
+       DO .1 <- .11
+       DO (2000) NEXT
+       DO .5 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO .6 <- .1
+       DO .7 <- #0
+       DO .8 <- #0
+       DO (240) NEXT
+(240)  PLEASE FORGET #1
+       DO .2 <- ,1 SUB #2.6
+       DO .1 <- .7
+       DO (500) NEXT
+       DO .7 <- .1
+       DO .2 <- ,1 SUB .5.6
+       DO .1 <- .8
+       DO (500) NEXT
+       DO .8 <- .1
+       DO (241) NEXT
+       DO .6 <- .1
+       DO (240) NEXT
+(242)  DO .1 <- .6
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(241)   DO (242) NEXT
+       PLEASE FORGET #1
+
+       DO .1 <- .11
+       DO (2000) NEXT
+       DO .5 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO .6 <- .1
+       DO .7 <- #0
+       DO .8 <- #0
+       DO (250) NEXT
+(250)  PLEASE FORGET #1
+       DO .2 <- ,1 SUB .5#2
+       DO .1 <- .7
+       DO (500) NEXT
+       DO .7 <- .1
+       DO .2 <- ,1 SUB .5.6
+       DO .1 <- .8
+       DO (500) NEXT
+       DO .8 <- .1
+       DO (251) NEXT
+       DO .5 <- .1
+       DO (250) NEXT
+(252)  DO .1 <- .5
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(251)   DO (252) NEXT
+       PLEASE FORGET #1
+
+        DO (200) NEXT
+
+(299)  DO FORGET #1
+       PLEASE NOTE END OF MIDDLE, BEGINNING OF END
+
+       PLEASE NOTE FINAL POSITION OUTPUT
+       DO .2 <- .11
+       DO .1 <- .12
+       DO (310) NEXT
+(310)  PLEASE FORGET #1
+       DO (321) NEXT
+       DO READ OUT .2
+       DO READ OUT .1
+       DO (323) NEXT
+(322)  PLEASE RESUME "?',1 SUB .2.1'$#1"~#3
+(321)   DO (322) NEXT
+(323)  PLEASE FORGET #1
+       DO (311) NEXT
+(312)  DO (2010) NEXT
+       PLEASE FORGET #2
+       DO (310) NEXT
+(311)   DO (312) NEXT
+       DO (313) NEXT
+(314)  DO .1 <- .2
+       DO (2010) NEXT
+       PLEASE FORGET #3
+       DO .2 <- .1
+       DO .1 <- .12
+       DO (310) NEXT
+(313)   DO (314) NEXT
+       PLEASE FORGET #2
+
+       DO READ OUT .14
+
+       PLEASE NOTE END OF END
+       PLEASE GIVE UP
+
+
+(500)  DO (501) NEXT
+       DO .1 <- #0
+       PLEASE RESUME #1
+(502)   PLEASE RESUME '?.2$#2'~#3
+(501)  DO (502) NEXT
+       DO (2020) NEXT
+       DO (503) NEXT
+       PLEASE RESUME #2
+(504)  DO .2 <- "?.1$#3"~"#0$#65535"
+       PLEASE RESUME '?"!2~.2'~#1"$#1'~#3
+(503)  DO (504) NEXT
+       PLEASE FORGET #3
+       DO (299) NEXT
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+
diff --git a/pit/life2.doc b/pit/life2.doc
new file mode 100644 (file)
index 0000000..2f5fe13
--- /dev/null
@@ -0,0 +1,46 @@
+
+life2.i is a revised version of my Life program, differing in two
+ways from the original.  First, throughout the program I have
+streamlined the loops by using COME FROM statements and combining
+initialization and re-initialization phases where practical.  Second,
+instead of just printing the coordinates of live cells, I use the new
+binary output feature to print out the board as an array of .'s and
+O's.  This new output section is made into a subroutine---entry point
+(300)---which I call from within the main loop as well as at the end of
+the program.  If you don't want to see the position at every time step,
+just remove the call to (300) from within the main loop, and only the
+final position will be printed.
+
+Notes for programmers:  The output routine prints the state matrix a
+full line at a time, using a 1-D array one cell longer than a row of
+the matrix.  This final cell is used to print a line feed (ASCII 012)
+at the end of each line.  Live cells are represented as O's (0117),
+while dead cells are shown as .'s (056).  If your machine does not
+use ASCII or does not use LF to terminate lines this may not work.
+The INTERCAL output routine reverses the order of bits in each of
+these characters, so the constants hard-coded into the program are
+#242 for 'O', #116 for '.', and #80 for '\n'.  The value of the last
+character output, which is needed by the Turing Text output model,
+is stored in .2.  This variable is initialized to #0 and then STASHed
+at the beginning of the program, then RETRIEVEd by the output routine
+each time it is called.  This is opposite from the usual way STASH is
+used, but I was feeling a little twisted the day I wrote all this.
+
+There is still considerable room for improvement in the (300) output
+algorithm.  With printing at each time step the program spends
+roughly two-thirds of its time doing output, and I suspect that
+most of that is squandered in the (1010) subtraction routine.  It
+should be possible to greatly speed up the process by precomputing
+and storing all the possible differences.  Except for initialization
+there are only six to consider: "LF-.", ".-LF", "O-.", ".-O", ".-.",
+and "O-O".  Of these the first two occur predictably at the beginning
+and end of each line, and the last two are trivially zero.  The
+necessary program logic would be a little more complex; perhaps it
+could be done with array indexing?  Consider it a challenge!
+
+Despite all its inefficiencies, the INTERCAL version on a Sparc 1 is
+still faster than the first Life program I ever wrote, in BASIC on
+a TRS-80, by a factor of about 50.  Sobering thought.
+
+                           Louis Howell
+                           December 15, 1991
diff --git a/pit/life2.i b/pit/life2.i
new file mode 100644 (file)
index 0000000..8c8f00d
--- /dev/null
@@ -0,0 +1,268 @@
+
+       PLEASE NOTE BEGINNING OF BEGINNING
+        DO WRITE IN .11
+        DO WRITE IN .12
+        DO ,1 <- .11 BY .12
+        DO ,2 <- .11 BY .12
+       DO WRITE IN .13
+       DO .14 <- #0
+       DO .1 <- .11
+       DO (1020) NEXT
+       DO .4 <- .1
+       DO ,3 <- .4
+       DO .2 <- #0
+       PLEASE STASH .2
+
+       PLEASE NOTE INITIALIZING ,1 TO ZEROES
+       DO .1 <- .11
+       PLEASE COME FROM (116)
+       DO .2 <- .1
+       DO .1 <- .12
+       PLEASE COME FROM (113)
+       DO ,1 SUB .2.1 <- #0
+       DO (111) NEXT
+(112)  DO (2010) NEXT
+(113)  PLEASE FORGET #2
+(111)   DO (112) NEXT
+       DO (114) NEXT
+(115)  DO .1 <- .2
+       DO (2010) NEXT
+(116)  PLEASE FORGET #3
+(114)   DO (115) NEXT
+       PLEASE FORGET #2
+
+       PLEASE NOTE INITIAL POSITION INPUT
+       PLEASE COME FROM (123)
+       DO WRITE IN .1
+       DO (121) NEXT
+       DO WRITE IN .2
+(123)  DO ,1 SUB .1.2 <- #1
+(122)  DO RESUME "?!1~.1'$#1"~#3
+(121)   DO (122) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE END OF BEGINNING, BEGINNING OF MIDDLE
+       DO COME FROM (298)
+
+       PLEASE NOTE PRINTING CURRENT POSITION
+       DO (300) NEXT
+
+       PLEASE NOTE PUTTING NEXT POSITION IN ,2
+       DO .1 <- .11
+       DO .9 <- .1
+       DO (2000) NEXT
+       DO .7 <- .1
+       DO (2000) NEXT
+       PLEASE COME FROM (216)
+       DO .5 <- .1
+       DO .1 <- .12
+       DO .10 <- .1
+       DO (2000) NEXT
+       DO .8 <- .1
+       DO (2000) NEXT
+       PLEASE COME FROM (213)
+       DO .6 <- .1
+
+       DO .1 <- #0
+       DO .2 <- ,1 SUB .5.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .5.8
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .5.10
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .7.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .7.10
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.6
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.8
+       DO (2020) NEXT
+       DO .2 <- ,1 SUB .9.10
+       DO (2020) NEXT
+       DO :2 <- #0$#65535
+       DO .1 <- "?'"V.1$,1SUB.7.8"~:2'$#3"~:2
+       DO ,2 SUB .7.8 <- "?!1~.1'$#1"~#1
+
+       DO (211) NEXT
+(212)   DO .10 <- .8
+       DO .8 <- .6
+       DO .1 <- .6
+       DO (2010) NEXT
+(213)  PLEASE FORGET #2
+(211)   DO (212) NEXT
+       DO (214) NEXT
+(215)  DO .9 <- .7
+       DO .7 <- .5
+       DO .1 <- .5
+       DO (2010) NEXT
+(216)  PLEASE FORGET #3
+(214)   DO (215) NEXT
+       PLEASE FORGET #2
+
+       PLEASE NOTE COPYING ,2 BACK INTO ,1
+       DO .1 <- .11
+       DO (2000) NEXT
+       PLEASE COME FROM (226)
+       DO .2 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       PLEASE COME FROM (223)
+       DO ,1 SUB .2.1 <- ,2 SUB .2.1
+(223)  DO (221) NEXT
+(222)  DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(221)   DO (222) NEXT
+       PLEASE FORGET #1
+(226)  DO (224) NEXT
+(225)  DO .1 <- .2
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(224)   DO (225) NEXT
+       PLEASE FORGET #1
+
+       PLEASE NOTE INCREMENT TIMESTEP AND TEST
+       DO .1 <- .14
+       DO (1020) NEXT
+       DO .14 <- .1
+       DO (231) NEXT
+       DO (299) NEXT
+(232)  DO .3 <- "?.14$.13"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#2'~#3
+(231)  DO (232) NEXT
+       DO FORGET #1
+
+       PLEASE NOTE OVERFLOW TESTING
+       DO .7 <- #0
+       DO .8 <- #0
+       DO .1 <- .11
+       DO (2000) NEXT
+       DO .5 <- .1
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO COME FROM (243)
+       DO .6 <- .1
+       DO .2 <- ,1 SUB #2.6
+       DO .1 <- .7
+       DO (500) NEXT
+       DO .7 <- .1
+       DO .2 <- ,1 SUB .5.6
+       DO .1 <- .8
+       DO (500) NEXT
+       DO .8 <- .1
+(243)  DO (241) NEXT
+(242)  DO .1 <- .6
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(241)   DO (242) NEXT
+       PLEASE FORGET #1
+
+       DO .7 <- #0
+       DO .8 <- #0
+       DO .1 <- .12
+       DO (2000) NEXT
+       DO .6 <- .1
+       DO .1 <- .11
+       DO (2000) NEXT
+       DO COME FROM (253)
+       DO .5 <- .1
+       DO .2 <- ,1 SUB .5#2
+       DO .1 <- .7
+       DO (500) NEXT
+       DO .7 <- .1
+       DO .2 <- ,1 SUB .5.6
+       DO .1 <- .8
+       DO (500) NEXT
+       DO .8 <- .1
+(253)  DO (251) NEXT
+(252)  DO .1 <- .5
+       DO (2000) NEXT
+       DO .3 <- "?.1$#1"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(251)   DO (252) NEXT
+(298)  PLEASE FORGET #1
+
+(299)  DO FORGET #1
+       PLEASE NOTE END OF MIDDLE, BEGINNING OF END
+
+       PLEASE NOTE PRINTING FINAL POSITION
+       DO (300) NEXT
+
+       PLEASE NOTE END OF END
+       PLEASE GIVE UP
+
+
+(300)  PLEASE NOTE POSITION OUTPUT ROUTINE
+       DO READ OUT .14
+       PLEASE RETRIEVE .2
+       DO .6 <- .12
+       PLEASE COME FROM (316)
+       DO .5 <- #1
+       PLEASE COME FROM (313)
+       DO .1 <- .2
+       DO (301) NEXT
+       DO .2 <- #242
+       DO (303) NEXT
+(302)  PLEASE RESUME "?',1 SUB .5.6'$#1"~#3
+(301)   DO (302) NEXT
+       DO .2 <- #116
+(303)  PLEASE FORGET #1
+       DO (1010) NEXT
+       DO ,3 SUB .5 <- .3
+(313)  DO (311) NEXT
+(312)  DO .1 <- .5
+       DO (1020) NEXT
+       DO .5 <- .1
+       DO .3 <- "?.5$.4"~"#0$#65535"
+       PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+(311)   DO (312) NEXT
+       DO .1 <- .2
+       DO .2 <- #80
+       DO (1010) NEXT
+       DO ,3 SUB .4 <- .3
+       PLEASE READ OUT ,3
+       DO (314) NEXT
+(315)  DO .1 <- .6
+       DO (2010) NEXT
+       PLEASE FORGET #3
+(316)  DO .6 <- .1
+(314)   DO (315) NEXT
+       PLEASE DO STASH .2
+       PLEASE RESUME #3
+
+(500)  DO (501) NEXT
+       DO .1 <- #0
+       PLEASE RESUME #1
+(502)   PLEASE RESUME '?.2$#2'~#3
+(501)  DO (502) NEXT
+       DO (2020) NEXT
+       DO (503) NEXT
+       PLEASE RESUME #2
+(504)  DO .2 <- "?.1$#3"~"#0$#65535"
+       PLEASE RESUME '?"!2~.2'~#1"$#1'~#3
+(503)  DO (504) NEXT
+       PLEASE FORGET #3
+       DO (299) NEXT
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+
diff --git a/pit/pass.i b/pit/pass.i
new file mode 100644 (file)
index 0000000..ad647fe
--- /dev/null
@@ -0,0 +1,197 @@
+(10)   DO      NOTHING
+
+       PLEASE NOTE: Process 1 reads from stdin & copies to the channel
+
+       PLEASE  COME FROM (10)
+       PLEASE  COME FROM (20)
+(20)   PLEASE  (100) NEXT
+
+       PLEASE NOTE: Process 2 reads from the channel & copies to stdout
+
+       PLEASE  COME FROM (10)
+       PLEASE  COME FROM (30)
+(30)   PLEASE  (200) NEXT
+
+(100)  PLEASE NOTE: Write a message to the message box.
+
+       DO      STASH .1 + .2
+       DO      (101) NEXT
+       PLEASE  COME FROM (104)
+(101)  DO      FORGET #1
+       DO      .2 <- #1
+(102)  DO      .2 <- #2 ONCE
+(103)  DO      (104) NEXT
+(104)  DO      (105) NEXT
+(105)  DO      RESUME .2
+
+       PLEASE  COME FROM (103)
+
+       DO      WRITE IN .1
+
+       PLEASE NOTE: If .1 is zero, kill both threads
+       DO      .2 <- '?"'#0$.1'~'#0$.1'"$#1'~#3
+(1)    DO      (2) NEXT
+(2)    DO      (105) NEXT
+
+       PLEASE  COME FROM (1)
+
+       DO      .2 <- '?"'&.1$#1'~'#0$#1'"$#1'~#3
+       DO      (106) NEXT
+       DO      REINSTATE (210)
+       DO      (107) NEXT
+(106)  DO      (105) NEXT
+       DO      ABSTAIN FROM (210)
+
+(107)  DO      .2 <- '?"'&.1$#2'~'#0$#2'"$#1'~#3
+       DO      (108) NEXT
+       DO      REINSTATE (211)
+       DO      (109) NEXT
+(108)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (211)
+
+(109)  DO      .2 <- '?"'&.1$#4'~'#0$#4'"$#1'~#3
+       DO      (110) NEXT
+       DO      REINSTATE (212)
+       DO      (111) NEXT
+(110)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (212)
+
+(111)  DO      .2 <- '?"'&.1$#8'~'#0$#8'"$#1'~#3
+       DO      (112) NEXT
+       DO      REINSTATE (213)
+       DO      (113) NEXT
+(112)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (213)
+
+(113)  DO      .2 <- '?"'&.1$#16'~'#0$#16'"$#1'~#3
+       DO      (114) NEXT
+       DO      REINSTATE (214)
+       DO      (115) NEXT
+(114)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (214)
+
+(115)  DO      .2 <- '?"'&.1$#32'~'#0$#32'"$#1'~#3
+       DO      (116) NEXT
+       DO      REINSTATE (215)
+       DO      (117) NEXT
+(116)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (215)
+
+(117)  DO      .2 <- '?"'&.1$#64'~'#0$#64'"$#1'~#3
+       DO      (118) NEXT
+       DO      REINSTATE (216)
+       DO      (119) NEXT
+(118)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (216)
+
+(119)  DO      .2 <- '?"'&.1$#128'~'#0$#128'"$#1'~#3
+       DO      (120) NEXT
+       DO      REINSTATE (217)
+       DO      (121) NEXT
+(120)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (217)
+
+(121)  DO      .2 <- '?"'&.1$#256'~'#0$#256'"$#1'~#3
+       DO      (122) NEXT
+       DO      REINSTATE (218)
+       DO      (123) NEXT
+(122)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (218)
+
+(123)  DO      .2 <- '?"'&.1$#512'~'#0$#512'"$#1'~#3
+       DO      (124) NEXT
+       DO      REINSTATE (219)
+       DO      (125) NEXT
+(124)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (219)
+
+(125)  DO      .2 <- '?"'&.1$#1024'~'#0$#1024'"$#1'~#3
+       DO      (126) NEXT
+       DO      REINSTATE (220)
+       DO      (127) NEXT
+(126)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (220)
+
+(127)  DO      .2 <- '?"'&.1$#2048'~'#0$#2048'"$#1'~#3
+       DO      (128) NEXT
+       DO      REINSTATE (221)
+       DO      (129) NEXT
+(128)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (221)
+
+(129)  DO      .2 <- '?"'&.1$#4096'~'#0$#4096'"$#1'~#3
+       DO      (130) NEXT
+       DO      REINSTATE (222)
+       DO      (131) NEXT
+(130)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (222)
+
+(131)  DO      .2 <- '?"'&.1$#8192'~'#0$#8192'"$#1'~#3
+       DO      (132) NEXT
+       DO      REINSTATE (223)
+       DO      (133) NEXT
+(132)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (223)
+
+(133)  DO      .2 <- '?"'&.1$#16384'~'#0$#16384'"$#1'~#3
+       DO      (134) NEXT
+       DO      REINSTATE (224)
+       DO      (135) NEXT
+(134)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (224)
+
+(135)  DO      .2 <- '?"'&.1$#32768'~'#0$#32768'"$#1'~#3
+       DO      (136) NEXT
+       DO      REINSTATE (225)
+       DO      (137) NEXT
+(136)  DO      (105) NEXT
+       PLEASE  ABSTAIN FROM (225)
+
+(137)  DO      REINSTATE (202)
+       DO      RETRIEVE .1 + .2
+       PLEASE  RESUME #17
+
+(200)  PLEASE NOTE: Read from a message box
+
+       DO      STASH .1 + .2
+
+       DO      (201) NEXT
+       PLEASE  COME FROM (204)
+(201)  DO      FORGET #1
+       DO      .2 <- #1
+(202)  DO NOT  .2 <- #2 AGAIN
+(203)  DO      (204) NEXT
+(204)  DO      (205) NEXT
+(205)  DO      RESUME .2
+
+       PLEASE  COME FROM (203)
+
+       DO      .1 <- #0
+(210)  DO      .1 <- 'V.1$#1'~'#0$#65535'
+(211)  DO      .1 <- 'V.1$#2'~'#0$#65535'
+(212)  DO      .1 <- 'V.1$#4'~'#0$#65535'
+(213)  DO      .1 <- 'V.1$#8'~'#0$#65535'
+(214)  DO      .1 <- 'V.1$#16'~'#0$#65535'
+(215)  DO      .1 <- 'V.1$#32'~'#0$#65535'
+(216)  DO      .1 <- 'V.1$#64'~'#0$#65535'
+(217)  DO      .1 <- 'V.1$#128'~'#0$#65535'
+(218)  DO      .1 <- 'V.1$#256'~'#0$#65535'
+(219)  DO      .1 <- 'V.1$#512'~'#0$#65535'
+(220)  DO      .1 <- 'V.1$#1024'~'#0$#65535'
+(221)  DO      .1 <- 'V.1$#2048'~'#0$#65535'
+(222)  DO      .1 <- 'V.1$#4096'~'#0$#65535'
+(223)  DO      .1 <- 'V.1$#8192'~'#0$#65535'
+(224)  DO      .1 <- 'V.1$#16384'~'#0$#65535'
+(225)  DO      .1 <- 'V.1$#32768'~'#0$#65535'
+
+       DO      READ OUT .1
+       DO      RETRIEVE .1 + .2
+       DO      REINSTATE (102)
+       PLEASE  RESUME #1
+
+PLEASE NOTE: Giving up
+
+       PLEASE  COME FROM (2)
+       DO      REINSTATE (3)
+(3)    DO NOT  COME FROM (202)
+       PLEASE  GIVE UP 
diff --git a/pit/pi.doc b/pit/pi.doc
new file mode 100644 (file)
index 0000000..33b017e
--- /dev/null
@@ -0,0 +1,84 @@
+
+pi.i is easily the most twisted and obscure INTERCAL program I've yet
+written.  I say that because even I don't fully understand why it
+works.  The program writes in one number from the input, then prints
+out that many digits of pi.  There are no fancy INTERCAL tricks here;
+all it does is simple integer arithmetic.
+
+The algorithm used comes from an old TECO macro that was recently
+discussed on alt.lang.teco.  Mark Henderson posted a translation
+into C, which at least made it easier to read, if not much easier to
+understand.  I played around with that program a bit, fixed a couple
+of minor bugs which may or may not have existed in the original TECO,
+and modified it a bit to put in into a form that would be easy to
+translate into INTERCAL.  That modified program, which corresponds
+closely to the algorithm in pi.i, is reproduced at the end of this
+file.
+
+The INTERCAL version has only been tested up to a hundred digits,
+which took almost 30 minutes on a Sparc 1.  The C version below,
+with variables declared unsigned short to correspond to the INTERCAL,
+gives up to 535 accurate digits and then starts printing garbage,
+presumably because of an overflow.  If the declarations are changed
+to short only the first 262 digits are accurate, while using int
+yields thousands of accurate digits.  Though I don't understand
+what the inner loop is doing, it looks like the largest numbers
+encountered are O(n), where n is the number of digits requested.
+If, as I expect, the present INTERCAL version does fail after about
+535 digits, it could easily be converted to a 32-bit form which
+would run as long as almost anyone would desire.
+
+The only feature likely to be of utility in other INTERCAL programs
+is the new (2030) routine, which performs a 16-bit division with
+remainder.  It is faster than the (1040) routine for two reasons:
+First, it is a true 16-bit version, whereas the (1040) routine just
+shifts over its operands and then calls the 32-bit division routine
+(1550).  Second, the (1550) routine generates a remainder as part of
+the computation, but then simply throws it away.  I needed the
+remainder, so I have my (2030) routine return it in .4 and the
+quotient in .3.  In other respects this is just a 16-bit translation
+of the (1550) routine.
+
+                               Louis Howell
+                               December 30, 1991
+
+
+
+#include <stdio.h>
+unsigned short line[10000];
+main(argc,argv)
+int argc;
+char *argv[];
+{
+   unsigned short n, a, i, q, v, dummy, h=0, w=0;
+   
+   if (argc==2)
+     n=atoi(argv[1]);
+   else
+     n=20;
+
+   n+=2;
+
+   for (i=(n*10)/3 ; i > 0 ; i--) {
+     line[i-1] = 2;
+   }
+
+   for (dummy=0; dummy < n; dummy++) {
+      q=0;
+      for (i=(n*10)/3 ; i > 0 ; i--) {
+         a = line[i-1] * 10 + (q*i);
+         q=a/(i*2-1);
+         line[i-1] = a%(i*2-1);
+      }
+      v = w;
+      w = h+(q/10);
+      h = q%10;
+      if (w==10) {
+         w=0;
+         v++;
+      }
+      if (dummy!=0)
+         printf("%d", v);
+   }
+   printf("\n");
+}
diff --git a/pit/pi.i b/pit/pi.i
new file mode 100644 (file)
index 0000000..e133d7a
--- /dev/null
+++ b/pit/pi.i
@@ -0,0 +1,137 @@
+       PLEASE WRITE IN .10
+       DO .1 <- .10~#65534
+       DO (1020) NEXT
+       DO .10 <- !1$.10'~'#32767$#1'
+       DO .1 <- .10
+       DO .2 <- #10
+       PLEASE DO (1030) NEXT
+       DO .1 <- .3
+       DO .2 <- #3
+       DO (1040) NEXT
+       DO .9 <- .3
+
+       DO ,1 <- .9
+       DO .1 <- .9
+       PLEASE COME FROM (13)
+       DO ,1 SUB .1 <- #2
+       DO (11) NEXT
+(12)   DO (2010) NEXT
+(13)   PLEASE FORGET #2
+(11)   DO (12) NEXT
+
+       DO .15 <- #0
+       DO .16 <- #0
+       DO (100) NEXT
+       DO .1 <- .10
+       DO (2000) NEXT
+       PLEASE COME FROM (23)
+       DO .10 <- .1
+       DO (100) NEXT
+       PLEASE READ OUT .17
+       DO .1 <- .10
+       DO (21) NEXT
+(22)   DO (2010) NEXT
+(23)   PLEASE FORGET #2
+(21)   DO (22) NEXT
+       PLEASE FORGET #2
+       PLEASE GIVE UP
+
+(100)  DO .14 <- #0
+       DO .12 <- .9
+       PLEASE COME FROM (103)
+       DO .1 <- .14
+       DO .2 <- .12
+       DO (1030) NEXT
+       DO .14 <- .3
+       DO .1 <- ,1 SUB .12
+       DO .2 <- #10
+       DO (1030) NEXT
+       DO .1 <- .3
+       DO .2 <- .14
+       DO (1000) NEXT
+       DO .1 <- !12$#0'~'#32767$#1'
+       DO (2000) NEXT
+       DO .2 <- .1
+       DO .1 <- .3
+       DO (2030) NEXT
+       DO .14 <- .3
+       DO ,1 SUB .12 <- .4
+       DO .1 <- .12
+       DO (101) NEXT
+(102)  DO (2010) NEXT
+       DO .12 <- .1
+(103)  PLEASE FORGET #2
+(101)  DO (102) NEXT
+       DO .17 <- .16
+       DO .1 <- .14
+       DO .2 <- #10
+       DO (2030) NEXT
+       DO .1 <- .15
+       DO .2 <- .3
+       DO (1000) NEXT
+       DO .16 <- .3
+       DO .15 <- .4
+       DO .5 <- '?.16$#10'~#85
+       DO .5 <- "?!5~.5'$#2"~#3
+       DO (104) NEXT
+       DO .16 <- #0
+       DO .1 <- .17
+       DO (1020) NEXT
+       DO .17 <- .1
+       PLEASE RESUME #2
+(104)   DO (1001) NEXT
+       PLEASE RESUME #3
+
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+(2030) DO STASH .1 + .5
+       DO .3 <- #0
+       DO .5 <- '?"!2~.2'~#1"$#1'~#3
+       PLEASE DO (2031) NEXT
+       DO .4 <- #1
+       PLEASE DO (2033) NEXT
+(2033) DO FORGET #1
+       DO .5 <- '?".2~#32768"$#2'~#3
+       DO (2032) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       PLEASE DO .4 <- !4$#0'~'#32767$#1'
+       DO (2033) NEXT
+(2032) DO (1001) NEXT
+(2036) PLEASE FORGET #1
+        DO .5 <- '?.1$.2'~'#0$#65535'
+        DO .5 <- '?"'&"!2~.5'~'"?'?.5~.5'$#32768"~"#0$#65535"'"$
+                 ".5~.5"'~#1"$#2'~#3
+       DO (2034) NEXT
+       DO .5 <- .3
+       DO (1010) NEXT
+       PLEASE DO .1 <- .3
+        DO .3 <- 'V.4$.5'~'#0$#65535'
+       DO (2035) NEXT
+(2034) PLEASE DO (1001) NEXT
+(2035) DO FORGET #1
+       DO .5 <- "?'.4~#1'$#2"~#3
+       DO (2031) NEXT
+       DO .2 <- .2~#65534
+       DO .4 <- .4~#65534
+       PLEASE DO (2036) NEXT
+(2031) DO (1001) NEXT
+       PLEASE DO .4 <- .1
+       PLEASE RETRIEVE .1 + .5
+       PLEASE RESUME #2
+        PLEASE NOTE THAT YOU DON'T HAVE TO APPEND STANDARD LIBRARY HERE
diff --git a/pit/pow.i b/pit/pow.i
new file mode 100644 (file)
index 0000000..fa56577
--- /dev/null
+++ b/pit/pow.i
@@ -0,0 +1,50 @@
+       PLEASE WRITE IN .2
+       DO .1 <- #0
+       PLEASE COME FROM (1)
+       DO (2040) NEXT
+       DO NOT (2049) NEXT
+        DO READ OUT :1
+        DO NOT READ OUT .4
+(1)    DO (1020) NEXT
+       PLEASE GIVE UP
+       
+
+(2040)  PLEASE STASH .4
+       DO ABSTAIN FROM (2047)
+(2049)  DO STASH .1 + .2 + :2 + :3 + :4 + :5 + :6
+       PLEASE DO .4 <- #1
+       DO :5 <- .1
+       DO :6 <- #1
+       DO (2044) NEXT
+(2047) DO (2048) NEXT
+       DO .1 <- .4
+       DO (2046) NEXT
+       DO (1999) NEXT
+(2046)  DO (2042) NEXT
+       PLEASE REINSTATE (2047)
+       PLEASE RETRIEVE .4
+(2048) DO :1 <- :6
+       DO RETRIEVE .1 + .2 + :2 + :3 + :4 + :5 + :6
+       PLEASE RESUME #2
+(2044)  DO (2045) NEXT
+(2045) PLEASE FORGET #1
+       DO .1 <- "?!2~#1'$#1"~#3
+       DO (2041) NEXT
+       PLEASE DO :1 <- :6
+       PLEASE DO :2 <- :5
+       DO (1549) NEXT
+       DO :6 <- :3
+       DO .4 <- '?"'V.4$":4~#3"'~#4"$#1'~#3
+       DO (2043) NEXT
+(2042)  PLEASE RESUME .1
+(2041)  DO (2042) NEXT
+(2043) PLEASE FORGET #1
+       DO .2 <- .2~#65534
+       DO .1 <- '?"!2~.2'~#1"$#2'~#3
+       DO (2042) NEXT
+       PLEASE DO :1 <- :5
+       PLEASE DO :2 <- :5
+       DO (1549) NEXT
+       DO :5 <- :3
+       DO .4 <- '?"'V.4$":4~#3"'~#4"$#1'~#3
+       DO (2045) NEXT
diff --git a/pit/primes.doc b/pit/primes.doc
new file mode 100644 (file)
index 0000000..6e9b1b3
--- /dev/null
@@ -0,0 +1,18 @@
+primes.i is a simple program for printing out a list of prime numbers.
+It has an outer loop variable .11 and an inner loop variable .13, both
+of which start at #3 and advance through odd numbers.  .13 contains the
+numbers being tested as possible divisors of .11, which is the number
+being tested for primality.  Each time through the inner loop a 16-bit
+division with remainder routine (2030) is called to divide .11 by .13.
+If .13 is greater than the quotient then .11 is known to be prime and
+is printed out.  If the remainder is #0, on the other hand, then .11
+is known to be composite and the inner loop is terminated prematurely.
+
+The termination test for the outer loop is controlled by statement (22),
+which tests to see if the high bit of (.11-#1)/#2 is set.  You can
+modify this statement to test some other bit if you want the program
+to terminate sooner.  It took over 17 hours on a Sparc 1 for this
+program to find all 16-bit primes.
+
+                               Louis Howell
+                               December 30, 1991
diff --git a/pit/primes.i b/pit/primes.i
new file mode 100644 (file)
index 0000000..48ad322
--- /dev/null
@@ -0,0 +1,86 @@
+       DO READ OUT #2
+       DO .10 <- #1
+       PLEASE COME FROM (23)
+       DO .11 <- !10$#1'~'#32767$#1'
+       DO .12 <- #1
+       PLEASE COME FROM (16)
+       DO .13 <- !12$#1'~'#32767$#1'
+       DO .1 <- .11
+       DO .2 <- .13
+       DO (2030) NEXT
+       DO (11) NEXT
+(15)   DO (13) NEXT
+(13)   DO .3 <- "?!4~.4'$#2"~#3
+       DO (14) NEXT
+       PLEASE FORGET #1
+       DO .1 <- .12
+       DO (1020) NEXT
+(16)   DO .12 <- .1
+(12)   DO .3 <- '?.2$.3'~'#0$#65535'
+       DO .3 <- '?"'&"!2~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'"$
+                 ".3~.3"'~#1"$#2'~#3
+(14)   PLEASE RESUME .3
+(11)   DO (12) NEXT
+       DO FORGET #1
+       PLEASE READ OUT .11
+       DO COME FROM (15)
+       DO .1 <- .10
+       DO (1020) NEXT
+       DO .10 <- .1
+(23)   DO (21) NEXT
+(22)   PLEASE RESUME "?!10~#32768'$#2"~#3
+(21)   DO (22) NEXT
+       DO FORGET #1
+       PLEASE GIVE UP
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  PLEASE STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+(2030) DO STASH .1 + .5
+       DO .3 <- #0
+       DO .5 <- '?"!2~.2'~#1"$#1'~#3
+       PLEASE DO (2031) NEXT
+       DO .4 <- #1
+       PLEASE DO (2033) NEXT
+(2033) DO FORGET #1
+       DO .5 <- '?".2~#32768"$#2'~#3
+       DO (2032) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       PLEASE DO .4 <- !4$#0'~'#32767$#1'
+       DO (2033) NEXT
+(2032) DO (1001) NEXT
+(2036) PLEASE FORGET #1
+        DO .5 <- '?.1$.2'~'#0$#65535'
+        DO .5 <- '?"'&"!2~.5'~'"?'?.5~.5'$#32768"~"#0$#65535"'"$
+                 ".5~.5"'~#1"$#2'~#3
+       DO (2034) NEXT
+       DO .5 <- .3
+       DO (1010) NEXT
+       PLEASE DO .1 <- .3
+        DO .3 <- 'V.4$.5'~'#0$#65535'
+       DO (2035) NEXT
+(2034) PLEASE DO (1001) NEXT
+(2035) DO FORGET #1
+       DO .5 <- "?'.4~#1'$#2"~#3
+       DO (2031) NEXT
+       DO .2 <- .2~#65534
+       DO .4 <- .4~#65534
+       PLEASE DO (2036) NEXT
+(2031) DO (1001) NEXT
+       PLEASE DO .4 <- .1
+       PLEASE RETRIEVE .1 + .5
+       PLEASE RESUME #2
diff --git a/pit/quine.i b/pit/quine.i
new file mode 100644 (file)
index 0000000..3bc2452
--- /dev/null
@@ -0,0 +1,649 @@
+       DO (1) NEXT
+       DO      ;1SUB#1 <- #46164$#24148
+       DO      ;1SUB#2 <- #49728$#63680
+       PLEASE  ;1SUB#3 <- #50560$#9536
+       DO      ;1SUB#4 <- #23200$#11688
+       DO      ;1SUB#5 <- #63912$#51392
+       DO      ;1SUB#6 <- #57536$#39424
+       PLEASE  ;1SUB#7 <- #54224$#46164
+       DO      ;1SUB#8 <- #24148$#28936
+       DO      ;1SUB#9 <- #8448$#50860
+       DO      ;1SUB#10 <- #5056$#25684
+       PLEASE  ;1SUB#11 <- #48704$#4752
+       DO      ;1SUB#12 <- #46164$#24148
+       DO      ;1SUB#13 <- #53824$#55488
+       DO      ;1SUB#14 <- #50560$#23616
+       PLEASE  ;1SUB#15 <- #56960$#59968
+       DO      ;1SUB#16 <- #28140$#60096
+       DO      ;1SUB#17 <- #7168$#20160
+       DO      ;1SUB#18 <- #28012$#49104
+       PLEASE  ;1SUB#19 <- #46164$#24148
+       DO      ;1SUB#20 <- #64064$#52096
+       DO      ;1SUB#21 <- #54024$#54656
+       DO      ;1SUB#22 <- #62088$#11688
+       PLEASE  ;1SUB#23 <- #60648$#57920
+       DO      ;1SUB#24 <- #57536$#39424
+       DO      ;1SUB#25 <- #21120$#7168
+       DO      ;1SUB#26 <- #8256$#10560
+       PLEASE  ;1SUB#27 <- #54016$#3072
+       DO      ;1SUB#28 <- #55968$#11688
+       DO      ;1SUB#29 <- #64936$#6592
+       DO      ;1SUB#30 <- #49924$#57920
+       PLEASE  ;1SUB#31 <- #64324$#46164
+       DO      ;1SUB#32 <- #24148$#55680
+       DO      ;1SUB#33 <- #53440$#50560
+       DO      ;1SUB#34 <- #9536$#61184
+       PLEASE  ;1SUB#35 <- #16384$#13440
+       DO      ;1SUB#36 <- #11904$#15360
+       DO      ;1SUB#37 <- #21152$#11688
+       DO      ;1SUB#38 <- #64936$#9664
+       PLEASE  ;1SUB#39 <- #49924$#57920
+       DO      ;1SUB#40 <- #64324$#23264
+       DO      ;1SUB#41 <- #35472$#11688
+       DO      ;1SUB#42 <- #64936$#49280
+       PLEASE  ;1SUB#43 <- #16384$#60288
+       DO      ;1SUB#44 <- #54024$#54656
+       DO      ;1SUB#45 <- #62088$#11688
+       DO      ;1SUB#46 <- #60648$#57920
+       PLEASE  ;1SUB#47 <- #57536$#39424
+       DO      ;1SUB#48 <- #53888$#44032
+       DO      ;1SUB#49 <- #8256$#31040
+       DO      ;1SUB#50 <- #37120$#64336
+       PLEASE  ;1SUB#51 <- #6880$#2704
+       DO      ;1SUB#52 <- #11688$#60588
+       DO      ;1SUB#53 <- #28224$#14464
+       DO      ;1SUB#54 <- #11924$#9536
+       PLEASE  ;1SUB#55 <- #23200$#11688
+       DO      ;1SUB#56 <- #64936$#6592
+       DO      ;1SUB#57 <- #49924$#57920
+       DO      ;1SUB#58 <- #64324$#46164
+       PLEASE  ;1SUB#59 <- #24148$#55680
+       DO      ;1SUB#60 <- #53440$#50560
+       DO      ;1SUB#61 <- #30016$#20224
+       DO      ;1SUB#62 <- #14336$#7296
+       PLEASE  ;1SUB#63 <- #50816$#43520
+       DO      ;1SUB#64 <- #30544$#46164
+       DO      ;1SUB#65 <- #24148$#44608
+       DO      ;1SUB#66 <- #25472$#54024
+       PLEASE  ;1SUB#67 <- #54656$#62088
+       DO      ;1SUB#68 <- #11688$#59816
+       DO      ;1SUB#69 <- #5312$#57536
+       DO      ;1SUB#70 <- #39424$#20096
+       PLEASE  ;1SUB#71 <- #60752$#46164
+       DO      ;1SUB#72 <- #24148$#34368
+       DO      ;1SUB#73 <- #28864$#50560
+       DO      ;1SUB#74 <- #12608$#336
+       PLEASE  ;1SUB#75 <- #46164$#24148
+       DO      ;1SUB#76 <- #60992$#58240
+       DO      ;1SUB#77 <- #54024$#54656
+       DO      ;1SUB#78 <- #62088$#11688
+       PLEASE  ;1SUB#79 <- #59816$#59584
+       DO      ;1SUB#80 <- #57536$#51968
+       DO      ;1SUB#81 <- #49616$#46164
+       DO      ;1SUB#82 <- #24148$#48960
+       PLEASE  ;1SUB#83 <- #16768$#54024
+       DO      ;1SUB#84 <- #54656$#62088
+       DO      ;1SUB#85 <- #11688$#59816
+       DO      ;1SUB#86 <- #6336$#57536
+       PLEASE  ;1SUB#87 <- #39424$#54224
+       DO      ;1SUB#88 <- #46164$#24148
+       DO      ;1SUB#89 <- #60992$#58240
+       DO      ;1SUB#90 <- #54024$#54656
+       PLEASE  ;1SUB#91 <- #62088$#11688
+       DO      ;1SUB#92 <- #60648$#57920
+       DO      ;1SUB#93 <- #57536$#39424
+       DO      ;1SUB#94 <- #21120$#29696
+       PLEASE  ;1SUB#95 <- #14400$#32064
+       DO      ;1SUB#96 <- #7936$#44032
+       DO      ;1SUB#97 <- #62112$#11688
+       DO      ;1SUB#98 <- #64936$#6592
+       PLEASE  ;1SUB#99 <- #49924$#57920
+       DO      ;1SUB#100 <- #64324$#46164
+       DO      ;1SUB#101 <- #24148$#33344
+       DO      ;1SUB#102 <- #30912$#50560
+       PLEASE  ;1SUB#103 <- #9536$#44800
+       DO      ;1SUB#104 <- #21152$#11688
+       DO      ;1SUB#105 <- #59816$#59584
+       DO      ;1SUB#106 <- #57536$#36352
+       PLEASE  ;1SUB#107 <- #4480$#41992
+       DO      ;1SUB#108 <- #30932$#32960
+       DO      ;1SUB#109 <- #26988$#6464
+       DO      ;1SUB#110 <- #40960$#44032
+       PLEASE  ;1SUB#111 <- #38016$#36544
+       DO      ;1SUB#112 <- #53792$#11688
+       DO      ;1SUB#113 <- #64936$#27520
+       DO      ;1SUB#114 <- #27520$#54024
+       PLEASE  ;1SUB#115 <- #54656$#62088
+       DO      ;1SUB#116 <- #11688$#59816
+       DO      ;1SUB#117 <- #6336$#57536
+       DO      ;1SUB#118 <- #39424$#48768
+       PLEASE  ;1SUB#119 <- #21152$#11688
+       DO      ;1SUB#120 <- #64936$#55744
+       DO      ;1SUB#121 <- #49924$#57920
+       DO      ;1SUB#122 <- #64324$#46164
+       PLEASE  ;1SUB#123 <- #24148$#54848
+       DO      ;1SUB#124 <- #53440$#50560
+       DO      ;1SUB#125 <- #2112$#29188
+       DO      ;1SUB#126 <- #7232$#57576
+       PLEASE  ;1SUB#127 <- #5268$#34440
+       DO      ;1SUB#128 <- #57024$#14656
+       DO      ;1SUB#129 <- #40960$#44032
+       DO      ;1SUB#130 <- #57744$#46164
+       PLEASE  ;1SUB#131 <- #24148$#48960
+       DO      ;1SUB#132 <- #16768$#54024
+       DO      ;1SUB#133 <- #54656$#62088
+       DO      ;1SUB#134 <- #11688$#59816
+       PLEASE  ;1SUB#135 <- #6336$#57536
+       DO      ;1SUB#136 <- #39424$#35200
+       DO      ;1SUB#137 <- #55968$#11688
+       DO      ;1SUB#138 <- #64936$#55744
+       PLEASE  ;1SUB#139 <- #49924$#57920
+       DO      ;1SUB#140 <- #64324$#46164
+       DO      ;1SUB#141 <- #24148$#53824
+       DO      ;1SUB#142 <- #55488$#50560
+       PLEASE  ;1SUB#143 <- #45120$#18048
+       DO      ;1SUB#144 <- #37184$#40960
+       DO      ;1SUB#145 <- #44032$#18924
+       DO      ;1SUB#146 <- #38976$#49344
+       PLEASE  ;1SUB#147 <- #58496$#43476
+       DO      ;1SUB#148 <- #39880$#40960
+       DO      ;1SUB#149 <- #59392$#27776
+       DO      ;1SUB#150 <- #42348$#50496
+       PLEASE  ;1SUB#151 <- #48256$#29312
+       DO      ;1SUB#152 <- #21504$#7232
+       DO      ;1SUB#153 <- #27648$#58732
+       DO      ;1SUB#154 <- #20160$#46080
+       PLEASE  ;1SUB#155 <- #6848$#58732
+       DO      ;1SUB#156 <- #49104$#46164
+       DO      ;1SUB#157 <- #24148$#65088
+       DO      ;1SUB#158 <- #50048$#54024
+       PLEASE  ;1SUB#159 <- #54656$#62088
+       DO      ;1SUB#160 <- #11688$#59816
+       DO      ;1SUB#161 <- #59584$#57536
+       DO      ;1SUB#162 <- #51968$#49616
+       PLEASE  ;1SUB#163 <- #46164$#24148
+       DO      ;1SUB#164 <- #59968$#53248
+       DO      ;1SUB#165 <- #13632$#49924
+       DO      ;1SUB#166 <- #57920$#64324
+       PLEASE  ;1SUB#167 <- #7904$#656
+       DO      ;1SUB#168 <- #11688$#59816
+       DO      ;1SUB#169 <- #54464$#57536
+       DO      ;1SUB#170 <- #51968$#44496
+       PLEASE  ;1SUB#171 <- #24288$#33424
+       DO      ;1SUB#172 <- #11688$#64936
+       DO      ;1SUB#173 <- #49280$#16384
+       DO      ;1SUB#174 <- #60288$#54024
+       PLEASE  ;1SUB#175 <- #54656$#62088
+       DO      ;1SUB#176 <- #11688$#60588
+       DO      ;1SUB#177 <- #28224$#14464
+       DO      ;1SUB#178 <- #11924$#9536
+       PLEASE  ;1SUB#179 <- #23200$#11688
+       DO      ;1SUB#180 <- #64936$#60096
+       DO      ;1SUB#181 <- #49924$#57920
+       DO      ;1SUB#182 <- #64324$#46164
+       PLEASE  ;1SUB#183 <- #24148$#52936
+       DO      ;1SUB#184 <- #7168$#940
+       DO      ;1SUB#185 <- #24704$#22824
+       DO      ;1SUB#186 <- #36304$#46164
+       PLEASE  ;1SUB#187 <- #24148$#6408
+       DO      ;1SUB#188 <- #22720$#37868
+       DO      ;1SUB#189 <- #52548$#1360
+       DO      ;1SUB#190 <- #54720$#5236
+       PLEASE  ;1SUB#191 <- #24148$#33344
+       DO      ;1SUB#192 <- #30912$#50560
+       DO      ;1SUB#193 <- #13632$#45056
+       DO      ;1SUB#194 <- #25936$#46164
+       PLEASE  ;1SUB#195 <- #24148$#6528
+       DO      ;1SUB#196 <- #53440$#50560
+       DO      ;1SUB#197 <- #33344$#60908
+       DO      ;1SUB#198 <- #29312$#21504
+       PLEASE  ;1SUB#199 <- #54608$#46164
+       DO      ;1SUB#200 <- #24148$#6528
+       DO      ;1SUB#201 <- #41992$#15828
+       DO      ;1SUB#202 <- #19136$#57536
+       PLEASE  ;1SUB#203 <- #39424$#24192
+       DO      ;1SUB#204 <- #22272$#12352
+       DO      ;1SUB#205 <- #15680$#19456
+       DO      ;1SUB#206 <- #10496$#61600
+       PLEASE  ;1SUB#207 <- #11688$#44264
+       DO      ;1SUB#208 <- #29188$#7232
+       DO      ;1SUB#209 <- #16360$#28864
+       DO      ;1SUB#210 <- #50560$#8512
+       PLEASE  ;1SUB#211 <- #512$#6912
+       DO      ;1SUB#212 <- #48768$#13952
+       DO      ;1SUB#213 <- #42240$#20560
+       DO      ;1SUB#214 <- #46164$#24148
+       PLEASE  ;1SUB#215 <- #6528$#41992
+       DO      ;1SUB#216 <- #15828$#64192
+       DO      ;1SUB#217 <- #57536$#39424
+       DO      ;1SUB#218 <- #17024$#22528
+       PLEASE  ;1SUB#219 <- #2112$#10560
+       DO      ;1SUB#220 <- #53248$#45056
+       DO      ;1SUB#221 <- #21152$#11688
+       DO      ;1SUB#222 <- #59816$#58304
+       PLEASE  ;1SUB#223 <- #57536$#39424
+       DO      ;1SUB#224 <- #6784$#64160
+       DO      ;1SUB#225 <- #11688$#64936
+       DO      ;1SUB#226 <- #60096$#49924
+       PLEASE  ;1SUB#227 <- #57920$#64324
+       DO      ;1SUB#228 <- #46164$#24148
+       DO      ;1SUB#229 <- #54080$#53952
+       DO      ;1SUB#230 <- #50560$#33344
+       PLEASE  ;1SUB#231 <- #21152$#11688
+       DO      ;1SUB#232 <- #63912$#46272
+       DO      ;1SUB#233 <- #57536$#39424
+       DO      ;1SUB#234 <- #4048$#46164
+       PLEASE  ;1SUB#235 <- #24148$#62016
+       DO      ;1SUB#236 <- #35848$#15828
+       DO      ;1SUB#237 <- #19136$#57536
+       DO      ;1SUB#238 <- #39424$#31360
+       PLEASE  ;1SUB#239 <- #31312$#46164
+       DO      ;1SUB#240 <- #24148$#52936
+       DO      ;1SUB#241 <- #7168$#940
+       DO      ;1SUB#242 <- #24704$#22824
+       PLEASE  ;1SUB#243 <- #51392$#23296
+       DO      ;1SUB#244 <- #62016$#21152
+       DO      ;1SUB#245 <- #11688$#59816
+       DO      ;1SUB#246 <- #5312$#57536
+       PLEASE  ;1SUB#247 <- #39424$#35200
+       DO      ;1SUB#248 <- #55968$#11688
+       DO      ;1SUB#249 <- #60908$#55744
+       DO      ;1SUB#250 <- #23872$#17236
+       PLEASE  ;1SUB#251 <- #9536$#2720
+       DO      ;1SUB#252 <- #20192$#41616
+       DO      ;1SUB#253 <- #11688$#44524
+       DO      ;1SUB#254 <- #52288$#53184
+       PLEASE  ;1SUB#255 <- #16808$#59584
+       DO      ;1SUB#256 <- #23296$#50752
+       DO      ;1SUB#257 <- #31392$#11688
+       DO      ;1SUB#258 <- #59816$#59584
+       PLEASE  ;1SUB#259 <- #57536$#51968
+       DO      ;1SUB#260 <- #464$#46164
+       DO      ;1SUB#261 <- #24148$#59968
+       DO      ;1SUB#262 <- #49152$#38208
+       PLEASE  ;1SUB#263 <- #49924$#57920
+       DO      ;1SUB#264 <- #64324$#46164
+       DO      ;1SUB#265 <- #24148$#62016
+       DO      ;1SUB#266 <- #35848$#15828
+       PLEASE  ;1SUB#267 <- #19136$#57536
+       DO      ;1SUB#268 <- #51968$#39124
+       DO      ;1SUB#269 <- #40904$#34816
+       DO      ;1SUB#270 <- #29344$#11688
+       PLEASE  ;1SUB#271 <- #60908$#35968
+       DO      ;1SUB#272 <- #10580$#4680
+       DO      ;1SUB#273 <- #33812$#62016
+       DO      ;1SUB#274 <- #21152$#11688
+       PLEASE  ;1SUB#275 <- #59816$#5312
+       DO      ;1SUB#276 <- #57536$#51968
+       DO      ;1SUB#277 <- #24016$#46164
+       DO      ;1SUB#278 <- #24148$#52936
+       PLEASE  ;1SUB#279 <- #32384$#57216
+       DO      ;1SUB#280 <- #23232$#50088
+       DO      ;1SUB#281 <- #59584$#23296
+       DO      ;1SUB#282 <- #50752$#31392
+       PLEASE  ;1SUB#283 <- #11688$#60908
+       DO      ;1SUB#284 <- #55744$#23872
+       DO      ;1SUB#285 <- #17236$#9536
+       DO      ;1SUB#286 <- #2720$#3808
+       PLEASE  ;1SUB#287 <- #8848$#11688
+       DO      ;1SUB#288 <- #63912$#55428
+       DO      ;1SUB#289 <- #7232$#12264
+       DO      ;1SUB#290 <- #53440$#50560
+       PLEASE  ;1SUB#291 <- #55680$#16876
+       DO      ;1SUB#292 <- #18752$#15360
+       DO      ;1SUB#293 <- #58112$#48256
+       DO      ;1SUB#294 <- #36544$#53792
+       PLEASE  ;1SUB#295 <- #11688$#63912
+       DO      ;1SUB#296 <- #55428$#7232
+       DO      ;1SUB#297 <- #16360$#28864
+       DO      ;1SUB#298 <- #50560$#55680
+       PLEASE  ;1SUB#299 <- #16876$#7488
+       DO      ;1SUB#300 <- #46336$#59904
+       DO      ;1SUB#301 <- #38016$#36544
+       DO      ;1SUB#302 <- #53792$#11688
+       PLEASE  ;1SUB#303 <- #63912$#55428
+       DO      ;1SUB#304 <- #7232$#32744
+       DO      ;1SUB#305 <- #61632$#50560
+       DO      ;1SUB#306 <- #55680$#16876
+       PLEASE  ;1SUB#307 <- #19776$#48256
+       DO      ;1SUB#308 <- #38528$#30976
+       DO      ;1SUB#309 <- #34368$#53792
+       DO      ;1SUB#310 <- #11688$#63912
+       PLEASE  ;1SUB#311 <- #55428$#7232
+       DO      ;1SUB#312 <- #27624$#22720
+       DO      ;1SUB#313 <- #50560$#55680
+       DO      ;1SUB#314 <- #16876$#19776
+       PLEASE  ;1SUB#315 <- #48256$#31360
+       DO      ;1SUB#316 <- #32512$#53312
+       DO      ;1SUB#317 <- #53792$#11688
+       DO      ;1SUB#318 <- #60908$#35968
+       PLEASE  ;1SUB#319 <- #10580$#4680
+       DO      ;1SUB#320 <- #33812$#58944
+       DO      ;1SUB#321 <- #23200$#11688
+       DO      ;1SUB#322 <- #60908$#55744
+       PLEASE  ;1SUB#323 <- #23872$#17236
+       DO      ;1SUB#324 <- #9536$#2720
+       DO      ;1SUB#325 <- #24544$#32912
+       DO      ;1SUB#326 <- #11688$#63912
+       PLEASE  ;1SUB#327 <- #51392$#57536
+       DO      ;1SUB#328 <- #51968$#45776
+       DO      ;1SUB#329 <- #46164$#24148
+       DO      ;1SUB#330 <- #54848$#53440
+       PLEASE  ;1SUB#331 <- #50560$#25920
+       DO      ;1SUB#332 <- #55968$#11688
+       DO      ;1SUB#333 <- #47276$#45568
+       DO      ;1SUB#334 <- #17236$#35144
+       PLEASE  ;1SUB#335 <- #12928$#56744
+       DO      ;1SUB#336 <- #60288$#47760
+       DO      ;1SUB#337 <- #46164$#24148
+       DO      ;1SUB#338 <- #59968$#53248
+       PLEASE  ;1SUB#339 <- #13632$#49924
+       DO      ;1SUB#340 <- #57920$#64324
+       DO      ;1SUB#341 <- #46164$#24148
+       DO      ;1SUB#342 <- #37440$#22720
+       PLEASE  ;1SUB#343 <- #50560$#54848
+       DO      ;1SUB#344 <- #23200$#11688
+       DO      ;1SUB#345 <- #64936$#49280
+       DO      ;1SUB#346 <- #45056$#27520
+       PLEASE  ;1SUB#347 <- #54024$#54656
+       DO      ;1SUB#348 <- #62088$#11688
+       DO      ;1SUB#349 <- #59816$#55488
+       DO      ;1SUB#350 <- #57536$#51968
+       PLEASE  ;1SUB#351 <- #44496$#46164
+       DO      ;1SUB#352 <- #24148$#59968
+       DO      ;1SUB#353 <- #53248$#13632
+       DO      ;1SUB#354 <- #49924$#57920
+       PLEASE  ;1SUB#355 <- #64324$#46164
+       DO      ;1SUB#356 <- #24148$#34368
+       DO      ;1SUB#357 <- #28864$#50560
+       DO      ;1SUB#358 <- #54848$#23200
+       PLEASE  ;1SUB#359 <- #11688$#64936
+       DO      ;1SUB#360 <- #49280$#45056
+       DO      ;1SUB#361 <- #27520$#54024
+       DO      ;1SUB#362 <- #54656$#62088
+       PLEASE  ;1SUB#363 <- #11688$#60648
+       DO      ;1SUB#364 <- #57920$#57536
+       DO      ;1SUB#365 <- #36416$#29188
+       DO      ;1SUB#366 <- #7232$#57320
+       PLEASE  ;1SUB#367 <- #17900$#29312
+       DO      ;1SUB#368 <- #21504$#37952
+       DO      ;1SUB#369 <- #53792$#11688
+       DO      ;1SUB#370 <- #63912$#55428
+       PLEASE  ;1SUB#371 <- #7232$#45288
+       DO      ;1SUB#372 <- #22720$#50560
+       DO      ;1SUB#373 <- #55680$#16876
+       DO      ;1SUB#374 <- #18752$#15360
+       PLEASE  ;1SUB#375 <- #58112$#48256
+       DO      ;1SUB#376 <- #36544$#53792
+       DO      ;1SUB#377 <- #11688$#63912
+       DO      ;1SUB#378 <- #55428$#7232
+       PLEASE  ;1SUB#379 <- #58600$#61632
+       DO      ;1SUB#380 <- #50560$#55680
+       DO      ;1SUB#381 <- #16876$#7488
+       DO      ;1SUB#382 <- #46336$#59904
+       PLEASE  ;1SUB#383 <- #38016$#36544
+       DO      ;1SUB#384 <- #53792$#11688
+       DO      ;1SUB#385 <- #63912$#55428
+       DO      ;1SUB#386 <- #7232$#42216
+       PLEASE  ;1SUB#387 <- #28864$#50560
+       DO      ;1SUB#388 <- #55680$#16876
+       DO      ;1SUB#389 <- #19776$#48256
+       DO      ;1SUB#390 <- #38528$#30976
+       PLEASE  ;1SUB#391 <- #34368$#53792
+       DO      ;1SUB#392 <- #11688$#63912
+       DO      ;1SUB#393 <- #55428$#7232
+       DO      ;1SUB#394 <- #62696$#53440
+       PLEASE  ;1SUB#395 <- #50560$#55680
+       DO      ;1SUB#396 <- #16876$#19776
+       DO      ;1SUB#397 <- #48256$#31360
+       DO      ;1SUB#398 <- #32512$#53312
+       PLEASE  ;1SUB#399 <- #53792$#11688
+       DO      ;1SUB#400 <- #59816$#58560
+       DO      ;1SUB#401 <- #57536$#36352
+       DO      ;1SUB#402 <- #60864$#11264
+       PLEASE  ;1SUB#403 <- #29312$#21504
+       DO      ;1SUB#404 <- #3156$#7816
+       DO      ;1SUB#405 <- #59584$#47040
+       DO      ;1SUB#406 <- #56896$#40084
+       PLEASE  ;1SUB#407 <- #34440$#57024
+       DO      ;1SUB#408 <- #14656$#40960
+       DO      ;1SUB#409 <- #44032$#58496
+       DO      ;1SUB#410 <- #15380$#36808
+       PLEASE  ;1SUB#411 <- #9344$#15680
+       DO      ;1SUB#412 <- #15508$#57288
+       DO      ;1SUB#413 <- #12272$#60288
+       DO      ;1SUB#414 <- #43664$#11688
+       PLEASE  ;1SUB#415 <- #64936$#49280
+       DO      ;1SUB#416 <- #16384$#60288
+       DO      ;1SUB#417 <- #54024$#54656
+       DO      ;1SUB#418 <- #41608$#8160
+       PLEASE  ;1SUB#419 <- #144$#11688
+       DO      ;1SUB#420 <- #59816$#6336
+       DO      ;1SUB#421 <- #57536$#39424
+       DO      ;1SUB#422 <- #24448$#2896
+       PLEASE  ;1SUB#423 <- #46164$#24148
+       DO      ;1SUB#424 <- #60992$#58240
+       DO      ;1SUB#425 <- #54024$#54656
+       DO      ;1SUB#426 <- #42968$#27520
+       PLEASE  ;1SUB#427 <- #10896$#11688
+       DO      ;1SUB#428 <- #59816$#9408
+       DO      ;1SUB#429 <- #57536$#39424
+       DO      ;1SUB#430 <- #53200$#46164
+       PLEASE  ;1SUB#431 <- #24148$#34368
+       DO      ;1SUB#432 <- #28864$#50560
+       DO      ;1SUB#433 <- #9536$#32768
+       DO      ;1SUB#434 <- #0$#55968
+       PLEASE  ;1SUB#435 <- #11688$#64936
+       DO      ;1SUB#436 <- #15232$#52096
+       DO      ;1SUB#437 <- #54024$#54656
+       DO      ;1SUB#438 <- #62088$#11688
+       PLEASE  ;1SUB#439 <- #59816$#6336
+       DO      ;1SUB#440 <- #57536$#39424
+       DO      ;1SUB#441 <- #19072$#0
+       DO      ;1SUB#442 <- #55968$#11688
+       PLEASE  ;1SUB#443 <- #64936$#15232
+       DO      ;1SUB#444 <- #52096$#54024
+       DO      ;1SUB#445 <- #54656$#62088
+       DO      ;1SUB#446 <- #11688$#59816
+       PLEASE  ;1SUB#447 <- #6336$#57536
+       DO      ;1SUB#448 <- #39424$#19072
+       DO      ;1SUB#449 <- #17744$#46164
+       DO      ;1SUB#450 <- #24148$#48960
+       PLEASE  ;1SUB#451 <- #26432$#49924
+       DO      ;1SUB#452 <- #57920$#64324
+       DO      ;1SUB#453 <- #46164$#24148
+       DO      ;1SUB#454 <- #34368$#28864
+       PLEASE  ;1SUB#455 <- #50560$#9536
+       DO      ;1SUB#456 <- #50512$#8160
+       DO      ;1SUB#457 <- #22336$#5236
+       DO      ;1SUB#458 <- #24148$#48960
+       PLEASE  ;1SUB#459 <- #26432$#49924
+       DO      ;1SUB#460 <- #57920$#64324
+       DO      ;1SUB#461 <- #8160$#26432
+       DO      ;1SUB#462 <- #5236$#24148
+       PLEASE  ;1SUB#463 <- #59968$#54272
+       DO      ;1SUB#464 <- #7488$#49924
+       DO      ;1SUB#465 <- #57920$#64324
+       DO      ;1SUB#466 <- #46164$#24148
+       PLEASE  ;1SUB#467 <- #53824$#55488
+       DO      ;1SUB#468 <- #50560$#45120
+       DO      ;1SUB#469 <- #18048$#63132
+       DO      ;1SUB#470 <- #39636$#17608
+       PLEASE  ;1SUB#471 <- #63616$#39488
+       DO      ;1SUB#472 <- #63636$#36808
+       DO      ;1SUB#473 <- #55424$#15680
+       DO      ;1SUB#474 <- #20628$#57288
+       PLEASE  ;1SUB#475 <- #31392$#11688
+       DO      ;1SUB#476 <- #64936$#49280
+       DO      ;1SUB#477 <- #16384$#60288
+       DO      ;1SUB#478 <- #54024$#54656
+       PLEASE  ;1SUB#479 <- #62088$#11688
+       DO      ;1SUB#480 <- #59816$#58560
+       DO      ;1SUB#481 <- #57536$#51968
+       DO      ;1SUB#482 <- #44496$#46164
+       PLEASE  ;1SUB#483 <- #24148$#54848
+       DO      ;1SUB#484 <- #53440$#50560
+       DO      ;1SUB#485 <- #50752$#31392
+       DO      ;1SUB#486 <- #11688$#64936
+       PLEASE  ;1SUB#487 <- #49280$#9472
+       DO      ;1SUB#488 <- #16768$#54024
+       DO      ;1SUB#489 <- #54656$#62088
+       DO      ;1SUB#490 <- #11688$#47276
+       PLEASE  ;1SUB#491 <- #45568$#17236
+       DO      ;1SUB#492 <- #35144$#12928
+       DO      ;1SUB#493 <- #56744$#11136
+       DO      ;1SUB#494 <- #47760$#46164
+       PLEASE  ;1SUB#495 <- #24148$#34368
+       DO      ;1SUB#496 <- #28864$#50560
+       DO      ;1SUB#497 <- #61440$#48832
+       DO      ;1SUB#498 <- #32064$#48276
+       PLEASE  ;1SUB#499 <- #36808$#48192
+       DO      ;1SUB#500 <- #23552$#62784
+       DO      ;1SUB#501 <- #15488$#65216
+       DO      ;1SUB#502 <- #28012$#11904
+       PLEASE  ;1SUB#503 <- #22592$#64032
+       DO      ;1SUB#504 <- #11688$#59816
+       DO      ;1SUB#505 <- #6336$#57536
+       DO      ;1SUB#506 <- #51712$#23252
+       PLEASE  ;1SUB#507 <- #36808$#63552
+       DO      ;1SUB#508 <- #58368$#23252
+       DO      ;1SUB#509 <- #40904$#3072
+       DO      ;1SUB#510 <- #18832$#46164
+       PLEASE  ;1SUB#511 <- #24148$#60992
+       DO      ;1SUB#512 <- #58240$#54024
+       DO      ;1SUB#513 <- #54656$#62088
+       DO      ;1SUB#514 <- #11688$#59816
+       PLEASE  ;1SUB#515 <- #59584$#57536
+       DO      ;1SUB#516 <- #51968$#45520
+       DO      ;1SUB#517 <- #46164$#24148
+       DO      ;1SUB#518 <- #34368$#28864
+       PLEASE  ;1SUB#519 <- #50560$#50752
+       DO      ;1SUB#520 <- #31392$#11688
+       DO      ;1SUB#521 <- #64936$#49280
+       DO      ;1SUB#522 <- #49152$#27520
+       PLEASE  ;1SUB#523 <- #54024$#54656
+       DO      ;1SUB#524 <- #62088$#11688
+       DO      ;1SUB#525 <- #59816$#59584
+       DO      ;1SUB#526 <- #57536$#51968
+       PLEASE  ;1SUB#527 <- #40400$#46164
+       DO      ;1SUB#528 <- #24148$#52936
+       DO      ;1SUB#529 <- #42624$#43904
+       DO      ;1SUB#530 <- #37544$#4048
+       DO .7 <- #1
+       DO ,1 <- #4
+       DO COME FROM (5)
+       DO .5 <- '?"&.7~#3"$#1'~#3
+       DO (2) NEXT
+       DO :1 <- #57364$#58240
+       DO (7) NEXT
+       DO :1 <- #19776$#2436
+       DO (3) NEXT
+(2)    DO (1001) NEXT
+       DO :1 <- #46164$#7684
+(3)    DO FORGET #1
+       DO (7) NEXT
+       DO :1 <- #39712$#41992
+       DO (7) NEXT
+       DO .6 <- #170
+       DO .2 <- #66
+       DO (6) NEXT
+       DO .1 <- .7
+       DO (9) NEXT
+       DO .2 <- #4
+       DO (6) NEXT
+       DO :1 <- #57536$#39424
+       DO (7) NEXT
+       DO .6 <- #196
+       DO .1 <- ';1SUB.7'~'#65535$#0'
+       DO (90) NEXT
+       DO .2 <- #36
+       DO (6) NEXT
+       DO .1 <- ';1SUB.7'~'#0$#65535'
+       DO (9) NEXT
+       DO .2 <- #80
+       DO (6) NEXT
+       DO .5 <- "?'"#65535~'"?.7$!9~#65532'"~"#0$#65535"'"~#1'$#1"~#3
+       DO (4) NEXT
+       DO .1 <- .7
+       DO (1020) NEXT
+(5)    DO .7 <- .1
+(4)    DO (1001) NEXT
+       DO FORGET #1
+       DO (8) NEXT
+       DO READ OUT ,1
+       DO GIVE UP
+
+(1)    DO .6 <- #2120
+       DO ;1 <- .6~#65532
+       DO ;1SUB#1 <- #15956$#24148
+       DO ;1SUB#2 <- #59968$#60288
+       DO ;1SUB#3 <- #54024$#54656
+       DO .9 <- #12
+       DO (8) NEXT
+       DO .9 <- .6
+       DO ,6 <- #1
+       DO ,6SUB#1 <- #218
+       DO READ OUT ,1 + ,6
+       DO .6 <- #80
+       DO RESUME #1
+
+(6)    DO STASH .1 + .3
+       DO .1 <- .6
+       DO (1010) NEXT
+       DO ,6SUB#1 <- .3~#255
+       DO READ OUT ,6
+       DO .6 <- .2
+       DO RETRIEVE .1 + .3
+       DO RESUME #1
+
+(7)    DO ,1SUB#1 <- :1~'#43690$#0'
+       DO ,1SUB#2 <- :1~'#21845$#0'
+       DO ,1SUB#3 <- :1~'#0$#43690'
+       DO ,1SUB#4 <- :1~'#0$#21845'
+       DO READ OUT ,1
+       DO RESUME #1
+
+(8)    DO ,1 <- .9
+       DO .1 <- #0
+       DO COME FROM (81)
+       DO (1020) NEXT
+       DO .4 <- .1
+       DO (1020) NEXT
+       DO .3 <- .1
+       DO (1020) NEXT
+       DO .2 <- .1
+       DO (1020) NEXT
+       DO :1 <- ;1SUB!1~#65532'
+       DO ,1SUB.4 <- :1~'#43690$#0'
+       DO ,1SUB.3 <- :1~'#21845$#0'
+       DO ,1SUB.2 <- :1~'#0$#43690'
+       DO ,1SUB.1 <- :1~'#0$#21845'
+       DO .5 <- '?"'#65535~"'?.9$.1'~'#0$#65535'"'~#1"$#2'~#3
+(81)   DO (1001) NEXT
+
+(9)    DO .2 <- #196
+       DO (6) NEXT
+(90)   DO .4 <- #0
+       DO .2 <- #10000
+       DO (92) NEXT
+       DO .2 <- #1000
+       DO (92) NEXT
+       DO .2 <- #100
+       DO (92) NEXT
+       DO .2 <- #10
+(91)   DO (92) NEXT
+(92)   DO (1040) NEXT
+       DO .5 <- "?'"V!3~.3'$.4"~#1'$#2"~#3
+       DO (1001) NEXT
+       DO .5 <- .1
+       DO .1 <- .3
+       DO (1039) NEXT
+       DO COME FROM (91)
+       DO .2 <- "!1$#3'~#15"$"!1$#3'~#240"
+       DO .2 <- !2~#15'$!2~#240'
+       DO (6) NEXT
+       DO .1 <- .5
+       DO .2 <- .3
+       DO (1010) NEXT
+       DO .1 <- .3
+       DO RESUME #1
diff --git a/pit/random.doc b/pit/random.doc
new file mode 100644 (file)
index 0000000..1769090
--- /dev/null
@@ -0,0 +1,23 @@
+       DO (1900) NEXT
+       DO READ OUT .1
+       PLEASE GIVE UP
+(1900) DO STASH .2 + .3
+       DO .3 <- #65535
+       DO (1903) NEXT
+(1903) PLEASE FORGET #1
+       DO .2 <- #0
+       PLEASE %50 IGNORE .2
+       DO .2 <- #1
+       PLEASE REMEMBER .2
+       DO .1 <- !1$.2'~"#65535$#1"
+       DO .3 <- .3~#65534
+       DO (1902) NEXT
+       DO (1903) NEXT
+(1902) DO (1904) NEXT
+       DO RETRIEVE .2 + .3
+       DO FORGET #1
+       PLEASE RESUME #1
+(1904) PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
+
+Random.i: Store a random number between 0 and 65535 in .1
+       (blojo@ocf.berkeley.edu)
diff --git a/pit/random.i b/pit/random.i
new file mode 100644 (file)
index 0000000..38b37e7
--- /dev/null
@@ -0,0 +1,20 @@
+       DO (1900) NEXT
+       DO READ OUT .1
+       PLEASE GIVE UP
+(1900) DO STASH .2 + .3
+       DO .3 <- #65535
+       DO (1903) NEXT
+(1903) PLEASE FORGET #1
+       DO .2 <- #0
+       PLEASE %50 IGNORE .2
+       DO .2 <- #1
+       PLEASE REMEMBER .2
+       DO .1 <- !1$.2'~"#65535$#1"
+       DO .3 <- .3~#65534
+       DO (1902) NEXT
+       DO (1903) NEXT
+(1902) DO (1904) NEXT
+       DO RETRIEVE .2 + .3
+       DO FORGET #1
+       PLEASE RESUME #1
+(1904) PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
diff --git a/pit/random2.i b/pit/random2.i
new file mode 100644 (file)
index 0000000..7ddf74a
--- /dev/null
@@ -0,0 +1,17 @@
+(1900)  DO STASH .2 + .3
+        DO .3 <- #65535
+        DO (1903) NEXT
+(1903)  PLEASE FORGET #1
+        DO .2 <- #0
+        PLEASE %50 IGNORE .2
+        DO .2 <- #1
+        PLEASE REMEMBER .2
+        DO .1 <- !1$.2'~"#65535$#1"
+        DO .3 <- .3~#65534
+        DO (1902) NEXT
+        DO (1903) NEXT
+(1902)  DO (1904) NEXT
+        DO RETRIEVE .2 + .3
+        DO FORGET #1
+        PLEASE RESUME #1
+(1904)  PLEASE RESUME '?"!3~.3'~#1"$#1'~#3
diff --git a/pit/rot13.doc b/pit/rot13.doc
new file mode 100644 (file)
index 0000000..36e8786
--- /dev/null
@@ -0,0 +1,16 @@
+
+From: jlm@cco.caltech.edu (Jacob Mandelson)
+Newsgroups: alt.lang.intercal
+Subject: Re: ROT-13
+Date: 7 Jun 1993 21:36:40 GMT
+Organization: California Institute of Technology, Pasadena
+Message-ID: <1v0cd9INN8gk@gap.caltech.edu>
+
+Here's an intercal program that encodes/decodes rot13 documents:
+
+[Program moved to separate file and modified to satisfy the
+ politeness rules, LHH 5/11/96.]
+ 
+-- 
+       Jacob Mandelson                 jlm@cco.caltech.edu
+       Electrical engineers do it with less resistance.
diff --git a/pit/rot13.i b/pit/rot13.i
new file mode 100644 (file)
index 0000000..58f5e6e
--- /dev/null
@@ -0,0 +1,128 @@
+(10) PLEASE DON'T GIVE UP
+(1) DO .2 <- '?.1$#64'~'#0$#65535'
+DO .2 <- '&"'.1~.2'~'"?'?.2~.2'$#32768"~"#0$#65535"'"$".2~.2"'~#1
+DO .3 <- '?#91$.1'~'#0$#65535'
+DO .3 <- '&"'#91~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'"$".3~.3"'~#1
+DO (11) NEXT
+DO (2) NEXT
+DO (12) NEXT
+(11) DO (13) NEXT
+PLEASE FORGET #1
+DO (12) NEXT
+(13) DO (14) NEXT
+PLEASE FORGET #2
+DO (12) NEXT
+(14) DO STASH .1
+DO .1 <- .3
+DO (1000) NEXT
+DO .1 <- .3
+DO .2 <- #1
+PLEASE DO (1000) NEXT
+DO RETRIEVE .1
+PLEASE RESUME .3
+(12) PLEASE FORGET #1
+DO .2 <- '?.1$#96'~'#0$#65535'
+DO .2 <- '&"'.1~.2'~'"?'?.2~.2'$#32768"~"#0$#65535"'"$".2~.2"'~#1
+DO .3 <- '?#123$.1'~'#0$#65535'
+DO .3 <- '&"'#123~.3'~'"?'?.3~.3'$#32768"~"#0$#65535"'"$".3~.3"'~#1
+PLEASE DO (15) NEXT
+PLEASE DO (3) NEXT
+DO (16) NEXT
+(15) DO (17) NEXT
+PLEASE FORGET #1
+DO (16) NEXT
+(17) DO (18) NEXT
+PLEASE FORGET #2
+DO (16) NEXT
+(18) PLEASE STASH .1
+DO .1 <- .3
+DO (1000) NEXT
+DO .1 <- .3
+DO .2 <- #1
+DO (1000) NEXT
+PLEASE RETRIEVE .1
+PLEASE RESUME .3
+(16) PLEASE FORGET #1
+DO RESUME #1
+(2) DO .2 <- #65
+DO (1010) NEXT
+PLEASE .1 <- .3
+PLEASE .2 <- #13
+DO (1000) NEXT
+PLEASE STASH .3
+DO .1 <- .3
+DO .2 <- #26
+DO (1040) NEXT
+DO .1 <- .3
+DO (1030) NEXT
+DO .2 <- .3
+PLEASE RETRIEVE .3
+DO .1 <- .3
+DO (1010) NEXT
+DO .1 <- .3
+DO .2 <- #65
+DO (1000) NEXT
+DO .1 <- .3
+DO RESUME #1
+(3) DO .2 <- #97
+DO (1010) NEXT
+DO .1 <- .3
+DO .2 <- #13
+DO (1000) NEXT
+DO STASH .3
+DO .1 <- .3
+DO .2 <- #26
+DO (1040) NEXT
+DO .1 <- .3
+DO (1030) NEXT
+DO .2 <- .3
+DO RETRIEVE .3
+DO .1 <- .3
+DO (1010) NEXT
+DO .1 <- .3
+DO .2 <- #97
+DO (1000) NEXT
+DO .1 <- .3
+PLEASE RESUME #1
+DO COME FROM (10)
+DO .4 <- #0
+DO .5 <- #0
+DO STASH .4 + .5
+DO ,1 <- #1
+DO COME FROM (33)
+DO WRITE IN ,1
+DO .1 <- ,1 SUB #1
+DO (31) NEXT
+PLEASE DO .6 <- #1
+PLEASE DO (34) NEXT
+(32) PLEASE RESUME '?.1$#256'~'#256$#256'
+(31) DO (32) NEXT
+DO FORGET #1
+DO .6 <- #0
+PLEASE DO (34) NEXT
+(33) DON'T GIVE UP
+(34) DO .6 <- "?!6'$#1"~#3
+DO (40) NEXT
+DO GIVE UP
+(40) DO (41) NEXT
+PLEASE FORGET #1
+DO (42) NEXT
+(41) DO RESUME .6
+(42) DO FORGET #1
+DO RETRIEVE .4
+DO .2 <- .4
+DO (1000) NEXT
+DO .4 <- .3~#255
+DO .3 <- .4
+DO STASH .4
+DO .1 <- .3
+DO (1) NEXT
+DO .3 <- !1~#15'$!1~#240'
+DO .3 <- !3~#15'$!3~#240'
+DO .2 <- !3~#15'$!3~#240'
+DO .1 <- .5
+DO (1010) NEXT
+DO .5 <- .2
+DO ,1 SUB #1 <- .3 
+PLEASE READ OUT ,1
+PLEASE RESUME #1
diff --git a/pit/rot13b.doc b/pit/rot13b.doc
new file mode 100644 (file)
index 0000000..ed891de
--- /dev/null
@@ -0,0 +1,117 @@
+
+Newsgroups: alt.folklore.computers,alt.lang.intercal
+From: clmeier@lili6.lili.uni-bielefeld.de (Clemens Meier)
+Subject: Re: Duplicated programming language names?
+Message-ID: <q991k5451s.fsf@lili6.lili.uni-bielefeld.de>
+Date: Fri, 22 Dec 1995 13:11:11 GMT
+Organization: Universitaet Bielefeld, Linguistik und Literaturwissenschaft, Germany
+
+> Mahlzeit
+
+Wohl bekomm's!
+
+> > Programming Language (someone wrote an INTERCAL ROT-13 program which
+> > takes about 4 pages of completely indecipherable code).
+> 
+> Where can I get it???!!!
+
+What?
+
+INTERCAL? At the Retrocomputing Museum:
+       http://www.ccil.org/retro/retromuseum.html
+
+The ROT-13 program? Exercise is left to the reader.
+
+My solution is only slightly bigger than one page
+and could be further shortened. It is, of course,
+ROT-13 encoded and has a kind of Welsh touch, IMHO.
+
+Happy Chrismas and New Year, or, for
+Kenneth: Chrismas Year New and Happy!
+
+Clemens
+
+---------------------------------------------------------->8---------
+       QB ,1 <- #1
+       QB .4 <- #0
+       QB .5 <- #0
+       QB PBZR SEBZ (30)
+       QB JEVGR VA ,1
+       QB .1 <- ,1FHO#1
+       QB (10) ARKG
+       CYRNFR TVIR HC
+(20)   CYRNFR ERFHZR '?.1$#256'~'#256$#256'
+(10)   QB (20) ARKG
+       QB SBETRG #1
+       QB .2 <- .4
+       QB (1000) ARKG
+       QB .4 <- .3~#255
+       QB (50) ARKG
+       QB .3 <- !3~#15'$!3~#240'
+       QB .3 <- !3~#15'$!3~#240'
+       QB .2 <- !3~#15'$!3~#240'
+       QB .1 <- .5
+       QB (1010) ARKG
+       QB .5 <- .2
+       CYRNFR QB ,1FHO#1 <- .3
+(30)   CYRNFR ERNQ BHG ,1
+
+(50)   CYRNFR FGNFU .1 + .2 + .4 + .5 + .11+.12+.13+.14+.15+.16+.17+.18
+       CYRNFR QB .5 <- .4
+       CYRNFR QB .1 <- .5
+       QB .2 <- #65
+       QB (500) ARKG
+       QB .11 <- .3~#2
+       QB .2 <- #78
+       QB (500) ARKG
+       QB .12 <- .3~#2
+       QB .2 <- #97
+       QB (500) ARKG
+       QB .13 <- .3~#2
+       QB .2 <- #110
+       QB (500) ARKG
+       QB .14 <- .3~#2
+       CYRNFR QB .2 <- .5
+       QB .1 <- #77
+       QB (500) ARKG
+       QB .15 <- .3~#2
+       QB .1 <- #90
+       QB (500) ARKG
+       QB .16 <- .3~#2
+       QB .1 <- #109
+       QB (500) ARKG
+       QB .17 <- .3~#2
+       QB .1 <- #122
+       QB (500) ARKG
+       QB .18 <- .3~#2
+       CYRNFR QB .1 <- ' "'"!12$.11'~#3"$"!14$.13'~#3"'~#15"
+                         $"'"!16$.15'~#3"$"!18$.17'~#3"'~#15" '~#255
+       CYRNFR QB .1 <- 'I"!&1'~#85"'~#5
+       QB .2 <- "!1~#2'$!1~#2'"~#3
+       QB .1 <- !2$.1'~#15
+       QB .2 <- !2$.2'~#15
+       QB .2 <- "!1$.2'$!1$"'"I!2$.1'"~#15'"'"~#65535
+       QB .1 <- .5
+       CYRNFR QB (1009) ARKG 
+       CYRNFR ERGEVRIR .1 + .2 + .4 + .5 + .11+.12+.13+.14+.15+.16+.17+.18
+       CYRNFR ERFHZR #1
+       
+(500)  CYRNFR FGNFU .4
+       QB .3 <- "?!1$.2'"~"#0$#65535"
+       QB .4 <- .3~.3
+       QB .4 <- '&"!?4'$.4"'~'#0$#65535'
+       QB .3 <- '"'&"!1~.3'$.4"'~'#0$#65535'"~.4'
+               $'"'&"!2~.3'$.4"'~'#0$#65535'"~.4'
+       QB .3 <- "?'"!3~#1'$!3~#2'"$"#1$!3~#1'"'"~#5
+       CYRNFR ERGEVRIR .4
+       QB ERFHZR #1
+---------------------------------------------------------->8---------
+
+> I LOVE MY PDP-11/34A!
+
+Then you'll be right at home in this group.
+-- 
+----------------------------------------------------------------------------
+> Wo ist denn der Objoke ???                                   Clemens Meier
+Bei Clemens? Nie!! Ok, ok, aber fast nie.      clmeier@lili.uni-bielefeld.de
+    GO C+ UL P- L+>++>+++ 3$ E++>+++ N++ R+>+++ G'''' !tv b++ D f? TWERPS+++
diff --git a/pit/rot13b.i b/pit/rot13b.i
new file mode 100644 (file)
index 0000000..89c2a64
--- /dev/null
@@ -0,0 +1,74 @@
+
+       DO ,1 <- #1
+       DO .4 <- #0
+       DO .5 <- #0
+       DO COME FROM (30)
+       DO WRITE IN ,1
+       DO .1 <- ,1SUB#1
+       DO (10) NEXT
+       PLEASE GIVE UP
+(20)   PLEASE RESUME '?.1$#256'~'#256$#256'
+(10)   DO (20) NEXT
+       DO FORGET #1
+       DO .2 <- .4
+       DO (1000) NEXT
+       DO .4 <- .3~#255
+       DO (50) NEXT
+       DO .3 <- !3~#15'$!3~#240'
+       DO .3 <- !3~#15'$!3~#240'
+       DO .2 <- !3~#15'$!3~#240'
+       DO .1 <- .5
+       DO (1010) NEXT
+       DO .5 <- .2
+       PLEASE DO ,1SUB#1 <- .3
+(30)   PLEASE READ OUT ,1
+
+(50)   PLEASE STASH .1 + .2 + .4 + .5 + .11+.12+.13+.14+.15+.16+.17+.18
+       PLEASE DO .5 <- .4
+       PLEASE DO .1 <- .5
+       DO .2 <- #65
+       DO (500) NEXT
+       DO .11 <- .3~#2
+       DO .2 <- #78
+       DO (500) NEXT
+       DO .12 <- .3~#2
+       DO .2 <- #97
+       DO (500) NEXT
+       DO .13 <- .3~#2
+       DO .2 <- #110
+       DO (500) NEXT
+       DO .14 <- .3~#2
+       PLEASE DO .2 <- .5
+       DO .1 <- #77
+       DO (500) NEXT
+       DO .15 <- .3~#2
+       DO .1 <- #90
+       DO (500) NEXT
+       DO .16 <- .3~#2
+       DO .1 <- #109
+       DO (500) NEXT
+       DO .17 <- .3~#2
+       DO .1 <- #122
+       DO (500) NEXT
+       DO .18 <- .3~#2
+       PLEASE DO .1 <- ' "'"!12$.11'~#3"$"!14$.13'~#3"'~#15"
+                         $"'"!16$.15'~#3"$"!18$.17'~#3"'~#15" '~#255
+       PLEASE DO .1 <- 'V"!&1'~#85"'~#5
+       DO .2 <- "!1~#2'$!1~#2'"~#3
+       DO .1 <- !2$.1'~#15
+       DO .2 <- !2$.2'~#15
+       DO .2 <- "!1$.2'$!1$"'"V!2$.1'"~#15'"'"~#65535
+       DO .1 <- .5
+       PLEASE DO (1009) NEXT 
+       PLEASE RETRIEVE .1 + .2 + .4 + .5 + .11+.12+.13+.14+.15+.16+.17+.18
+       PLEASE RESUME #1
+       
+(500)  PLEASE STASH .4
+       DO .3 <- "?!1$.2'"~"#0$#65535"
+       DO .4 <- .3~.3
+       DO .4 <- '&"!?4'$.4"'~'#0$#65535'
+       DO .3 <- '"'&"!1~.3'$.4"'~'#0$#65535'"~.4'
+               $'"'&"!2~.3'$.4"'~'#0$#65535'"~.4'
+       DO .3 <- "?'"!3~#1'$!3~#2'"$"#1$!3~#1'"'"~#5
+       PLEASE RETRIEVE .4
+       DO RESUME #1
diff --git a/pit/sample.i b/pit/sample.i
new file mode 100644 (file)
index 0000000..d173b72
--- /dev/null
@@ -0,0 +1,28 @@
+       DO (5) NEXT
+    (5) DO FORGET #1
+       PLEASE WRITE IN :1
+       DO .1 <- '?":1~'#32768$#0'"$#1'~#3
+       DO (1) NEXT
+       DO :1 <- "'?":1~'#65535$#0'"$#65535'
+               ~'#0$#65535'"$"'?":1~'#0$#65535'"
+               $#65535'~'#0$#65535'"
+       DO :2 <- #1
+       PLEASE DO (4) NEXT
+    (4) DO FORGET #1
+       DO .1 <- "?':1~:2'$#1"~#3
+       DO :1 <- "'?":1~'#65535$#0'"$":2~'#65535
+               $#0'"'~'#0$#65535'"$"'?":1~'#0
+               $#65535'"$":2~'#0$#65535'"'~'#0$#65535'"
+       DO (1) NEXT
+       DO :2 <- ":2~'#0$#65535'"
+               $"'":2~'#65535$#0'"$#0'~'#32767$#1'"
+       DO (4) NEXT
+    (2) DO RESUME .1
+    (1) PLEASE DO (2) NEXT
+       PLEASE FORGET #1
+       DO READ OUT :1
+       PLEASE DO .1 <- '?"':1~:1'~#1"$#1'~#3
+       DO (3) NEXT
+       PLEASE DO (5) NEXT
+    (3) DO (2) NEXT
+       PLEASE GIVE UP
diff --git a/pit/sort.i b/pit/sort.i
new file mode 100644 (file)
index 0000000..bffd235
--- /dev/null
@@ -0,0 +1,196 @@
+       PLEASE NOTE THAT THIS PROGRAM SORTS AN ENTERED LIST OF NUMBERS
+       NUMBERS ARE ENTERED UNTIL A ZERO IS RECEIVED, THEN THE SORTED
+       LIST IS OUTPUT, USING INSERTION SORT ALGORITHM
+
+       PLEASE NOTE THAT THIS PROGRAM USES COMPUTED ABSTAIN, TRY AGAIN,
+       BUT NO NEXTING, COMING FROM, OR ARRAYS
+
+       PLEASE NOTE .5 .6 .7 .8 ARE ALL TEMPORARIES 
+       PLEASE NOTE .1 AND .4 ARE STASHED TO ACT LIKE ARRAYS
+
+(8)    DO .1 <- #0
+(9)    DO STASH .1
+(10)   DO .2 <- #0
+(13)   DO .4 <- #0
+(14)   DO STASH .4
+       PLEASE NOTE .2 HOLDS CURRENT STATE OF PROGRAM; .2 IS #0 DURING
+       INPUT, #1 WHEN INSERTING A VALUE, #3 WHEN RESETTING THE STASH,
+       #7 WHEN OUTPUTTING THE SORTED VALUES
+       DO REINSTATE (10)
+       DO REINSTATE (13)
+       DO REINSTATE (14)
+       DO REINSTATE (10)
+       DO REINSTATE (13)
+       DO REINSTATE (14)
+       DO ABSTAIN FROM (8)
+       DO ABSTAIN FROM (9)
+       DO ABSTAIN FROM (10)
+       PLEASE DO ABSTAIN FROM (13)
+       DO ABSTAIN FROM (14)
+       PLEASE NOTE THE ABOVE LINES ENSURE 10+13+14 ARE ABSTAINED FROM EXACTLY ONCE
+
+       PLEASE NOTE WRITING IN AN ELEMENT IFF .2 IS #0
+       DO ABSTAIN FROM (15)
+       DO ABSTAIN "!2~.2'~#1"$#1 FROM (15)
+       PLEASE NOTE LINE 15 ABSTAINED FROM 2 OR 4 TIMES
+       DO REINSTATE (15)
+       DO REINSTATE (15)
+(15)   DO WRITE IN .3
+       DO REINSTATE (15)
+       DO REINSTATE (15)
+
+       PLEASE NOTE SETTING LSB OF .2
+       DO .2 <- 'V.2$#1'~"#0$#65535"
+
+       PLEASE NOTE INSERTING .3 INTO OUR STASH IF .2 IS #1
+       DO .8 <- '?.2$#1'~"#0$#65535"
+       DO .8 <- !8~.8'~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"
+        DO ABSTAIN FROM (33)
+       DO ABSTAIN .8$#1 FROM (33)
+       DO REINSTATE (33)
+       DO REINSTATE (33)
+(33)   DO ABSTAIN #1 FROM STASHING + RETRIEVING + CALCULATING + ABSTAINING + READING OUT
+       DO REINSTATE (33)
+       DO REINSTATE (33)
+       DO RETRIEVE .1
+       PLEASE NOTE IF .1 IS LESS THAN OR EQUAL TO .3, WE STASH .3 ON STASH .4 AND SET .2 TO #3
+       PLEASE NOTE IF .1 IS GREATER THAN .3, WE STASH .1 ON STASH .4 AND LEAVE .2 AS IT IS
+       PLEASE NOTE IF .1 IS #0, THIS NEEDS THE SAME ACTIONS AS IF .1 WAS LOWER
+       PLEASE NOTE ADDING .1 TO THE COMPLEMENT OF .3, STORING THE RESULT IN .8, OVERFLOW IN .7
+       DO .8 <- '?.3$#65535'~"#0$#65535"
+       DO .5 <- .1
+       DO .7 <- #0
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+               PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE DO .6<-"&!8$.5'"~'#0$#65535' DO .8<-"?!8$.5'"~'#0$#65535' DO .5<-!6$#0'~"#32767$#1" DO .7<-'V.7$".6~#32768"'~"#0$#65535"
+       PLEASE NOTE THAT IF .1 IS GREATER THAN .3, .7 WILL BE 1; OTHERWISE .7 WILL BE 0
+       PLEASE NOTE .4 MUST BECOME .1 IF .7 IS 1 OR .3 IF .7 IS 0
+       DO .7 <- '.7$.7'$".7$.7"
+       DO .7 <- '.7$.7'$".7$.7"
+       PLEASE NOTE .7 IS NOW 65535 OR 0, SO WE WANT .4 <- (.1 & .7)|(.3 & ~.7)
+       DO .5 <- '&.1$.7'~"#0$#65535"
+       PLEASE DO .6 <- '?.7$#65535'~"#0$#65535"
+       DO .6 <- '&.3$.6'~"#0$#65535"
+       DO .4 <- 'V.5$.6'~"#0$#65535"
+       DO STASH .4
+       PLEASE NOTE SETTING BIT 1 OF .2 IFF .7 IS #0
+       PLEASE DO .7 <- '?.7$#65535'~"#0$#65535"
+       DO .7 <- '&.7$#2'~"#0$#65535"
+       PLEASE DO .2 <- 'V.2$.7'~"#0$#65535"
+       DO ABSTAIN FROM (1)
+(1)     DO REINSTATE STASHING + RETRIEVING + CALCULATING + ABSTAINING + READING OUT
+       DO REINSTATE (1)
+       PLEASE NOTE END OF CODE FOR .2 = #1
+
+       PLEASE NOTE .9 KEEPS TRACK OF WHAT .2 WAS
+       DO .9 <- .2
+       
+               PLEASE NOTE THAT IF .3 IS #0 AND .2 IS #3 THEN .2 SHOULD BECOME #7
+       DO .8 <- '?.2$#3'~"#0$#65535"
+       DO .8 <- 'V.3$.8'~"#0$#65535"
+       DO .8 <- ".8~.8"~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"
+       DO .8 <- .8$!8$.8'
+       DO .2 <- 'V.2$.8'~"#0$#65535"
+
+       PLEASE NOTE THAT IF .9 != .2 WE MUST POP A #0 OFF .4'S STASH
+       DO .8 <- '?.2$.9'~"#0$#65535"
+       DO .8 <- !8~.8'~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"
+       DO ABSTAIN FROM (113)
+       DO ABSTAIN .8$#1 FROM (113)
+       DO REINSTATE (113)
+       DO REINSTATE (113)
+(113)  DO RETRIEVE .4
+       DO REINSTATE (113)
+       DO REINSTATE (113)
+
+       PLEASE NOTE OUTPUTTING SORTED LIST IF .2 IS #7
+       DO ABSTAIN FROM (125)
+       DO .8 <- '?.2$#7'~"#0$#65535"
+       DO .8 <- !8~.8'~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"   
+       DO ABSTAIN FROM (54)
+       DO ABSTAIN .8$#1 FROM (54)
+       DO REINSTATE (54)
+       DO REINSTATE (54)
+(54)   DO ABSTAIN #1 FROM CALCULATING + ABSTAINING + READING OUT + RETRIEVING
+       DO REINSTATE (54)
+       DO REINSTATE (54)
+       DO ABSTAIN FROM (60)
+       DO ABSTAIN FROM (133)
+       DO RETRIEVE .4
+       PLEASE NOTE IF .4 IS #0 THEN END PROGRAM
+       DO .8 <- !4~.4'~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"
+       DO ABSTAIN .8$#1 FROM (125)
+(60)   PLEASE DO REINSTATE CALCULATING + ABSTAINING + RETRIEVING
+       DO REINSTATE (60)
+       DO REINSTATE (125)
+       DO REINSTATE (125)
+(125)  DO ABSTAIN FROM (999)
+       DO REINSTATE (125)
+       DO REINSTATE (125)
+(999)  DO ABSTAIN FROM RETRIEVING + CALCULATING + ABSTAINING + REINSTATING + TRYING AGAIN + READING OUT
+       DO REINSTATE (999)
+       DO READ OUT .4
+(133)  DO REINSTATE READING OUT
+       DO REINSTATE (133)
+               PLEASE NOTE END OF CODE FOR .2 = #7
+       
+       PLEASE NOTE MOVING STASH .4 BACK TO STASH .1 IF .2 IS #3
+       DO .8 <- '?.2$#3'~"#0$#65535"
+       DO .8 <- !8~.8'~#1
+       DO .8 <- '?.8$#1'~"#0$#65535"
+        DO ABSTAIN FROM (34)
+       DO ABSTAIN .8$#1 FROM (34)
+       DO REINSTATE (34)
+       DO REINSTATE (34)
+(34)   DO ABSTAIN #1 FROM STASHING + RETRIEVING + CALCULATING + ABSTAINING
+       DO REINSTATE (34)
+       DO REINSTATE (34)
+       PLEASE DO RETRIEVE .4
+       DO STASH .1
+       DO .1 <- .4
+       PLEASE NOTE THAT IF .1 IS NOW #0, WE NEED TO SET .2 BACK TO #0 AND STASH A #0 BACK IN STASH .4
+       THIS IS ACCOMPLISHED BY ABSTAINING ONCE OR THREE TIMES FROM 10+13+14
+       PLEASE DO .7 <- !1~.1'~#1
+       DO ABSTAIN .7$#1 FROM (10)
+       PLEASE DO ABSTAIN .7$#1 FROM (13)
+       DO ABSTAIN .7$#1 FROM (14)      
+       DO ABSTAIN FROM (104)
+       PLEASE DO ABSTAIN FROM (110)
+       PLEASE DO ABSTAIN FROM (111)
+       DO ABSTAIN FROM (112)
+(104)  DO REINSTATE STASHING + RETRIEVING + CALCULATING + ABSTAINING
+       DO REINSTATE (104)
+       PLEASE NOTE ABSTAINING #3 FROM 10+13+14 IF .2 != #3
+(110)  DO ABSTAIN #3 FROM (10)
+(111)  DO ABSTAIN #3 FROM (13)
+(112)  PLEASE DO ABSTAIN #3 FROM (14)
+       DO REINSTATE (110)
+       DO REINSTATE (111)
+       DO REINSTATE (112)
+       PLEASE DO REINSTATE (10)
+       PLEASE DO REINSTATE (13)
+       DO REINSTATE (14)
+       DO REINSTATE (10)
+       DO REINSTATE (13)
+       DO REINSTATE (14)
+       PLEASE NOTE END OF CODE FOR .2 = #3
+
+       PLEASE TRY AGAIN
diff --git a/pit/syslib.i b/pit/syslib.i
new file mode 100644 (file)
index 0000000..ace68f7
--- /dev/null
@@ -0,0 +1,289 @@
+               PLEASE KNOCK BEFORE ENTERING
+
+       (1000)  PLEASE IGNORE .4
+               PLEASE ABSTAIN FROM (1005)
+       (1009)  DO STASH .1 + .2 + .5 + .6
+               DO .4 <- #1
+               DO (1004) NEXT
+       (1004)  PLEASE FORGET #1
+               DO .3 <- '?.1$.2'~'#0$#65535'
+               DO .6 <- '&.1$.2'~'#0$#65535'
+               PLEASE DO .5 <- "?!6~#32768'$#1"~#3
+               DO (1002) NEXT
+               DO .4 <- #2
+       (1005)  DO (1006) NEXT
+       (1999)  DOUBLE OR SINGLE PRECISION OVERFLOW
+       (1002)  DO (1001) NEXT
+       (1006)  PLEASE FORGET #1
+               DO .5 <- '?"!6~.6'~#1"$#1'~#3
+               DO (1003) NEXT
+               DO .1 <- .3
+               DO .2 <- !6$#0'~'#32767$#1'
+               DO (1004) NEXT
+       (1003)  DO (1001) NEXT
+               DO REINSTATE (1005)
+       (1007)  PLEASE RETRIEVE .1 + .2 + .5 + .6
+               DO REMEMBER .4
+               PLEASE RESUME #2
+       (1001)  DO RESUME .5
+       (1010)  DO STASH .1 + .2 + .4
+               DO .4 <- .1
+               DO .1 <- '?.2$#65535'~'#0$#65535'
+               DO (1020) NEXT
+               PLEASE DO .2 <- .4
+               PLEASE DO (1009) NEXT
+               DO RETRIEVE .1 + .2 + .4
+               PLEASE RESUME #1
+       (1020)  DO STASH .2 + .3
+               DO .2 <- #1
+               PLEASE DO (1021) NEXT
+       (1021)  DO FORGET #1
+               DO .3 <- "?!1~.2'$#1"~#3
+               PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+               DO (1022) NEXT
+               DO .2 <- !2$#0'~'#32767$#1'
+               DO (1021) NEXT
+       (1023)  PLEASE RESUME .3
+       (1022)  DO (1023) NEXT
+               PLEASE RETRIEVE .2 + .3
+               PLEASE RESUME #2
+       (1030)  DO ABSTAIN FROM (1033)
+               PLEASE ABSTAIN FROM (1032)
+       (1039)  DO STASH :1 + .5
+               DO (1530) NEXT
+               DO .3 <- :1~#65535
+               PLEASE DO .5 <- :1~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1031) NEXT
+       (1032)  DO (1033) NEXT
+               DO (1999) NEXT
+       (1031)  DO (1001) NEXT
+       (1033)  DO .4 <- .5
+               DO REINSTATE (1032)
+               PLEASE REINSTATE (1033)
+               DO RETRIEVE :1 + .5
+               PLEASE RESUME #2
+       (1040)  PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3
+               DO .2 <- #0
+               DO (1520) NEXT
+               DO STASH :1
+               PLEASE RETRIEVE .2
+               DO .1 <- .2
+               DO .2 <- #0
+               PLEASE DO (1520) NEXT
+               DO :2 <- :1
+               DO RETRIEVE .1 + .2 + :1
+               DO (1550) NEXT
+               PLEASE DO .3 <- :3
+               DO RETRIEVE :1 + :2 + :3
+               DO RESUME #1
+       (1050)  PLEASE STASH :2 + :3 + .5
+               DO :2 <- .1
+               PLEASE DO (1550) NEXT
+               DO .5 <- :3~'#65280$#65280'
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               DO (1051) NEXT
+               DO (1999) NEXT
+       (1051)  DO (1001) NEXT
+               DO .2 <- :3
+               PLEASE RETRIEVE :2 + :3 + .5
+               DO RESUME #2
+       (1500)  PLEASE ABSTAIN FROM (1502)
+               PLEASE ABSTAIN FROM (1506)
+       (1509)  PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~#65535
+               DO (1009) NEXT
+               DO .5 <- .3
+               PLEASE DO .6 <- .4
+               DO .1 <- :1~'#65280$#65280'
+               DO .2 <- :2~'#65280$#65280'
+               DO (1009) NEXT
+               DO .1 <- .3
+               PLEASE DO (1503) NEXT
+               DO .6 <- .4
+               DO .2 <- #1
+               DO (1009) NEXT
+               DO .1 <- .3
+               DO (1501) NEXT
+       (1504)  PLEASE RESUME .6
+       (1503)  DO (1504) NEXT
+       (1501)  DO .2 <- .5
+               DO .5 <- '?"'&.6$.4'~#1"$#2'~#3
+               DO (1505) NEXT
+       (1506)  DO (1502) NEXT
+               PLEASE DO (1999) NEXT
+       (1505)  DO (1001) NEXT
+       (1502)  DO :4 <- .5
+               DO (1520) NEXT
+               DO :3 <- :1
+               PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6
+               DO REINSTATE (1502)
+               DO REINSTATE (1506)
+               PLEASE RESUME #3
+       (1510)  DO STASH :1 + :2 + :4
+               DO :1 <- "'?":2~'#65535$#0'"$#65535'~'#0$#65535'"$
+                    "'?":2~'#0$#65535'"$#65535'~'#0$#65535'"
+               DO :2 <- #1
+               DO (1509) NEXT
+               PLEASE RETRIEVE :1
+               DO :2 <- :3
+               PLEASE DO (1509) NEXT
+               DO RETRIEVE :2 + :4
+               PLEASE RESUME #1
+       (1520)  PLEASE STASH .3 + .4
+               DO .3 <- .1~#43690
+               DO (1525) NEXT
+               PLEASE DO .4 <- 'V.3$".2~#43690"'~'#0$#65535'
+               DO .3 <- .1~#21845
+               PLEASE DO (1525) NEXT
+               DO :1 <- .4$"'V.3$".2~#21845"'~'#0$#65535'"
+               PLEASE RETRIEVE .3 + .4
+               DO RESUME #1
+       (1525)  DO .3 <- '"'"'"!3$#0'~'#32767$#1'"$#0'~'#32767$
+                    #1'"$#0'~'#16383$#3'"$#0'~'#4095$#15'
+               PLEASE RESUME #1
+       (1530)  DO STASH :2 + :3 + .3 + .5
+               DO :1 <- #0
+               DO :2 <- .2
+               DO .3 <- #1
+               DO (1535) NEXT
+       (1535)  PLEASE FORGET #1
+               DO .5 <- "?!1~.3'$#1"~#3
+               DO (1531) NEXT
+               DO (1500) NEXT
+               DO :1 <- :3
+               PLEASE DO (1533) NEXT
+       (1531)  PLEASE DO (1001) NEXT
+       (1533)  DO FORGET #1
+               DO .3 <- !3$#0'~'#32767$#1'
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$
+                    #0'~'#32767$#1'"
+               PLEASE DO .5 <- "?!3~.3'$#1"~#3
+               DO (1532) NEXT
+               DO (1535) NEXT
+       (1532)  DO (1001) NEXT
+               PLEASE RETRIEVE :2 + :3 + .3 + .5
+               DO RESUME #2
+       (1540)  PLEASE ABSTAIN FROM (1541)
+               DO ABSTAIN FROM (1542)
+       (1549)  PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5
+               DO .1 <- :1~#65535
+               PLEASE DO .2 <- :2~'#65280$#65280'
+               DO .5 <- :1~'#65280$#65280'
+               DO (1530) NEXT
+               DO :3 <- :1
+               DO .2 <- :2~#65535
+               PLEASE DO (1530) NEXT
+               DO :5 <- :1
+               DO .1 <- .5
+               DO (1530) NEXT
+               DO :4 <- :1
+               PLEASE DO :1 <- ":3~'#65280$#65280'"$":4~'#65280$
+                    #65280'"
+               DO .5 <- ':1~:1'~#1
+               DO .2 <- :2~'#65280$#65280'
+               DO (1530) NEXT
+               PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3
+               DO .1 <- :3~#65535
+               DO .2 <- #0
+               DO (1520) NEXT
+               PLEASE DO :2 <- :1
+               PLEASE DO .1 <- :4~#65535
+               DO (1520) NEXT
+               DO (1509) NEXT
+               DO .5 <- !5$":4~#3"'~#15
+               DO :1 <- :3
+               DO :2 <- :5
+               DO (1509) NEXT
+               PLEASE DO .5 <- !5$":4~#3"'~#172
+               DO .5 <- '?"!5~.5'~#1"$#1'~#3
+               PLEASE RETRIEVE :4
+       (1541)  DO :4 <- .5
+               DO (1543) NEXT
+       (1542)  DO (1544) NEXT
+               PLEASE DO (1999) NEXT
+       (1543)  DO (1001) NEXT
+       (1544)  DO REINSTATE (1541)
+               PLEASE REINSTATE (1542)
+               PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5
+               DO RESUME #2
+       (1550)  DO STASH :1 + :4 + :5 + .5
+               DO :3 <- #0
+               DO .5 <- '?"':2~:2'~#1"$#1'~#3
+               PLEASE DO (1551) NEXT
+               DO :4 <- #1
+               PLEASE DO (1553) NEXT
+       (1553)  DO FORGET #1
+               DO .5 <- '?":2~'#32768$#0'"$#2'~#3
+               DO (1552) NEXT
+               DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+                    0'~'#32767$#1'"
+               PLEASE DO :4 <- ":4~'#0$#65535'"$"'":4~'#32767
+                    $#0'"$#0'~'#32767$#1'"
+               DO (1553) NEXT
+       (1552)  DO (1001) NEXT
+       (1556)  PLEASE FORGET #1
+               DO :5 <- "'?":1~'#65535$#0'"$":2~'#65535$#0'"'
+                    ~'#0$#65535'"$"'?":1~'#0$#65535'"$":2~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO .5 <- '?"'&"':2~:5'~'"'?"'?":5~:5"~"#65535$
+                    #65535"'~'#65535$#0'"$#32768'~'#0$#65535'"
+                    $"'?":5~:5"~"#65535$#65535"'~'#0$#65535'"'
+                    "$"':5~:5'~#1"'~#1"$#2'~#3
+               DO (1554) NEXT
+               DO :5 <- :3
+               DO (1510) NEXT
+               PLEASE DO :1 <- :3
+               DO :3 <- "'V":4~'#65535$#0'"$":5~'#65535$#0'"'
+                    ~'#0$#65535'"$"'V":4~'#0$#65535'"$":5~'#0$
+                    #65535'"'~'#0$#65535'"
+               DO (1555) NEXT
+       (1554)  PLEASE DO (1001) NEXT
+       (1555)  DO FORGET #1
+               DO .5 <- "?':4~#1'$#2"~#3
+               DO (1551) NEXT
+               DO :2 <- ":2~'#0$#65534'"$":2~'#65535$#0'"
+               DO :4 <- ":4~'#0$#65534'"$":4~'#65535$#0'"
+               PLEASE DO (1556) NEXT
+       (1551)  DO (1001) NEXT
+               PLEASE RETRIEVE :1 + :4 + :5 + .5
+               PLEASE RESUME #2
+       (1900)  DO STASH .2 + .3 + .5
+               DO .1 <- #0
+               DO .2 <- #1
+               PLEASE DO (1901) NEXT
+       (1901)  DO FORGET #1
+               DO %50 .1 <- 'V.1$.2'~'#0$#65535'
+               DO .2 <- !2$#0'~'#32767$#1'
+               PLEASE DO .5 <- "?!2~.2'$#1"~#3
+               DO (1902) NEXT
+               DO (1901) NEXT
+       (1902)  DO (1001) NEXT
+               DO RETRIEVE .2 + .3 + .5
+               PLEASE RESUME #2
+       (1910)  PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3
+               DO .3 <- #65524
+               DO :1 <- #6
+               DO (1911) NEXT
+               PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE
+       (1912)  DO (1001) NEXT
+       (1911)  DO FORGET #1
+               PLEASE DO (1900) NEXT
+               DO :2 <- .1
+               DO (1500) NEXT
+               PLEASE DO :1 <- :3
+               DO .1 <- .3
+               DO (1020) NEXT
+               PLEASE DO .3 <- .1
+               DO .5 <- '?"!3~.3'~#1"$#2'~#3
+               DO (1912) NEXT
+               DO .1 <- #12
+               PLEASE DO (1050) NEXT
+               DO RETRIEVE .1
+               DO (1530) NEXT
+               DO :2 <- #32768
+               DO (1500) NEXT
+               PLEASE DO .2 <- :3~'#65280$#65280'
+               PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3
+               DO RESUME #1
diff --git a/pit/t_tet b/pit/t_tet
new file mode 100644 (file)
index 0000000..25339f4
--- /dev/null
+++ b/pit/t_tet
@@ -0,0 +1,12 @@
+ONE ONE\r
+ONE ONE\r
+ONE OH\r
+FIVE\r
+SIX\r
+SIX\r
+SIX\r
+SEVEN\r
+SIX\r
+SIX\r
+SEVEN\r
+OH\r
diff --git a/pit/tests/ais1.i b/pit/tests/ais1.i
new file mode 100644 (file)
index 0000000..903f81c
--- /dev/null
@@ -0,0 +1,9 @@
+               DO COME FROM (4)
+       DO WRITE IN .1
+       DO READ OUT .1
+(4)            DO (5) NEXT
+(5)            DO (7) NEXT
+       PLEASE GIVE UP  
+(7)     PLEASE .2 <- "?'"!1~.1'~#1"$#1'"~#3
+       DON'T READ OUT .2
+       PLEASE RESUME .2
diff --git a/pit/tests/ais2.i b/pit/tests/ais2.i
new file mode 100644 (file)
index 0000000..4647e3e
--- /dev/null
@@ -0,0 +1,56 @@
+        PLEASE NOTE THIS PROGRAM USES NO NEXTING + FORGETTING + RESUMING
+
+(5)    DO .1 <- #0
+(6)    DO .2 <- #1
+(7)    DO .9 <- #1     
+       DON'T .1 <- .2
+       DON'T .2 <- .3
+       DON'T READ OUT .1
+       DON'T WRITE IN .9
+        PLEASE NOTE THAT WE EXIT IF WE READ ZERO
+       DO REINSTATE (15)
+       DO REINSTATE (14)
+(14)   DO ABSTAIN FROM (16)
+(15)   DO ABSTAIN '"'.9~.9'~#1"$#1'~#3 FROM (16)
+       PLEASE NOTE THAT LINE 16 IS NOW ABSTAINED FROM TWICE OR FOUR TIMES
+       DO REINSTATE (16)
+       DO REINSTATE (16)
+(16)   DON'T ABSTAIN FROM CALCULATING + REINSTATING + ABSTAINING + TRYING AGAIN
+       DO REINSTATE (16)
+       DO REINSTATE (16)
+       
+(10)           PLEASE DO REINSTATE CALCULATING + READING OUT + WRITING IN
+       DO ABSTAIN FROM (5)
+       DO ABSTAIN FROM (6)
+       DO ABSTAIN FROM (7)
+       DO ABSTAIN FROM (10)
+       DO ABSTAIN FROM ABSTAINING
+       
+               DO .3 <- .1
+       DO .4 <- .2
+       
+       PLEASE NOTE THAT WE ARE PERFORMING .3 <- .3 (arithmetic +) .4
+       NOTE ALSO THAT THIS CAN BE SUPRESSED BY IGNORING .3
+        AND ALSO THAT .5, .6 ARE USED AS TEMPORARIES
+       AND THAT THIS DISCARDS THE HIGH BIT ON OVERFLOW
+       DON'T FORGET THAT THIS CONTAINS 16 REPETITIONS OF THE SAME LINE
+       DO .5 <- .4
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       PLEASE DO .6 <- "&!3$.5'"~'#0$#65535' DO .3 <- "?!3$.5'"~'#0$#65535' DO .5 <- !6$#0'~"#32767$#1"
+       
+       PLEASE TRY AGAIN
+       
diff --git a/pit/tests/arrtest.doc b/pit/tests/arrtest.doc
new file mode 100644 (file)
index 0000000..7c539a1
--- /dev/null
@@ -0,0 +1,104 @@
+arrtest.i is a program I wrote to test my correction to a nasty
+ambiguity in grammar that was rendering many programs incompilable.
+
+The problem is:
+
+sublist1 : unambig _
+sublist : unambig _ sublist
+sublist : unambig _ sublist1
+
+Token received: SPARK or EARS.
+
+Shift/reduce conflict.
+
+This is an example from numio.i:
+
+DO .5 <- '?"'#65535~"'?.7$",2SUB.1"'~#21845"'~#1"$#1'~#3
+                                  ^
+                              ambiguity
+
+The problem is that it's unclear whether the spark/ears is the end of
+an expression around the array reference (reduce), or whether it's the
+start of a new subscript (shift).
+
+In this case, the reduction is wanted. With the shift taking priority,
+there seems to be no way to write this statement without splitting
+it. The grammar as of INTERCAL 0.24 uses the shift by default. This is
+because multidimensional arrays may do this sort of thing:
+
+DO .1 <- ',2SUB.1".2~.3"'~#1
+
+where the shift is needed to parse the ".2~.3" construct. In the first
+case, there is no information within the next two characters that
+indicates that it was the shift that was wanted; in the second case,
+the fact that it's an ears, not a spark, indicates to humans that the
+reduce is needed, but yacc/bison cannot determine this as they don't
+have information about whether the current spark/ears level was
+introduced with sparks or ears. 
+
+At first I thought that scanning past all spark/ears to find the first
+non-sparkears character could solve the problem, even if it could not
+be coded in yacc, but the following code shows the problem:
+
+DO .1 <- ,3SUB",2SUB.1".2 (reduce required)
+
+(It could be the start of this statement:
+
+DO .1 <- ,3SUB",2SUB.1".2~.3"".4 (shift required))
+
+The two statements above are the same for several tokens after the
+ambiguity, and are even the same for 2 tokens after the forward
+scan. This sort of problem is probably why the original manual
+suggested alternating sparks and ears in various levels of expression
+grouping. The only solution I can think of is:
+
+Determine somehow whether we are on a spark level or an ears level
+
+Force alternation of sparks and ears (constraint on the programmer)
+at different levels of expression grouping when dealing with
+near-ambiguous expressions involving spark/ears and arrays, like the
+ones above (so the fourth statement above would be illegal)
+
+Look at whether we see a spark or an ears to determine whether to
+shift or reduce
+
+In other words, reduce whenever it would be a legal way to close the
+current spark/ears level, otherwise shift.
+
+So how to determine whether we're on a spark level or an ears level?
+The solution is for the lexer to place all the sparks and ears it
+encounters on a spark/ears stack, and for the parser to pop two
+sparkears off the stack whenever it reduces a SPARK [unary] <expr>
+SPARK or EARS [unary] <expr> EARS.
+
+Once the determination is in place, all that is required is a way of
+determining whether to shift or reduce based on a variable in the
+program, rather than just a priority (which wouldn't work). This
+doesn't seem to fit into yacc's syntax, so it's possible that after
+all, yacc can't work with the INTERCAL syntax. But there is a solution
+(one that I used to determine COMPUCOME from COME_FROM): syntax
+analysis in the lexer! The idea is that legal closing spark/ears have
+different tokens from illegal closing spark/ears, so that the reduce
+is impossible in situations where it would be illegal (the production
+looks something like eitherspark <expr> CLOSESPARK), and the default
+in all other situations (sort of like 'auto' in C, which noone ever
+uses, because it's the default everywhere it isn't illegal).
+
+The solution I've used places a limit on the maximum nesting depth of
+an expression. Strangely, it also limits the number of sparks and ears
+that can be written into a 'comment' to 256. As care has to be taken
+anyway that malformed abstained statements don't look sufficiently
+like real statements to cause errors, this should be a trivial extra
+addition.
+
+(Incidentally, I strongly suspect this sort of fix was used in the
+original INTERCAL-72 compiler, because there is a very similar
+restriction documented in the manual. Besides, it's needed to make
+INTERCAL into an LALR(1) language.)
+
+The program arrtest.i will not actually run, but it will compile as
+far as degenerating C code. I don't believe every line would have come
+out as a valid statement in any version of INTERCAL 0.24 or earlier
+(except the one labeled as invalid, which would have come out as valid
+but is really bad style anyway).
+
diff --git a/pit/tests/arrtest.i b/pit/tests/arrtest.i
new file mode 100644 (file)
index 0000000..a15e828
--- /dev/null
@@ -0,0 +1,7 @@
+PLEASE NOTE THIS PROGRAM TESTS SOME GRAMMAR NEAR-AMBIGUITIES
+DO .5 <- '?"'#65535~"'?.7$",2SUB.1"'~#21845"'~#1"$#1'~#3
+DO .1 <- ',2SUB.1".2~.3"'~#1
+DO .1 <- ,3SUB",2SUB.1'.2~.3'".4
+PLEASE NOTE THE NEXT LINE IS TOO UNCLEAR TO PARSE
+DOXXX .1 <- ,3SUB",2SUB.1".2~.3"".4
+THE PREVIOUS LINE CAUSES ERROR ICL017I
diff --git a/pit/tests/compucome.i b/pit/tests/compucome.i
new file mode 100644 (file)
index 0000000..efd1771
--- /dev/null
@@ -0,0 +1,16 @@
+       PLEASE NOTE THIS PROGRAM TESTS COMPUTED COME FROM
+       DO .2 <- #2
+(1)            DO .1 <- #1
+(3)    DO READ OUT #5
+       DO COME FROM .1
+(256)  DO READ OUT #2
+       DO .2 <- '.2$#0'~#43691
+(5)    DO READ OUT #3
+       DO READ OUT #4
+       DO .1 <- #5
+       PLEASE DO (3) NEXT
+       PLEASE COME FROM .2
+       DO WRITE IN .1
+       DO WRITE IN .2
+(999)  DO NOTHING
+       PLEASE GIVE UP
diff --git a/pit/tests/count.3i b/pit/tests/count.3i
new file mode 100644 (file)
index 0000000..2d2225e
--- /dev/null
@@ -0,0 +1,43 @@
+       DO ,1 <- #16\r
+       DO :2 <- #6490$#55022\r
+       PLEASE DO (44) NEXT\r
+       DO :2 <- #5631$#54733\r
+       PLEASE DO (44) NEXT\r
+       DO :2 <- #14637$#40039\r
+       PLEASE DO (44) NEXT\r
+       DO :2 <- #58550$#53112\r
+       PLEASE DO (44) NEXT\r
+       DO .1 <- #1\r
+       PLEASE DO (99) NEXT\r
+       DO GIVE UP\r
+(44)   DO REINSTATE COMING FROM\r
+(19)   DO COME FROM (68)\r
+       DO ABSTAIN FROM (19)\r
+(31)   DO COME FROM (34)\r
+       DO ABSTAIN FROM (31)\r
+(88)   DO COME FROM (65)\r
+       PLEASE ABSTAIN FROM (88)\r
+       DO COME FROM (44)\r
+       PLEASE DO (123) NEXT\r
+       DO .3 <- ':2~"#4$#13"'\r
+       DO :2 <- ':2~"#29520$#29511"'\r
+       DO ,1 SUB .1 <- .3\r
+(65)   DON'T GIVE UP\r
+(34)   PLEASE DON'T GIVE UP\r
+(68)   DO NOTE THAT THIS FUNNY CODE ACTUALLY WORKS\r
+       PLEASE RESUME #1\r
+(99)   DO COME FROM (69)\r
+       DO READ OUT ,1\r
+       DO ,1 SUB #1 <- #180\r
+       DO READ OUT .1\r
+       DO .2 <- "?.1$#10"~"#0$#29524"\r
+       PLEASE DO (15) NEXT\r
+(69)   PLEASE DO (123) NEXT\r
+(42)   DO RESUME .9\r
+(123)  PLEASE .8 <- #1\r
+       DO COME FROM (81)\r
+       DO .9 <- '?"V!1~.8'$#1"~#1'~#1\r
+       DO .1 <- "^.1$.8"~"#0$#29524"\r
+       PLEASE DO (42) NEXT\r
+(81)   DO .8 <- !8$#0'~"#9841$#1"\r
+(15)   PLEASE RESUME '?"!2~.2'~#2"$#1'~#1\r
diff --git a/pit/tests/count.doc b/pit/tests/count.doc
new file mode 100644 (file)
index 0000000..bfa98cc
--- /dev/null
@@ -0,0 +1,71 @@
+
+From: johnpc@xs4all.nl (Jan-Pieter Cornet)
+Newsgroups: comp.lang.misc,comp.lang.perl.misc,comp.lang.tcl,comp.lang.c,comp.lang.java,alt.lang.intercal,alt.test
+Subject: Re: Readable Perl (was: Re: Relative Speed of Perl vs. Tcl vs. C)
+Date: 27 Feb 1996 02:44:19 GMT
+Organization: XS4ALL Internet
+Message-ID: <4gtr64$s7h@news.xs4all.nl>
+Summary: hit "n" now! quick!
+
+In article <4ge7bk$4vq@news.ox.ac.uk>,
+David Hopwood <lady0065@sable.ox.ac.uk> wrote:
+>In article <4gb3kp$lu7@gaia.ns.utk.edu>,
+>Matthew B. Kennel <kennel@msr.epm.ornl.gov> wrote:
+>>Randal L. Schwartz (merlyn@stonehenge.com) wrote:
+>>: >>>>> "John" == John Viega <jtv2j@mamba.cs.virginia.edu> writes:
+>>
+>>: John> People bitch about the readability of Perl non-stop.  In fact, I have
+>>: John> heard the joke, "Perl, the only language you can uuencode, and not
+>>: John> notice" twice this week around the department.
+>>
+>>: OK, now which do you find most readable...
+>
+>This (Haskell):
+>
+>cancount n = "I can count to "++(show n)++"\n"
+>concat (map cancount [1..10])
+
+No, you got it all totally wrong. I think this is the best readable
+(in Tri-INTERCAL):
+
+[Program moved to .3i file.]
+
+Now, I think the advantages of this are pretty clear. First, this is
+clearly a write-only language. There are only few people insane enough
+to actually understand the above drivel, and they wouldn't bother
+touching your petty code, as they are too busy filling bathtubs with
+brightly colored machine tools.
+
+Anyone else will simply be too scared to touch this code. So you can be
+pretty sure nobody changes it behind your back.
+
+In fact, you can be pretty sure you won't change it either after you
+wrote it, because you will probably have forgotten how the program
+works 5 minutes after you wrote it. So any luser nagging for extra
+features afterwards, is SOL.
+
+The other major advantage is... the above code took me about 3 hours
+to write. Compare this to the 10 to 30 seconds it takes to write a
+similar program in perl, BASIC, Haskell or what have you. But... that
+means that when you programmed it in that other language, you'd have to
+spend 2 hours 59 minutes and somewhere between 30 and 50 seconds
+answering the phone talking to clueless lusers, changing backup tapes,
+or doing other boring stuff. While you could have been programming
+Intercal instead! Just think about that!
+
+And last, but certainly not least, is: the above code is likely to
+impress your boss. Bosses are wont to be impressed by incomprehensible
+things. They won't be impressed by a three line perl program that anyone
+not wearing a diaper can understand.
+
+So that pretty much proves it.
+
+PS: this article contains some strange usage of the words "best readable"
+that you probably weren't previously aware of :)
+
+-- 
+Jan-Pieter Cornet                                      <johnpc@xs4all.net>
+Actual quote: "Linux was made by foreign terrorists to steal money from true
+               AMERICAN companies like Microsoft who invented computing as we
+              know it, and are being punished for their success..."
+Linux -- "It's computing, Jim, but not as we know it"
diff --git a/pit/tests/hello.i b/pit/tests/hello.i
new file mode 100644 (file)
index 0000000..e40efa7
--- /dev/null
@@ -0,0 +1,16 @@
+        DO ,1 <- #13
+        PLEASE DO ,1SUB#1 <- #234
+        DO ,1SUB#2 <- #112
+        DO ,1SUB#3 <- #112
+        DO ,1SUB#4 <- #0
+        DO ,1SUB#5 <- #64
+        DO ,1SUB#6 <- #194
+        DO ,1SUB#7 <- #48
+        PLEASE DO ,1SUB#8 <- #22
+        DO ,1SUB#9 <- #248
+        DO ,1SUB#10 <- #168
+        DO ,1SUB#11 <- #24
+        DO ,1SUB#12 <- #16
+        DO ,1SUB#13 <- #214
+        PLEASE READ OUT ,1
+        PLEASE GIVE UP
diff --git a/pit/tests/ignorret.doc b/pit/tests/ignorret.doc
new file mode 100644 (file)
index 0000000..b959f40
--- /dev/null
@@ -0,0 +1,44 @@
+One aspect of INTERCAL-72 that was never fully documented was the way
+in which IGNORE and RETRIEVE statements interacted. It turns out that
+the three modern INTERCAL compilers all use slightly different
+definitions.
+
+The associated program ignorret.i stores 1 in a variable's stash, 2 in
+the variable itself, ignores the variable, and retrieves it; it then
+prints out the variable, and tests to see whether the variable is
+ignored.
+
+C-INTERCAL prints:
+
+II
+
+II
+In other words, the interpretation used is that the variable is
+read-only, so a RETRIEVE can't change its value (but instead just
+discards the stash item). The variable remains IGNOREd.
+
+J-INTERCAL prints:
+
+I
+
+I
+J-INTERCAL doesn't take the interaction between IGNORE and RETRIEVE
+into account at all; the RETRIEVE just does what a RETRIEVE would
+normally do, which is to set the variable from its own stack. The
+variable remains IGNOREd.
+
+CLC-INTERCAL prints:
+I
+III
+The interpretation used by CLC-INTERCAL is somewhat different. The
+ignorance status is stashed along with the variable itself; so the
+value of 1 is read from the variable's stash, but doing so also
+removes the read-only status of the variable. This means that the
+third assignment to the variable works, unlike in the other two
+cases. (Note that CLC-INTERCAL will act like C-INTERCAL on the
+ignorret test when running in C-INTERCAL compatibility mode.)
+
+The upshot of all this is: don't RETRIEVE a read-only variable if you
+want your program to be portable!
+
+Alex Smith
diff --git a/pit/tests/ignorret.i b/pit/tests/ignorret.i
new file mode 100644 (file)
index 0000000..b42bde3
--- /dev/null
@@ -0,0 +1,9 @@
+       DO .1 <- #1
+       DO STASH .1
+       DO .1 <- #2
+       DO IGNORE .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       DO .1 <- #3
+       DO READ OUT .1
+       PLEASE GIVE UP
diff --git a/pit/tests/iogerunds.doc b/pit/tests/iogerunds.doc
new file mode 100644 (file)
index 0000000..dc65d88
--- /dev/null
@@ -0,0 +1,10 @@
+Jan-Pieter Cornet <cornet@OTech.fgg.EUR.nl> writes:
+
+You might want to try the following program (I've just been hacking this up,
+and it costed me considerable more time than adding the gerund I/O things.
+But that's the power of intercal...) This program will ask for a number
+and might print it then, except that it doesn't ask the first time but
+                                              _ 
+assumes ONE TWO THREE. Oh and it never prints    but just exits in case that
+would've been printed (I did my best to make that part as unreadable as
+possible. did it work? :)
diff --git a/pit/tests/iogerunds.i b/pit/tests/iogerunds.i
new file mode 100644 (file)
index 0000000..f18128b
--- /dev/null
@@ -0,0 +1,20 @@
+        DO .1 <- #123
+        DO ABSTAIN FROM WRITING IN
+        DO COME FROM (123)
+(100)   DO WRITE IN .1
+        PLEASE .2 <- #1
+        DO %50 .2 <- !2$#0'
+        PLEASE DO (42) NEXT
+        DO ABSTAIN FROM READING OUT
+        PLEASE COME FROM (69)
+        DO READ OUT .1
+        DO REINSTATE READING OUT
+(123)   PLEASE REINSTATE (100)
+(42)    DO (43) NEXT
+        DO FORGET #1
+        DO (105) NEXT
+        PLEASE GIVE UP
+(105)   DO (106) NEXT
+(69)    DON'T GIVE UP
+(106)   PLEASE DO RESUME "'?"!1~.1'~#1"$#1'~#1"$'".1~.1"~#1'
+(43)    DO RESUME .2
diff --git a/pit/tests/knuth.i b/pit/tests/knuth.i
new file mode 100644 (file)
index 0000000..738e3d0
--- /dev/null
@@ -0,0 +1,20 @@
+        PLEASE ABSTAIN FROM (1)
+(1)     DON KNUTH'S IMPLEMENTATION OF TPK IN INTERCAL
+                      (C) MARCH 2003
+        REFERENCE --- THE EARLY HISTORY OF PROGRAMMING
+        LANGUAGES, BY D E KNUTH AND L TRABB PARDO
+
+        NOTA BENE: THE INPUT AND OUTPUT DATA ARE SCALED
+        DECIMAL NUMBERS WITH SIX DIGITS TO THE RIGHT OF
+        THE DECIMAL POINT; THUS AN INPUT OF
+           THREE ONE FOUR ONE FIVE NINE THREE
+        DENOTES 3.141593, AND THAT VALUE WOULD BE OUTPUT AS
+           ______
+           MMMCXLMDXCIII
+
+        VARIABLE NAMES AND SUBROUTINE NAMES USE THE CLASSIC
+        5-BIT TELEPRINTER CODE IN LETTER-SHIFT MODE, NAMELY
+  / E @ A : S I U 1/4 D R J N F C K T Z L W H Y P Q O B G " M X V $
+        (WHICH ALAN TURING ADVISED EVERY PROGRAMMER TO LEARN)
+
+        DO GIVE UP
diff --git a/pit/tests/limits.3i b/pit/tests/limits.3i
new file mode 100644 (file)
index 0000000..6293447
--- /dev/null
@@ -0,0 +1,5 @@
+       DO .1 <- #59048\r
+       DO :1 <- #59048\r
+       DO WRITE IN .1 + :1\r
+        DO READ OUT .1 + :1\r
+        PLEASE GIVE UP\r
diff --git a/pit/tests/limits.i b/pit/tests/limits.i
new file mode 100644 (file)
index 0000000..e798dc9
--- /dev/null
@@ -0,0 +1,5 @@
+       DO .1 <- #65535
+       DO :1 <- #65535
+       DO WRITE IN .1 + :1
+        DO READ OUT .1 + :1
+        PLEASE GIVE UP
diff --git a/pit/tests/normaldist.i b/pit/tests/normaldist.i
new file mode 100644 (file)
index 0000000..b1dbb4a
--- /dev/null
@@ -0,0 +1,28 @@
+       PLEASE NOTE that this program checks the routine 1910 and calculates
+       its standard deviation; the output values should quickly converge to
+       around #10000 if that routine correctly follows the manual.
+       DO :3 <- #0
+       PLEASE DO .6 <- #0
+       DO COME FROM (20)
+       DO .1 <- #1200
+       DO (1910) NEXT
+       DO .1 <- #600
+(5)     DO (1010) NEXT
+       DO .1 <- .2
+       DO .2 <- #600
+       DO (1010) NEXT
+       DO COME FROM '.3~#2048'$#3
+       DO .1 <- .3
+       PLEASE DO .2 <- .3
+       DO (1530) NEXT
+       DO :2 <- :3
+       DO (1500) NEXT
+       DO .1 <- .6
+       PLEASE DO (1020) NEXT
+       DO .6 <- .1
+       DO :1 <- :3
+       DO :2 <- .1
+       PLEASE DO (1550) NEXT
+       DO READ OUT :3
+       DO :3 <- :1
+(20)   PLEASE DO NOTHING
diff --git a/pit/tests/onceagain.i b/pit/tests/onceagain.i
new file mode 100644 (file)
index 0000000..b2225fc
--- /dev/null
@@ -0,0 +1,21 @@
+(1)    DO NOTHING
+       PLEASE COME FROM (13) ONCE
+       PLEASE COME FROM #11 ONCE
+       DO COME FROM (1)
+       DO READ OUT #1 ONCE
+(6)    DO READ OUT #2 AGAIN
+       DO READ OUT #3
+       DO ABSTAIN FROM (6) ONCE
+       DON'T READ OUT #4 ONCE
+(10)   DON'T READ OUT #5 AGAIN
+(11)           DO REINSTATE (10) ONCE
+       DO READ OUT #6
+(13)   DON'T READ OUT #7
+       DO REINSTATE (17)
+(15)           DO (19) NEXT ONCE
+(16)           PLEASE READ OUT #8
+(17)   DON'T (15) NEXT AGAIN
+       PLEASE GIVE UP
+(19)   PLEASE READ OUT #9
+       DO (16) NEXT
+       
diff --git a/pit/tests/permute.doc b/pit/tests/permute.doc
new file mode 100644 (file)
index 0000000..a100fbb
--- /dev/null
@@ -0,0 +1,106 @@
+permute.i prints the permutations of the set {1,2,3,4,5,6}, using
+backtracking (and therefore must be compiled with the -m compiler
+option). The following is the program translated into a mix of Prolog
+and C, with some INTERCAL operations (gets, stash, retrieve, giveup)
+scattered throughout the program.
+
+goal :- gets(.1, #0),
+       gennumber,
+       checklist,
+       gennumber,
+       checklist,
+       gennumber,
+       checklist,
+       gennumber,
+       checklist,
+       gennumber,
+       checklist,
+       gennumber,
+       checklist,
+       readout(.1),
+       retrieve(.1),
+       readout(.1),
+       retrieve(.1),
+       readout(.1),
+       retrieve(.1),
+       readout(.1),
+       retrieve(.1),
+       readout(.1),
+       retrieve(.1),
+       readout(.1),
+       readout(#30),
+       fail.
+goal :- giveup.
+
+gennumber :- stash(.1), gets(.1, #1).
+gennumber :- stash(.1), gets(.1, #2).
+gennumber :- stash(.1), gets(.1, #3).
+gennumber :- stash(.1), gets(.1, #4).
+gennumber :- stash(.1), gets(.1, #5).
+gennumber :- stash(.1), gets(.1, #6).
+
+checklist :- gets(.2, .1),
+            while(.1 != #0)
+            {
+               retrieve(.1),
+               if(.1 == .2) {!, fail.}
+            },
+            fail.
+checklist.
+
+The backtracking reverses all the stashing and retrieving that is
+done, so that at the end of the program .1 is #0 again and there is no
+stash on .1. The INTERCAL has a somewhat Prolog-like attitude: it
+never uses GO BACK to remove a choicepoint except when GOING BACK to
+an earlier choicepoint (just like Prolog). The checklist. at the end
+of the pseudo-Prolog source is actually an attempt to replicate the
+semantics of MAYBE COME FROM; MAYBE COME FROM...GO BACK continues as
+if nothing had happened, except for leaving a stale choicepoint on the
+stack (but the program runs GO BACK in a loop whenever there is a risk
+of encountering a stale choicepoint on top of the stack), but MAYBE
+COME FROM...GO AHEAD, GO BACK causes the line that was come from to
+fail. (The GO AHEAD, GO BACK was translated as !, fail in the
+pseudo-Prolog above, as it has a similar effect). The program clearly
+shows that INTERCAL's variables are more general than Prolog's (you
+can rebind a variable in INTERCAL, and the rebinding is undone on
+backtracking), especially when stashes are taken into account. On the
+other hand, the program couldn't work as written in C, because
+checklist destroys all the information about the permutations so far!
+(In both the Prolog source above and in the INTERCAL, this destruction
+is always cancelled out by backtracking past it). This program
+probably could be translated into Prolog, but there would be a lot
+more passing-around of variables, and probably more predicates
+involved (I think gets, stash, and retrieve might be possible in terms
+of assert/retract). However, I think that the INTERCAL source is the
+clearest available implementation of the exact program flow above.
+Note also the way that I translated the if() and while() into
+INTERCAL.
+
+if(<1 or 2>==1) something
+becomes
+DO ABSTAIN <1 or 2> FROM (label)
+DO REINSTATE (label)
+(label) DO something AGAIN
+which is the shortest way to do an if() statement in INTERCAL that I
+have discovered (yes! ABSTAIN and REINSTATE have a purpose again!).
+
+do {block} while(<0 or 1>) becomes
+
+DO COME FROM <0 or 1>$label
+most of block
+(1$label) last statement of block
+
+which is pretty clear when written like this, but amazingly confusing
+to track in the INTERCAL, and also prevents the user using 0$label as
+a line number, without any obvious clue to this effect in the source
+code. while() can often be transformed into do..while(), and even in
+situations where it can't, an extra COME FROM does the trick.
+
+This program uses a large crosssection of INTERCAL control structures;
+computed COME FROM, ordinary COME FROM, ABSTAIN/REINSTATE, AGAIN,
+NEXT, and MAYBE/GO AHEAD/GO BACK are all used. Only ONCE (which is
+implied in the program due to the abstention/reinstatement of an AGAIN
+line) and IGNORE are left unused (at least until someone invents a new
+even nastier control structure). Unusually, it only contains three
+nontrivial expressions (those other than a single constant or a single
+variable).
\ No newline at end of file
diff --git a/pit/tests/permute.i b/pit/tests/permute.i
new file mode 100644 (file)
index 0000000..38d2c30
--- /dev/null
@@ -0,0 +1,62 @@
+       PLEASE NOTE THIS IS A BACKTRACKING PERMUTATION PROGRAM
+       MAYBE DON'T GIVE UP
+       DO .1 <- #0
+(3)    DO (24) NEXT
+(4)    DO (24) NEXT
+(5)    DO (24) NEXT
+(6)    DO (24) NEXT
+(7)    DO (24) NEXT
+(8)    DO (24) NEXT
+       DO READ OUT .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       PLEASE RETRIEVE .1
+       DO READ OUT .1
+       DO READ OUT #30
+       DO COME FROM (22)
+(22)   DO GO BACK
+
+(24)           PLEASE NOTE THIS RETURNS #1 TO #6 ON DIFFERENT BACKTRACKS
+       DO STASH .1
+(26)   DO .1 <- #1
+(27)   DO .1 <- #2
+(28)   DO .1 <- #3
+(29)   DO .1 <- #4
+(30)   DO .1 <- #5
+       DO .1 <- #6
+       DO RESUME #1
+       MAYBE COME FROM (26)
+       PLEASE RESUME #1
+       MAYBE COME FROM (27)
+       PLEASE RESUME #1
+       MAYBE COME FROM (28)
+       PLEASE RESUME #1
+       MAYBE COME FROM (29)
+       PLEASE RESUME #1
+       MAYBE COME FROM (30)
+       PLEASE RESUME #1
+
+       PLEASE NOTE THIS BACKTRACKS IF .1 IS NONUNIQUE IN ITS STASH
+       MAYBE COME FROM (3)
+       MAYBE COME FROM (4)
+       MAYBE COME FROM (5)
+       MAYBE COME FROM (6)
+       MAYBE COME FROM (7)
+       MAYBE COME FROM (8)
+       PLEASE DO .2 <- .1
+       DO .3 <- #1
+       DO COME FROM '"?"!3~.3'~#1"$#2"~#1'$#15
+       PLEASE DO RETRIEVE .1
+       DO ABSTAIN "?"!1~.1'~#1"$#1"~#3 FROM (55)
+       DO REINSTATE (55)
+(55)   DO GO BACK AGAIN
+(87)   PLEASE DO .3 <- '?.1$.2'~#21845
+       DO GO AHEAD
+       DO COME FROM (61)
+(61)   PLEASE DO GO BACK
diff --git a/pit/tests/pictest.i b/pit/tests/pictest.i
new file mode 100644 (file)
index 0000000..95918b8
--- /dev/null
@@ -0,0 +1,11 @@
+PLEASE NOTE This continuously copies PORTA to PORTB
+           (PORTA is always input, PORTB is always output)
+       DO .2 <- #0
+       DO .1 <- #65280
+       PLEASE COME FROM (11)
+       DO (1520) NEXT
+       DO PIN :1
+       DO .1 <- :1~#255
+       PLEASE DO .2 <- #257
+       DO (1030) NEXT
+(11)   DO .1 <- .3
diff --git a/pit/tests/sink.doc b/pit/tests/sink.doc
new file mode 100644 (file)
index 0000000..c268888
--- /dev/null
@@ -0,0 +1,5 @@
+(1999) PLEASE DO (1999) NEXT
+
+Sink.i:  A program I wrote just to see if the guy who wrote the compiler
+       was faithful. :)
+       (blojo@ocf.berkeley.edu)
diff --git a/pit/tests/sink.i b/pit/tests/sink.i
new file mode 100644 (file)
index 0000000..2d4c8e2
--- /dev/null
@@ -0,0 +1,3 @@
+(1999) PLEASE DO (1999) NEXT
+       DO NOTE THAT YOU CAN'T GET HERE FROM THERE
+       DO ANYTHING YOU WANT ON THIS LINE, IT WON'T HAPPEN ANYWAY
diff --git a/pit/tests/test1.i b/pit/tests/test1.i
new file mode 100644 (file)
index 0000000..7e94426
--- /dev/null
@@ -0,0 +1,83 @@
+       PLEASE DO (1) NEXT
+       DO ERROR: NEXTING NOT WORKING
+       DO SECTION A: CONTROL FLOW
+(1)    DO FORGET #1
+       DO .1 <- #2
+       PLEASE DO (2) NEXT
+       DO (11) NEXT
+       DO ERROR: IGNORING NOT WORKING
+(7)    DO FORGET #2
+       DO REMEMBER .1
+       DO .1 <- #2
+       DO (12) NEXT
+       DO ABSTAIN FROM (50)
+(50)   PLEASE DO (51) NEXT
+       DO ABSTAIN FROM (52)
+       DO REINSTATE (52)
+(52)   PLEASE DO (123) NEXT
+       DO ERROR: LABEL REINSTATING NOT WORKING
+(123)  PLEASE DO FORGET #1
+       DO .1 <- #2
+       DO STASH .1
+       DO .1 <- #1
+       DO RETRIEVE .1
+       PLEASE DO (125) NEXT
+       PLEASE DO (124) NEXT
+(125)  PLEASE DO (126) NEXT
+       DO ERROR: RETRIEVING OR STASHING NOT WORKING
+(126)  DO RESUME .1
+       DO ERROR
+(12)   PLEASE DO (13) NEXT
+       DO ERROR: REMEMBERING NOT WORKING
+(13)   DO RESUME .1
+       DO ERROR
+(11)   PLEASE DO (111) NEXT
+       DO (7) NEXT
+(111)  DO .1 <- #1
+       DO IGNORE .1
+       DO .1 <- #2
+       DO RESUME .1
+(2)    DO (5) NEXT
+       DO ERROR
+(5)    DO RESUME .1
+       DO ERROR: RESUMING NOT WORKING
+(51)   DO ERROR: LABEL ABSTENTION NOT WORKING
+       DO SECTION B: CALCULATION
+(124)  PLEASE FORGET #1
+       DO .1 <- #3
+       DO .1 <- .&1
+       PLEASE DO (501) NEXT
+       DO ERROR IN & OPERATION
+(501)  PLEASE DO (502) NEXT
+       DO ERROR IN & OPERATION
+(502)  PLEASE DO (603) NEXT
+       DO FORGET #2
+       DO .1 <- #2
+       DO .1 <- .V1
+       PLEASE DO (601) NEXT
+       DO .2 <- #32773
+       DO .2 <- .?2
+       DO .2 <- .&2
+       PLEASE DO (701) NEXT
+       DO .1 <- #7~#5
+       PLEASE DO (901) NEXT
+       DO .1 <- #1$#0
+       DO (950) NEXT
+       DO THIS TEST HAS BEEN SUCCESSFULLY COMPLETED
+(950)  PLEASE DO (951) NEXT   
+       DO ERROR IN $'ING
+(951)  DO RESUME .1
+(901)  PLEASE DO (902) NEXT
+       DO ~ ERROR
+(902)  PLEASE DO (903) NEXT
+       DO ~ ERROR
+(903)  DO RESUME .1
+(701)  PLEASE DO (702) NEXT
+       DO ERROR IN ? XOR OPERATION
+(702)  PLEASE DO (603) NEXT
+       DO ERROR IN ? XOR OPERATION
+(601)  PLEASE DO (602) NEXT
+       DO ERROR IN V OPERATION
+(602)  PLEASE DO (603) NEXT
+       DO ERROR IN V OPERATION
+(603)  DO RESUME .1
diff --git a/pit/tests/test16bit.i b/pit/tests/test16bit.i
new file mode 100644 (file)
index 0000000..7704939
--- /dev/null
@@ -0,0 +1,7 @@
+        PLEASE DO .1 <- #1$'#1$#0'
+        DO READ OUT .1
+        DO .1 <- #32768$'#1$#32768'
+        DO READ OUT .1
+        DO :1 <- #32768$'#1$#32768'
+        DO READ OUT :1
+        PLEASE DO GIVE UP
diff --git a/pit/tests/test2.i b/pit/tests/test2.i
new file mode 100644 (file)
index 0000000..09fe111
--- /dev/null
@@ -0,0 +1,187 @@
+DO WRITE IN .1
+DO WRITE IN .2
+DO (1030) NEXT
+DO READ OUT .3
+DO GIVE UP
+(1000) PLEASE IGNORE .4
+       PLEASE ABSTAIN FROM (1005)
+(1009) DO STASH .1 + .2 + .5 + .6
+       DO .4 <- #1
+       DO (1004) NEXT
+(1004) PLEASE FORGET #1
+       DO .3 <- '?.1$.2'~'#0$#65535'
+       DO .6 <- '&.1$.2'~'#0$#65535'
+       PLEASE DO .5 <- "?!6~#32768'$#1"~#3
+       DO (1002) NEXT
+       DO .4 <- #2
+(1005) DO (1006) NEXT
+(1999) DOUBLE OR SINGLE PRECISION OVERFLOW
+(1002) DO (1001) NEXT
+(1006) PLEASE FORGET #1
+       DO .5 <- '?"!6~.6'~#1"$#1'~#3
+       DO (1003) NEXT
+       DO .1 <- .3
+       DO .2 <- !6$#0'~'#32767$#1'
+       DO (1004) NEXT
+(1003) DO (1001) NEXT
+       DO REINSTATE (1005)
+(1007) PLEASE RETRIEVE .1 + .2 + .5 + .6
+       DO REMEMBER .4
+       PLEASE RESUME #2
+(1001) DO RESUME .5
+(1010) DO STASH .1 + .2 + .4
+       DO .4 <- .1
+       DO .1 <- '?.2$#65535'~'#0$#65535'
+       DO (1020) NEXT
+       PLEASE DO .2 <- .4
+       PLEASE DO (1009) NEXT
+       DO RETRIEVE .1 + .2 + .4
+       PLEASE RESUME #1
+(1020) DO STASH .2 + .3
+       DO .2 <- #1
+       PLEASE DO (1021) NEXT
+(1021) DO FORGET #1
+       DO .3 <- "?!1~.2'$#1"~#3
+       PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+       DO (1022) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       DO (1021) NEXT
+(1023) PLEASE RESUME .3
+(1022) DO (1023) NEXT
+       PLEASE RETRIEVE .2 + .3
+       PLEASE RESUME #2
+(1030) DO ABSTAIN FROM (1033)
+       PLEASE ABSTAIN FROM (1032)
+(1039) DO STASH :1 + .5
+       DO (1530) NEXT
+       DO .3 <- :1~#65535
+       PLEASE DO .5 <- :1~'#65280$#65280'
+       DO .5 <- '?"!5~.5'~#1"$#1'~#3
+       DO (1031) NEXT
+(1032) DO (1033) NEXT
+       DO (1999) NEXT
+(1031) DO (1001) NEXT
+(1033) DO .4 <- .5
+       DO REINSTATE (1032)
+       PLEASE REINSTATE (1033)
+       DO RETRIEVE :1 + .5
+       PLEASE RESUME #2
+(1500) PLEASE ABSTAIN FROM (1502)
+       PLEASE ABSTAIN FROM (1506)
+(1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6
+       DO .1 <- :1~#65535
+       PLEASE DO .2 <- :2~#65535
+       DO (1009) NEXT
+       DO .5 <- .3
+       PLEASE DO .6 <- .4
+       DO .1 <- :1~'#65280$#65280'
+       DO .2 <- :2~'#65280$#65280'
+       DO (1009) NEXT
+       DO .1 <- .3
+       PLEASE DO (1503) NEXT
+       DO .6 <- .4
+       DO .2 <- #1
+       DO (1009) NEXT
+       DO .1 <- .3
+       DO (1501) NEXT
+(1504) PLEASE RESUME .6
+(1503) DO (1504) NEXT
+(1501) DO .2 <- .5
+       DO .5 <- '?"'&.6$.4'~#1"$#2'~#3
+       DO (1505) NEXT
+(1506) DO (1502) NEXT
+       PLEASE DO (1999) NEXT
+(1505) DO (1001) NEXT
+(1502) DO :4 <- .5
+       DO (1520) NEXT
+       DO :3 <- :1
+       PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6
+       DO REINSTATE (1502)
+       DO REINSTATE (1506)
+       PLEASE RESUME #3
+(1510) DO STASH :1 + :2 + :4
+       DO :1 <- "'?":2~'#65535$#0'"$#65535'~'#0$#65535
+'"$"'?":2~'#0$#65535'"$#65535'~'#0$#65535'"
+       DO :2 <- #1
+       DO (1509) NEXT
+       PLEASE RETRIEVE :1
+       DO :2 <- :3
+       PLEASE DO (1509) NEXT
+       DO RETRIEVE :2 + :4
+       PLEASE RESUME #1
+(1520) PLEASE STASH .3 + .4
+       DO .3 <- .1~#43690
+       DO (1525) NEXT
+       PLEASE DO .4 <- 'V.3$".2~#43690"'~'#0$#65535'
+       DO .3 <- .1~#21845
+       PLEASE DO (1525) NEXT
+       DO :1 <- .4$"'V.3$".2~#21845"'~'#0$#65535'"
+       PLEASE RETRIEVE .3 + .4
+       DO RESUME #1
+(1525) DO .3 <- '"'"'"!3$#0'~'#32767$#1'"$#0'~'#32767
+$#1'"$#0'~'#16383$#3'"$#0'~'#4095$#15'
+       PLEASE RESUME #1
+(1530) DO STASH :2 + :3 + .3 + .5
+       DO :1 <- #0
+       DO :2 <- .2
+       DO .3 <- #1
+       DO (1535) NEXT
+(1535) PLEASE FORGET #1
+       DO .5 <- "?!1~.3'$#1"~#3
+       DO (1531) NEXT
+       DO (1500) NEXT
+       DO :1 <- :3
+       PLEASE DO (1533) NEXT
+(1531) PLEASE DO (1001) NEXT
+(1533) DO FORGET #1
+       DO .3 <- !3$#0'~'#32767$#1'
+       DO :2 <- ":2~'#0$#65535'"$"'":2~'#32767$#0'"$#
+0'~'#32767$#1'"
+       PLEASE DO .5 <- "?!3~.3'$#1"~#3
+       DO (1532) NEXT
+       DO (1535) NEXT
+(1532) DO (1001) NEXT
+       PLEASE RETRIEVE :2 + :3 + .3 + .5
+       DO RESUME #2
+(1540) PLEASE ABSTAIN FROM (1541)
+       DO ABSTAIN FROM (1542)
+(1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5
+       DO .1 <- :1~#65535
+       PLEASE DO .2 <- :2~'#65280$#65280'
+       DO .5 <- :1~'#65280$#65280'
+       DO (1530) NEXT
+       DO :3 <- :1
+       DO .2 <- :2~#65535
+       PLEASE DO (1530) NEXT
+       DO :5 <- :1
+       DO .1 <- .5
+       DO (1530) NEXT
+       DO :4 <- :1
+       PLEASE DO :1 <- ":3~'#65280$#65280'"$":5~'#65280$#65280'"
+       DO .5 <- ':1~:1'~#1
+       DO .2 <- :2~'#65280$#65280'
+       DO (1530) NEXT
+       PLEASE DO .5 <- '"':1~:1'~#1"$.5'~#3
+       DO .1 <- :3~#65535
+       DO .2 <- #0
+       DO (1520) NEXT
+       PLEASE DO :2 <- :1
+       PLEASE DO .1 <- :4~#65535
+       DO (1520) NEXT
+       DO (1509) NEXT
+       DO .5 <- !5$":4~#3"'~#15
+       DO :1 <- :3
+       DO :2 <- :5
+       DO (1509) NEXT
+       PLEASE DO .5 <- !5$":4~#3"'~#63
+       DO .5 <- '?"!5~.5'~#1"$#1'~#3
+       PLEASE RETRIEVE :4
+(1541) DO :4 <- .5
+       DO (1543) NEXT
+(1542) DO (1544) NEXT
+       PLEASE DO (1999) NEXT
+(1543) DO (1001) NEXT
+(1544) DO REINSTATE (1541)
+       PLEASE REINSTATE (1542)
+       PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5
+       DO RESUME #2
diff --git a/pit/tests/testarray.i b/pit/tests/testarray.i
new file mode 100644 (file)
index 0000000..690652a
--- /dev/null
@@ -0,0 +1,24 @@
+        PLEASE DO ,1 <- #3 BY #3
+        DO ;2 <- #6
+        DO ,2 <- #6
+       DO .1 <- #1
+       DO .2 <- #1
+       DO ,1 SUB .2.1 <- #1
+       DO ;2 SUB #5 <- #1
+       DO .1 <- "?',1 SUB .2.1'$#1"~#3
+       DO .2 <- ,1 SUB #1 ;2 SUB #5
+       DO .1 <- .2~,1 SUB #1 #1
+       DO STASH .1 + ,2 + ;2 + ,1 + ,3
+       DO ,1 <- #500
+       DO ,1 SUB #1 <- #112
+       PLEASE DO READ OUT ,1 SUB .2
+       PLEASE RETRIEVE ,2 + ,1 + ,3
+       DO .1 <- #?1
+       DO .1 <- .?1
+       PLEASE DO READ OUT ,1 SUB #1 #1
+       DO .1 <- .2$,&1 SUB #1 #1
+       PLEASE DO READ OUT .1
+       DO .1 <- .2$,V1 SUB #1 #1
+       PLEASE DO READ OUT .1
+
+       PLEASE GIVE UP
diff --git a/pit/tests/testcf.i b/pit/tests/testcf.i
new file mode 100644 (file)
index 0000000..2be5abd
--- /dev/null
@@ -0,0 +1,22 @@
+       DO COME FROM (80)
+       PLEASE %50 REINSTATE (10)
+        DO .1 <- #1
+(10)    DO NOT %99 .1 <- #2
+        DO .1 <- #3
+       PLEASE COME FROM (10)
+        DO READ OUT .1
+        DO .1 <- #1
+(20)    DO %50 .1 <- #2
+        DO .1 <- #3
+(30)   PLEASE %50 COME FROM (20)
+       DO LOSE
+       PLEASE %90 COME FROM (30)
+(40)   PLEASE ABSTAIN FROM (50)
+        DO READ OUT .1
+(50)   PLEASE COME FROM (40)
+(60)   DO (70) NEXT
+        DO GIVE UP
+(70)   DO READ OUT #65535
+       DO RESUME #1
+       DO WIN
+(80)   DO COME FROM (60)
diff --git a/pit/tests/testcreate.i b/pit/tests/testcreate.i
new file mode 100644 (file)
index 0000000..505549d
--- /dev/null
@@ -0,0 +1,13 @@
+       DO .3 <- #5
+       DO .4 <- #6
+       DO CREATE (5) SWITCH .1 WITH .2
+       DO SWITCH .3 WITH .4
+       DO READ OUT .3
+       DO READ OUT .4
+       PLEASE GIVE UP
+(5)    PLEASE STASH :1
+       DO :1 <- :1601
+       DO :1601 <- :1602
+       DO :1602 <- :1
+       DO RETRIEVE :1
+       PLEASE RESUME #1
diff --git a/pit/tests/testi18n.i b/pit/tests/testi18n.i
new file mode 100644 (file)
index 0000000..2106dce
--- /dev/null
@@ -0,0 +1,9 @@
+       PLEASE .1 <- #1$#0
+       DO .2 <- #1¢#0
+       DO .3 <- #1£#0
+       DO .4 <- #1¤#0
+       PLEASE READ OUT .1
+       DO READ OUT .2
+       DO READ OUT .3
+       DO READ OUT .4
+       PLEASE GIVE UP
diff --git a/pit/tests/testlib2.i b/pit/tests/testlib2.i
new file mode 100644 (file)
index 0000000..ce9cdfd
--- /dev/null
@@ -0,0 +1,62 @@
+
+DO (10) NEXT
+
+(10)    PLEASE FORGET #1
+        DO WRITE IN .1
+        DO (2000) NEXT
+        DO READ OUT .1
+        DO GIVE UP
+
+(20)    PLEASE FORGET #1
+        DO WRITE IN .1
+        DO (22) NEXT
+(21)    DO (2010) NEXT
+        DO READ OUT .1
+(22)    PLEASE FORGET #1
+        DO (21) NEXT
+        DO READ OUT .1
+        DO GIVE UP
+
+(30)    PLEASE FORGET #1
+        DO WRITE IN .1
+        DO WRITE IN .2
+        DO (2020) NEXT
+        DO READ OUT .1
+        DO GIVE UP
+
+
+
+(2010)  PLEASE ABSTAIN FROM (2004)
+(2000)  DO STASH .2
+        DO .2 <- #1
+        DO (2001) NEXT
+(2001)  PLEASE FORGET #1
+        DO .1 <- '?.1$.2'~'#0$#65535'
+        DO (2002) NEXT
+        DO .2 <- !2$#0'~'#32767$#1'
+        DO (2001) NEXT
+(2003)  PLEASE RESUME "?!1~.2'$#1"~#3
+(2002)  DO (2003) NEXT
+        PLEASE RETRIEVE .2
+(2004) PLEASE RESUME #2
+       PLEASE DO REINSTATE (2004)
+       PLEASE RESUME '?"!1~.1'~#1"$#2'~#6
+
+(2020)  PLEASE STASH .2 + .3
+       DO (1021) NEXT
+
+
+
+        (1020)  DO STASH .2 + .3
+                DO .2 <- #1
+                PLEASE DO (1021) NEXT
+        (1021)  DO FORGET #1
+                DO .3 <- "?!1~.2'$#1"~#3
+                PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+                DO (1022) NEXT
+                DO .2 <- !2$#0'~'#32767$#1'
+                DO (1021) NEXT
+        (1023)  PLEASE RESUME .3
+        (1022)  DO (1023) NEXT
+                PLEASE RETRIEVE .2 + .3
+                PLEASE RESUME #2
diff --git a/pit/tests/testonce.i b/pit/tests/testonce.i
new file mode 100644 (file)
index 0000000..46d46cf
--- /dev/null
@@ -0,0 +1,37 @@
+       PLEASE  COME FROM (30) ONCE
+       PLEASE  COME FROM (20) ONCE
+       PLEASE  COME FROM (10) ONCE
+       DO      .1 <- #1
+(1)    DO      .1 <- #2 ONCE
+(10)   DO      READ OUT .1
+(20)   DO      NOTHING
+(30)   DO      REINSTATE (1)
+
+        PLEASE  COME FROM (40) ONCE
+        PLEASE  COME FROM (50) ONCE
+        PLEASE  COME FROM (60) ONCE
+        DO      .1 <- #1
+(2)     DO NOT  .1 <- #2 ONCE
+(40)    DO      READ OUT .1
+(50)    DO      NOTHING
+(60)    DO      ABSTAIN FROM (2)
+
+       DO      COME FROM (70) ONCE
+       DO      COME FROM (80) ONCE
+       DO      COME FROM (90) ONCE
+       DO      .1 <- #1
+(3)    DO      .1 <- #2 AGAIN
+(70)   DO      READ OUT .1
+(80)   DO      ABSTAIN FROM (3) ONCE
+(90)   DO      NOTHING
+
+       DO      COME FROM (100) ONCE
+       DO      COME FROM (110) ONCE
+       DO      COME FROM (120) ONCE
+       DO      .1 <- #1
+(4)    DO NOT  .1 <- #2 AGAIN
+(100)  DO      READ OUT .1
+(110)  DO      REINSTATE (4) ONCE
+(120)  DO      NOTHING
+
+       PLEASE  GIVE UP
diff --git a/pit/tests/testops.3i b/pit/tests/testops.3i
new file mode 100644 (file)
index 0000000..f540881
--- /dev/null
@@ -0,0 +1,18 @@
+       PLEASE WRITE IN .3\r
+       DO .1 <- "^.3$#1"~#1\r
+       DO READ OUT .1\r
+       DO .1 <- "V.3$#1"~#1\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "V'"&.3$#2"~#1'$#1"~#1\r
+       DO READ OUT .1\r
+       DO .1 <- "?'"&.3$#2"~#1'$#1"~#1\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "V!3~#2'$#1"~#1\r
+       DO READ OUT .1\r
+       DO .1 <- "?!3~#2'$#1"~#1\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "@'"^.3$#7"~#4'$#2"~#10\r
+       DO READ OUT .1\r
+       DO .1 <- "^.3$.3"~"#0$#29524"\r
+       PLEASE DO READ OUT .1\r
+       PLEASE GIVE UP\r
diff --git a/pit/tests/testops.5i b/pit/tests/testops.5i
new file mode 100644 (file)
index 0000000..5669467
--- /dev/null
@@ -0,0 +1,17 @@
+       PLEASE WRITE IN .3\r
+       DO .1 <- "^'"^.3$.3"~"#0$#3906"'$'"^.3$.3"~"#0$#3906"'"~"#0$#3906"\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "^.3$.3"~"#0$#3906"\r
+       DO .1 <- "^.1$.1"~"#0$#3906"\r
+       DO READ OUT .1\r
+       DO .1 <- "&.3$#1"~#1\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "@.3$#1"~#1\r
+       DO READ OUT .1\r
+       DO .1 <- "2@.3$#1"~#1\r
+       PLEASE DO READ OUT .1\r
+       DO .1 <- "3@.3$#1"~#1\r
+       DO READ OUT .1\r
+       DO .1 <- "V.3$#1"~#1\r
+       DO READ OUT .1\r
+       PLEASE GIVE UP\r
diff --git a/pit/tests/testsplat.i b/pit/tests/testsplat.i
new file mode 100644 (file)
index 0000000..ea8b68e
--- /dev/null
@@ -0,0 +1,10 @@
+       PLEASE DO READ 
+       OUT #1
+       DO READ OUT #2          DO READ OUT #3
+       DO %50 RED OUT #4       DO READ OUT #5
+       DO READ OUT #6          DO RED OUT #7
+       DO RED
+       OUT #8
+       DO READ
+       OUTT #9
+       PLEASE DO GIVE UP
diff --git a/pit/tests/version.4i b/pit/tests/version.4i
new file mode 100644 (file)
index 0000000..fd19d0a
--- /dev/null
@@ -0,0 +1,7 @@
+(1)    DO .1 <- #?6\r
+       DOING DETECTION... YOU ARE USING INTERCAL-72\r
+(5)            PLEASE COME FROM (1)\r
+       DOING DETECTION... YOU ARE USING C-INTERCAL\r
+       PLEASE COME FROM .1\r
+       DOING DETECTION... YOU ARE USING CLC-INTERCAL\r
+       \r
diff --git a/pit/tests/version.doc b/pit/tests/version.doc
new file mode 100644 (file)
index 0000000..60ce346
--- /dev/null
@@ -0,0 +1,14 @@
+version.4i is a simple program that tests what version of INTERCAL you are
+running.
+
+Under INTERCAL-72, the .4i suffix is ignored, and the COME FROM lines are
+splatted. So execution flows to the first splat line, where an error is
+reported that prints out the required message.
+
+Under C-INTERCAL (or CLC-INTERCAL faking it), the ? is interpreted as XOR,
+leaving a hugely large value in .1. So the second COME FROM doesn't match,
+and the second splat line generates the error.
+
+Under CLC-INTERCAL (or C-INTERCAL using the -X option), the ? is interpreted
+as BUT, leaving #5 in .1. So the second COME FROM finds the required line
+label, and the third splat line generates the error.
diff --git a/pit/tests/whileadd.i b/pit/tests/whileadd.i
new file mode 100644 (file)
index 0000000..7caecfc
--- /dev/null
@@ -0,0 +1,6 @@
+       PLEASE NOTE THIS PROGRAM READS IN TWO 16-BIT NUMBERS AND ADDS THEM
+       DO WRITE IN .1
+       DO WRITE IN .2
+(1)            DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1"
+       DO READ OUT .1
+       PLEASE GIVE UP
diff --git a/pit/tophat.fft b/pit/tophat.fft
new file mode 100644 (file)
index 0000000..d4c4170
--- /dev/null
@@ -0,0 +1,258 @@
+ONE\r
+ONE TWO EIGHT\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
+ONE TWO FIVE OH OH OH OH FIVE ONE\r
+ZERO\r
diff --git a/pit/tpk.doc b/pit/tpk.doc
new file mode 100644 (file)
index 0000000..6fc1d88
--- /dev/null
@@ -0,0 +1,16 @@
+I have made my TPK program available on
+  http://www-cs-faculty.stanford.edu/~knuth/programs.html
+and I have no objection if you or other people with INTERCAL sites
+add it to their collection. If you have time to check it out
+(at least a little), I think you'll see that it introduces a few
+new hacks that work only on INTERCAL, including DON'T RESUME #1
+and REINSTATE NEXTING. Also a way to avoid simple branching by using
+an array: Suppose you want to set x<-y if and only if z is true.
+Then keep x in ;X SUB#1 and "shadow x" in ;X SUB#2 and convert
+z to .Z = 1 if true, 2 if false; then set ;X SUB .Z <- y (no branching).
+If you have time to look at only a little bit of the program,
+I recommend the last two subroutines, "CMP" (which is teleprinter
+code for 23438) and "TIX" (29904). Someday I'll publish clues about
+what is going on, in my Fun and Games book; the code is filled with
+jokes that only a true hacker can appreciate.... and I think I've
+used every non-newfangled feature of the language.
diff --git a/pit/tpk.i b/pit/tpk.i
new file mode 100644 (file)
index 0000000..d5f3b36
--- /dev/null
+++ b/pit/tpk.i
@@ -0,0 +1,407 @@
+        PLEASE ABSTAIN FROM (29733)
+(29733) DON KNUTH'S IMPLEMENTATION OF TPK IN INTERCAL
+                      (C) MARCH 2003
+        REFERENCE --- THE EARLY HISTORY OF PROGRAMMING
+        LANGUAGES, BY D E KNUTH AND L TRABB PARDO
+
+        NOTA BENE: THE INPUT AND OUTPUT DATA ARE SCALED
+        DECIMAL NUMBERS WITH SIX DIGITS TO THE RIGHT OF
+        THE DECIMAL POINT; THUS AN INPUT OF
+           THREE ONE FOUR ONE FIVE NINE THREE
+        DENOTES 3.141593, AND THAT VALUE WOULD BE OUTPUT AS
+           ______
+           MMMCXLMDXCIII
+
+        PLEASE NOTE THAT VARIABLE NAMES AND SUBROUTINE NAMES USE
+        THE 5-BIT TELEPRINTER CODE IN LETTER-SHIFT MODE, NAMELY
+  / E @ A : S I U 1/4 D R J N F C K T Z L W H Y P Q O B G " M X V $
+        (WHICH ALAN TURING ADVISED EVERY PROGRAMMER TO LEARN)
+
+        PLEASE (6534) NEXT
+        DO ;3 <- #11 BY #2
+        DO ;29 <- #2
+        PLEASE DO .6 <- #0
+        DO (1) NEXT
+(1)     PLEASE DO FORGET #1
+        DO WRITE IN :1        
+        DO (22919) NEXT
+        PLEASE .1 <- .6
+        PLEASE DO (1020) NEXT
+        DO .11 <- .1
+        DO ;3 SUB .11 #1 <- ;1 SUB #1
+        DO ;3 SUB .11 #2 <- ;1 SUB #2
+        DO .1 <- #10 
+        DO (29904) NEXT
+        DO (1) NEXT
+        DO REINSTATE NEXTING
+        PLEASE DO (2) NEXT
+(2)     DO FORGET #1
+        DO .984 <- #0
+        PLEASE .1 <- .6
+        PLEASE DO (1020) NEXT
+        DO .11 <- .1
+        DO ;29 SUB #1 <- ;3 SUB .11 #1
+        DO ;29 SUB #2 <- ;3 SUB .11 #2
+        PLEASE DO (13) NEXT
+        DO (15478) NEXT
+        DO (15320) NEXT 
+        DO :2 <- #6528$#32544
+        PLEASE DO (23438) NEXT
+        DO :1 <- #31640$#20792
+        DO READ OUT .6 + :1
+        DO REMEMBER :1
+        DO .1 <- #0
+        DO ABSTAIN FROM (711)
+        PLEASE DO (29904) NEXT
+        DO (2) NEXT
+        DO GIVE UP
+
+        PLEASE USE THE FOLLOWING FUNCTION, WHICH SETS ;1 <- F(;X)
+        WHERE ;29 AND ;1 ARE EXTENDED FIXED-POINT NUMBERS
+        (THAT IS, THEY ARE VECTORS WITH TWO COMPONENTS,
+             #1=INTEGER PART, #2=FRACTION PART)
+(13)    DO STASH ;2
+        DO ;1 SUB #1 <- ;29 SUB #1
+        DO ;1 SUB #2 <- ;29 SUB #2
+        PLEASE STASH ;1
+        PLEASE DO ;2 SUB #1 <- ;29 SUB #1
+        DO ;2 SUB #2 <- ;29 SUB #2
+        DO (30300) NEXT
+        DO (30300) NEXT
+        DO ;2 SUB #1 <- #5
+        DO ;2 SUB #2 <- #0
+        PLEASE DO (30300) NEXT
+        PLEASE DO ;2 SUB #1 <- ;1 SUB #1
+        DO ;2 SUB #2 <- ;1 SUB #2
+        PLEASE RETRIEVE ;1
+        DO (30499) NEXT
+        PLEASE DO (30218) NEXT
+        DO (29987) NEXT
+        DO RETRIEVE ;2
+        PLEASE RESUME #1
+
+        DO NOTHING BUT BASIC SUBROUTINES FROM HERE ON
+        -------------
+        FIRST THERE ARE ROUTINES FOR EXTENDED ARITHMETIC
+        (DOUBLE DOUBLE PRECISION), WHICH CONSISTS OF
+        TWO 32-BIT NUMBERS WITH A BINARY POINT BETWEEN THEM
+        
+        TO GET STARTED, DO (INI) FIRST; IT DEFINES BASIC ARRAYS
+(6534)  DO ;1 <- #2
+        DO ;2 <- #2
+        PLEASE RESUME #1
+
+        DON'T FORGET TO TEST FOR OVERFLOW AFTER A SERIES OF
+        EXTENDED ARITHMETIC OPERATIONS ... THE (OVC) ROUTINE
+        SETS ;1 TO THE MAX VALUE IF .OV IS 1
+(15320) PLEASE DO (2000) NEXT
+        DO ;1 SUB #1 <- #65535$#65535
+        DO ;1 SUB #2 <- #65535$#65535
+        PLEASE RESUME #1
+(2000)  PLEASE DO (2001) NEXT
+        PLEASE RESUME #2
+(2001)  DO RESUME '?.984$#1'~#3
+
+        DOING (ADY) NEXT SETS ;1 <- ;1+;2+.C~2 AND .C <- CARRY+1
+        DOING (ADZ) NEXT SETS ;1 <- ;1+;2 AND .C <- CARRY+1
+(17699) PLEASE .14 <- #1
+(21785) DO STASH :1 + :2 + :3 + :4
+        DO :1 <- ;1 SUB #2
+        PLEASE DO :2 <- .14~#2
+        PLEASE DO (1509) NEXT
+        DO .14 <- :4~#2
+        DO :1 <- :3
+        PLEASE DO :2 <- ;2 SUB #2
+        DO (1509) NEXT
+        DO ;1 SUB #2 <- :3
+        DO :1 <- ;1 SUB #1
+        DO :2 <- "V.14$':4~#2'"~#1
+        DO (1509) NEXT
+        DO .14 <- :4
+        DO :1 <- :3
+        DO :2 <- ;2 SUB #1
+        DO (1509) NEXT
+        DO ;1 SUB #1 <- :3
+        DO .14 <- '?:4$.14'~#6
+        PLEASE RETRIEVE :1 + :2 + :3 + :4
+        PLEASE RESUME #1
+
+        DOING (ADX) NEXT SETS ;1 <- ;1+;2 AND TRACKS OVERFLOW
+        DOING (ABX) NEXT SETS ;1 <- ABS(;1)
+(29987) PLEASE STASH .14
+        DO (17699) NEXT
+        DO .984 <- "V.984$'.14~#2'"~#1
+        PLEASE RETRIEVE .14
+(30499) DO RESUME #1
+
+        DOING (SUX) NEXT SETS ;1 <- ;1-;2 AND TRACKS OVERFLOW
+(29925) PLEASE STASH ;2 + .14
+        DO ;2 SUB #1 <- '"?'";2 SUB #1"~"#65535$#0"'$#65535"~"#0$#65535"'$
+                        '"?'";2 SUB #1"~"#0$#65535"'$#65535"~"#0$#65535"'
+        DO ;2 SUB #2 <- '"?'";2 SUB #2"~"#65535$#0"'$#65535"~"#0$#65535"'$
+                        '"?'";2 SUB #2"~"#0$#65535"'$#65535"~"#0$#65535"'
+        DO .14 <- #2
+        DO (21785) NEXT
+        PLEASE DO .984 <- "V.984$'.14~#1'"~#1
+        PLEASE RETRIEVE ;2 + .14
+        DO RESUME #1
+
+        DOING (SHY) NEXT SETS ;2 <- :3 * 2^16 AND CLOBBERS :3
+(22149) DO ;2 SUB #1 <- :3 ~ '#65280$#65280'
+        DO :3 <- '"':3~#43690'$#0"~"#65535$#1"' $
+                 '"':3~#21845'$#0"~"#65535$#1"'
+        PLEASE :3 <- ":3~'#511$#1'" $ ":3~'#1$#511'"
+        PLEASE :3 <- ":3~'#1023$#3'" $ ":3~'#3$#1023'"
+        DO ;2 SUB #2 <- ":3~'#4095$#15'" $ ":3~'#15$#4095'"                 
+        PLEASE RESUME #1
+
+        DOING (MLY) NEXT SETS ;1 <- :1 * :2 / 2^32
+(22108) PLEASE STASH :1 + :2 + :3 + ;2 + .14
+        DO :1 <- :1 ~ #65535
+        DO :2 <- :2 ~ #65535
+        DO (1540) NEXT
+        DO ;1 SUB #2 <- :3
+        DO ;1 SUB #1 <- #0
+        PLEASE RETRIEVE :1
+        PLEASE STASH :1
+        DO :1 <- :1 ~ '#65280$#65280'
+        DO (1540) NEXT
+        DO (22149) NEXT 
+        DO (17699) NEXT
+        PLEASE RETRIEVE :1 + :2
+        PLEASE STASH :1 + :2
+        DO :1 <- :1 ~ #65535
+        DO :2  <- :2 ~ '#65280$#65280'
+        DO (1540) NEXT 
+        DO (22149) NEXT
+        DO (17699) NEXT
+        PLEASE RETRIEVE :1
+        PLEASE STASH :1
+        DO :1 <- :1 ~ '#65280$#65280'
+        DO (1540) NEXT
+        DO ;2 SUB #2 <- #0
+        DO ;2 SUB #1 <- :3
+        DO (17699) NEXT
+        PLEASE RETRIEVE :1 + :2 + :3 + ;2 + .14
+        PLEASE RESUME #1
+
+        DOING (MLZ) NEXT SETS ;1 <- ;1 + (:1 * :2 / 2^32), TRACKING OVERFLOW
+(18012) PLEASE STASH ;1 + ;2
+        DO (22108) NEXT
+        PLEASE ;2 SUB #1 <- ;1 SUB #1
+        PLEASE ;2 SUB #2 <- ;1 SUB #2
+        PLEASE RETRIEVE ;1
+        DO (29987) NEXT
+        PLEASE RETRIEVE ;2
+        PLEASE RESUME #1
+
+        DOING (MLX) NEXT SETS ;1 <- ;1*;2 AND TRACKS OVERFLOW
+(30300) PLEASE STASH :1 + :2 + :3 + :4 + ;1 + ;2
+        DO :1 <- ;1 SUB #2
+        DO :2 <- ;2 SUB #2
+        DO (22108) NEXT
+        DO :1 <- ;1 SUB #1
+        DO :2 <- ';1 SUB #2' ~ '#32768$#0'
+        DO (1500) NEXT
+        PLEASE RETRIEVE ;1
+        DO :4 <- ;1 SUB #2
+        DO :1 <- ;1 SUB #1
+        DO :2 <- ;2 SUB #1
+        DO (22108) NEXT
+        PLEASE DO .984 <-  "V.984$' "';1 SUB #1'~';1 SUB #1'" ~#1'" ~ #1
+        DO ;1 SUB #1 <- ;1 SUB #2
+        DO ;1 SUB #2 <- :3
+        DO :2 <- ;2 SUB #2
+        DO (18012) NEXT
+        DO :1 <- :4
+        DO :2 <- ;2 SUB #1
+        DO (18012) NEXT
+        PLEASE RETRIEVE :1 + :2 + :3 + :4 + ;2
+        PLEASE RESUME #1
+
+        DOING (RTX) NEXT SETS ;1 <- SQRT(;1)
+(30218) PLEASE STASH .6 + ;2 + ;3 + ;4 + :1 + :2 + .1 + .2 + .3 + .14 + .984
+        DO ;4 <- #2
+        DO ;3 <- #2
+        DO .6 <- #1
+        DO ;3 SUB #1 <- #0
+        DO ;3 SUB #2 <- #0
+        DO ;4 SUB #1 <- #65535$#65535
+        DO ;4 SUB #2 <- ;4 SUB #1
+        DO :1 <- ;1 SUB #1
+        DO :2 <- ;1 SUB #2
+        PLEASE (2003) NEXT
+(2002)  DO ;2 SUB #1 <- ;1 SUB #1
+        DO ;2 SUB #2 <- ;1 SUB #2
+        DO (17699) NEXT
+        DO ;2 SUB #1 <- ;1 SUB #1
+        DO ;2 SUB #2 <- ;1 SUB #2
+        DO (17699) NEXT
+        PLEASE DO ;2 SUB #1 <- #0
+        PLEASE DO ;2 SUB #2 <- .2
+        DO (17699) NEXT
+        PLEASE DO ;2 SUB #2 <- .3
+        DO (29925) NEXT
+        PLEASE DO ;3 SUB #1 <- ;1 SUB #1
+        PLEASE DO ;3 SUB #2 <- ;1 SUB #2
+        PLEASE DO ;1 SUB #1 <- ;4 SUB #1
+        PLEASE DO ;1 SUB #2 <- ;4 SUB #2
+        DO ;2 SUB #1 <- ;1 SUB #1
+        DO ;2 SUB #2 <- ;1 SUB #2
+        DO (17699) NEXT
+        DO ;2 SUB #1 <- #0
+        PLEASE DO ;2 SUB #2 <- "?#1$.3"~#1
+        DO (17699) NEXT
+        PLEASE DO ;4 SUB #1 <- ;1 SUB #1
+        PLEASE DO ;4 SUB #2 <- ;1 SUB #2
+        DO .1 <- ":1 ~ '#21845$#0'" $
+         '"?':1~"#10922$#1"' $ '"?':1~#1'$':2~"#32768$#0"'"~#1'" ~#21845'
+        DO .2 <- ":1 ~ '#0$#21845'" $
+         '"? ':1~"#0$#10923"' $ '"?':1~#1'$':2~"#0$#32768"'"~#1'" ~#21845'
+        DO :1 <- .1 $ .2
+        DO .1 <- ":2 ~ '#21845$#0'" $
+         '"&':2~"#10922$#1"' $ #65534" ~ #21845'
+        DO .2 <- ":2 ~ '#0$#21845'" $
+         '"&':2~"#0$#10923"' $ #65534" ~ #21845'
+        DO :2 <- .1 $ .2
+(2003)  DO .2 <- :1 ~ '#32768$#32768'
+        DO ;1 SUB #1 <- ;3 SUB #1
+        DO ;1 SUB #2 <- ;3 SUB #2
+        DO ;2 SUB #1 <- ;4 SUB #1
+        DO ;2 SUB #2 <- ;4 SUB #2
+        DO .14 <- #2
+        DO (21785) NEXT
+        DO .3 <- ' " '"';1 SUB #1'~';1 SUB #1'"~#1' $
+                      '"';1 SUB #2'~';1 SUB #2'"~#1' " $ .2' ~ #15
+        DO .3 <- '&"'.3~.3'~#1" $ .14' ~ #2
+        PLEASE DO (2004) NEXT
+        DO ;1 SUB #1 <- ;3 SUB #1
+        DO ;1 SUB #2 <- ;3 SUB #2
+        DO (2005) NEXT
+(2004)  DO (2006) NEXT
+(2005)  PLEASE FORGET #1
+        PLEASE DO .1 <- #49
+        DO (29904) NEXT
+        DO (2002) NEXT
+        PLEASE REINSTATE NEXTING
+        DO ;2 SUB #1 <- ;4 SUB #1
+        DO ;2 SUB #2 <- ;4 SUB #2
+        DO ;1 SUB #1 <- #0
+        DO ;1 SUB #2 <- #0
+        DO (29925) NEXT
+        DO ;2 SUB #1 <- #0
+        DO ;2 SUB #2 <- "?.3$#1"~#1
+        DO (29925) NEXT
+        PLEASE RETRIEVE .6 + ;2 + ;3 + ;4 + :1 + :2 + .1 + .2 + .3 + .14 + .984
+        PLEASE RESUME #50
+(2006)  PLEASE RESUME "?.3$#2"~#3
+
+        DOING (UNP) NEXT SETS ;1 <- :1 / 1000000
+        (WHICH IS ESSENTIALLY DECIMAL TO BINARY CONVERSION)
+(22919) PLEASE STASH :1 + :2 + :3 + :4 + .3
+        DO :2 <- #784 $ #904
+        PLEASE DO (1550) NEXT
+        PLEASE DO ;1 SUB #1 <- :3
+        DO :1 <- :3
+        DO (1540) NEXT
+        DO RETRIEVE :1
+        PLEASE STASH :1
+        DO :2 <- :3
+        PLEASE DO (1510) NEXT
+        PLEASE DO :4 <- #32768 $ #0
+        DO ;2 SUB #1 <- #0
+        DO ;2 SUB #2 <- #0
+        DO :1 <- :3
+        PLEASE DO (2008) NEXT
+(2007)  DON'T RESUME #1
+        DO :2 <- #0$#1024
+        DO :1 <- :3
+        PLEASE (1510) NEXT
+        DO :1 <- :3
+        DO REMEMBER :1
+        DO .3 <- :4~#1
+        DO (2009) NEXT
+        DO :4 <- :4~'#65535$#65534'
+(2008)  DO :2 <- :1
+        PLEASE DO (1500) NEXT
+        DO :1 <- :3
+        DO :2 <- #784 $ #904
+        PLEASE (23438) NEXT
+        DO :2 <- #48576
+        PLEASE DO (1500) NEXT
+        DO .3 <- :3~'#0$#1024'
+        DO :2 <- ;2 SUB '"?.3$#1"~#3'
+        DO :2 <- "'V":2~'#65535$#0'"$":4~'#65535$#0'"' ~ '#0$#65535'" $
+                 "'V":2~'#0$#65535'"$":4~'#0$#65535'"' ~ '#0$#65535'"
+        PLEASE DO ;2 SUB '"?.3$#1"~#3' <- :2
+        PLEASE DO (2007) NEXT
+        DO ;1 SUB #2 <- ;2 SUB #2
+        PLEASE REMEMBER :1
+        PLEASE ABSTAIN FROM (2007)
+        PLEASE RETRIEVE :1 + :2 + :3 + :4 + .3
+        PLEASE RESUME #34
+(2009)  PLEASE DO (2006) NEXT
+        DO REINSTATE (2007)
+        PLEASE FORGET #2
+        DO (2008) NEXT
+
+        DOING (PAK) NEXT SETS :1 <- 1000000 * ;1, TRACKING OVERFLOW
+        (WHICH IS ESSENTIALLY BINARY TO DECIMAL CONVERSION)
+(15478) PLEASE STASH ;1 + ;2 + :2 + :3 + :4
+        DO ;2 SUB #1 <- #784 $ #904
+        DO ;2 SUB #2 <- #0
+        DO (30300) NEXT
+        DO :1 <- ;1 SUB #1
+        DO :2 <- ';1 SUB #2' ~ '#32768$#0'
+        DO (1509) NEXT
+        DO .984 <- "V.984$':4~#2'"~#1
+        PLEASE RETRIEVE ;1 + ;2 + :2 + :3 + :4
+        PLEASE RESUME #1
+
+        DON'T STOP READING YET: TWO IMPORTANT UTILITY ROUTINES REMAIN
+
+        ---------- UTILITIES ----------------------------------------       
+
+        DOING (CMP) NEXT IMMOBILIZES :1 IF :1 < :2
+        HERE I USE A SLICK TRICK FROM THE ORIGINAL INTERCAL DIVISION ROUTINE
+(23438) PLEASE STASH .3 + :1
+        DO :1 <- ' "? ':1~"#65535$#0"' $ ':2~"#65535$#0"' " ~ "#0$#65535"' $
+                 ' "? ':1~"#0$#65535"' $ ':2~"#0$#65535"' " ~ "#0$#65535"'
+        DO .3 <- ':2~:1' ~
+            " ' "? '"?:1~:1"~"#65535$#0"' $ #32768"~"#0$#65535" '
+               $ '"?:1~:1"~"#0$#65535"' "
+        PLEASE RETRIEVE :1
+        DO (2010) NEXT
+        DO (2011) NEXT
+(2010)  DO (2006) NEXT
+        PLEASE IGNORE :1
+(2011)  DO RETRIEVE .3
+        DO RESUME #2
+
+        DOING (TIX) NEXT IS INTENDED TO SIMPLIFY LOOPS ON THE VARIABLE .I
+        IF .I = .1, NEXTING IS TURNED OFF
+        OTHERWISE .I IS INCREASED BY +1 OR -1, WHERE THE
+        INCREMENT IS -1 IF (UP) HAS JUST BEEN ABSTAINED FROM
+(29904) PLEASE STASH .1 + .2 + .3 + .4
+        DO .3 <- "'"?.6$.1"~#21845' ~ '"?.6$.1"~#21845'" ~ #1
+        DO (2012) NEXT
+        PLEASE ABSTAIN FROM NEXTING
+        PLEASE RETRIEVE .1 + .2 + .3 + .4
+        PLEASE RESUME #1
+(2012)  DO (2006) NEXT
+        DO .1 <- .6
+(711)   DO (2013) NEXT
+        PLEASE REINSTATE (711)
+        DO .2 <- #1
+        DO (1010) NEXT
+        DO .6 <- .3
+        DO (2014) NEXT
+(2013)  DO (1020) NEXT
+        DO .6 <- .1
+(2014)  PLEASE RETRIEVE .1 + .2 + .3 + .4
+        DO RESUME #3
+
+        PLEASE NOTIFY THE AUTHOR IF YOU'VE BEEN ABLE TO
+        UNDERSTAND ALL OF THIS; BUT PLEASE DON'T SEND EMAIL
+
+        FINAL PUZZLE: WHAT IS SO INTERESTING ABOUT 885205232?
diff --git a/pit/unlambda.doc b/pit/unlambda.doc
new file mode 100644 (file)
index 0000000..391e205
--- /dev/null
@@ -0,0 +1,928 @@
+Here's a program that we found and added to the pit (with the author's
+permission). This is an Unlambda interpreter; see
+http://esolangs.org/wiki/Unlambda for more information about
+Unlambda. (This must have been a doubly difficult program to write;
+INTERCAL is known for being hard to write programs in, and Unlambda is
+in part known for being hard to write interpreters for, among its
+other claims to fame.) This should run under C-INTERCAL with no
+command-line options given, although I recommend -b, -O and -f. It's
+valid INTERCAL-72 except for Turing Tape IO and COME FROM label.
+
+What follows is the original version of the program, with the author's
+comments interspersed.
+
+# Copyright (C) 2001 Ã˜rjan Johansen
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+        PLEASE .200 <- #8       PLEASE NOTE AMOUNT OF INITIAL MEMORY
+        PLEASE .80 <- #80       PLEASE NOTE END-OF-LINE CHARACTER
+
+        DO (100) NEXT           PLEASE NOTE IO SETUP
+        DO (200) NEXT           PLEASE NOTE MEMORY SETUP
+        DO (300) NEXT           PLEASE NOTE REFERENCE COUNTING SETUP
+        DO (400) NEXT           PLEASE NOTE PARSER TABLE SETUP
+
+        DO (401) NEXT           PLEASE NOTE PARSING
+        DON'T (404) NEXT        PLEASE NOTE PRINTING PROGRAM
+        DO (501) NEXT           PLEASE NOTE EVALUATION
+        DON'T (404) NEXT        PLEASE NOTE PRINTING RESULT
+        DON'T (203) NEXT        PLEASE NOTE MEMORY MAP
+        PLEASE GIVE UP
+
+        PLEASE NOTE DIPLOMATIC RELATIONS
+        PLEASE NOTE .101=LAST READ .102=LAST WRITTEN
+# Character array
+(100)   DO ,101 <- #1
+        PLEASE DO .101 <- #0
+        DO .102 <- #0
+        DO RESUME #1
+# Read a new character
+        PLEASE READ ME A STORY
+(101)   DO (3101) NEXT
+        DO .101 <- .1
+        PLEASE REINSTATE (3101)
+        DO RESUME #1
+(3101)  DON'T THINK YOU CAN HAVE YOUR CAKE AND EAT IT
+        DO WRITE IN ,101
+        PLEASE .1 <- ,101SUB#1
+        DO .2 <- .101
+        DO (1000) NEXT
+        PLEASE DO .101 <- .3~#255
+        PLEASE RESUME '?.1$#512'~'#256$#256'
+# Reverse bits in .2
+(102)   DO .2 <- !2~#15'$!2~#240'
+        DO .2 <- !2~#15'$!2~#240'
+        DO .2 <- !2~#15'$!2~#240'
+        PLEASE RESUME #1
+# Write a new revchar (from .2)
+(103)   PLEASE .1 <- .102
+        DO .102 <- .2
+        DO (1010) NEXT
+        DO ,101SUB#1 <- .3
+        PLEASE READ OUT ,101
+        DO RESUME #1
+
+        DO ASSERT TERRITORIAL CLAIMS
+# Memory initialization, uses value of .200.
+# .204 = items per cell, not used for the (?202) loops!
+(200)   DO .204 <- #7
+        DO ,201 <- .200 BY #32767 BY .204
+(3200)  PLEASE DO .201 <- #0
+        DO .202 <- #16383
+        PLEASE RESUME #1
+
+        PLEASE LET THEM EAT CAKE
+        PLEASE NOTE .201+.202=MEMORY TOP
+# Allocate new cell, .201 (high) and .202 (low) will contain new address.
+# May also be used to traverse memory.
+(201)   DO (3201) NEXT
+(5201)  DON'T (202) NEXT
+        DO COME FROM (7202)
+        PLEASE .1 <- .201
+        DO (4201) NEXT
+        PLEASE REINSTATE (5201)
+        DO RESUME #1
+(4201)  DO (1020) NEXT
+        DO FORGET '#65535~"'?.1$.200'~'#0$#65535'"'~#1
+        DO .201 <- .1
+        PLEASE RESUME #1
+        DON'T STEP ON THE GALOIS FIELD MINES
+(3201)  DO .202 <- "?.202$!202~#16384'"~'#16383$#1'
+        PLEASE RESUME "?!202~.202'$#32768"~"#16384$#16384"
+# Uncontrolled unary operators:
+# "?.1$!1~#16384'"~'#16383$#1'
+# "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0'
+
+        PLEASE STAND BY FOR ASSIMILATION
+# Handle memory enlargement.
+(202)   PLEASE DON'T RESUME #3
+        DO REINSTATE (202)
+        DO FORGET #1
+        PLEASE STASH .203+,202
+# Calculate the new memory size
+          DO .203 <- '.200$#0'~'#65535$#1'
+# Temporarily copy memory
+          DON'T TELL ME WE HAVE TO MOVE IT ALL?
+          DO ,202 <- .200 BY #32767 BY .204
+          DO (3200) NEXT
+          DO ABSTAIN FROM (5201)
+          PLEASE DO (3202) NEXT
+# Enlarge memory and copy back
+          DO ,201 <- .203 BY #32767 BY .204
+          DO (3200) NEXT
+          PLEASE ABSTAIN FROM (5201)
+          PLEASE DO (5202) NEXT
+# Clean up and return
+          DO .200 <- .203
+          DO ABSTAIN FROM (5201)
+          DO ABSTAIN FROM (202)
+(7202)  DO RETRIEVE .203+,202
+(9202)  DO RESUME '?#32768$.203'~'#16384$#32768'
+(3202)  DO COME FROM (4202)
+        PLEASE DO (201) NEXT
+        DO ,202SUB.201.202#1 <- ,201SUB.201.202#1
+        DO ,202SUB.201.202#2 <- ,201SUB.201.202#2
+        DO ,202SUB.201.202#3 <- ,201SUB.201.202#3
+        DO ,202SUB.201.202#4 <- ,201SUB.201.202#4
+        DO ,202SUB.201.202#5 <- ,201SUB.201.202#5
+        DO ,202SUB.201.202#6 <- ,201SUB.201.202#6
+(4202)  DO ,202SUB.201.202#7 <- ,201SUB.201.202#7
+# Remember to expand if .204 changes!
+(5202)  DO COME FROM (6202)
+        PLEASE DO (201) NEXT
+        DO ,201SUB.201.202#1 <- ,202SUB.201.202#1
+        DO ,201SUB.201.202#2 <- ,202SUB.201.202#2
+        DO ,201SUB.201.202#3 <- ,202SUB.201.202#3
+        DO ,201SUB.201.202#4 <- ,202SUB.201.202#4
+        DO ,201SUB.201.202#5 <- ,202SUB.201.202#5
+        DO ,201SUB.201.202#6 <- ,202SUB.201.202#6
+(6202)  DO ,201SUB.201.202#7 <- ,202SUB.201.202#7
+# Remember to expand if .204 changes!
+# List memory and some important addresses
+        DO TELL ME ALL ABOUT YOURSELF
+(203)   DO READ OUT .201+.202+.301+.302+.311+.312
+        DO (3200) NEXT
+        PLEASE REINSTATE (202)
+        DO ABSTAIN FROM (5201)
+        DO (3203) NEXT
+        PLEASE GIVE UP
+        PLEASE COME FROM (4203)
+(3203)  DO (201) NEXT
+        DO READ OUT .201+.202
+        DO READ OUT ,201SUB.201.202#1
+        DO READ OUT ,201SUB.201.202#2
+        DO READ OUT ,201SUB.201.202#3
+        DO READ OUT ,201SUB.201.202#4
+        DO READ OUT ,201SUB.201.202#5
+        DO READ OUT ,201SUB.201.202#6
+(4203)  DO READ OUT ,201SUB.201.202#7
+
+# Reference count memory model
+        PLEASE NOTE
+          #1+#2=REFERENCE COUNT
+          #3+#4=CAR
+          #5+#6=CDR
+          #7=TYPE (TAG$DATA)
+
+        PLEASE WELCOME TO THE BAZAAR
+# Initialize recycle bin
+(300)   PLEASE DO .301 <- #0
+        DO .302 <- #0
+        PLEASE NOTE NIL=.303+.304
+        DO (303) NEXT
+        DO ,201SUB.311.312#1 <- #0
+        PLEASE ,201SUB.311.312#2 <- #0
+        DO ,201SUB.311.312#3 <- .311
+        DO ,201SUB.311.312#4 <- .312
+        DO ,201SUB.311.312#5 <- .311
+        DO ,201SUB.311.312#6 <- .312
+        DO ,201SUB.311.312#7 <- #0
+        PLEASE .303 <- .311
+        DO .304 <- .312
+        DO RESUME #1
+
+# Increment reference count of cell pointed to by .311+.312.
+        PLEASE REPORT NEW PURCHASES HERE
+(301)   PLEASE .1 <- ,201SUB.311.312#2
+        DO .1 <- "?.1$!1~#16384'"~'#16383$#1'
+        DO ,201SUB.311.312#2 <- .1
+        DO (3301) NEXT
+        PLEASE .1 <- ,201SUB.311.312#1
+        DO .1 <- "?.1$!1~#16384'"~'#16383$#1'
+        DO ,201SUB.311.312#1 <- .1
+        DO (3301) NEXT
+        PLEASE NOTE THAT IMMORTALITY IS TREASON
+        DO ,201SUB.311.312#2 <- #0
+        DO RESUME #1
+(3301)  PLEASE RESUME "?!1~.1'$#32768"~"#16384$#16384"
+
+        PLEASE STAND IN LINE FOR TERMINATION
+        DO COME FROM (4302)
+# Decrement reference count of cell pointed to by .311+.312.
+(302)   PLEASE .1 <- ,201SUB.311.312#2
+        DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0'
+        DO ,201SUB.311.312#2 <- .1
+        DO (3302) NEXT
+        PLEASE .1 <- ,201SUB.311.312#1
+        DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0'
+        DO ,201SUB.311.312#1 <- .1
+        DO (3302) NEXT
+# Count reached zero, release cell
+        PLEASE .1 <- .311
+        DO .2 <- .312
+        DO .311 <- ,201SUB.1.2#3
+        DO .312 <- ,201SUB.1.2#4
+        DO ,201SUB.1.2#3 <- .301
+        DO ,201SUB.1.2#4 <- .302
+        PLEASE .301 <- .1
+(4302)  DO .302 <- .2
+(3302)  PLEASE RESUME "?'#65535~"'?.1$#16383'~'#0$#65535'"'$#1"~#3
+
+        PLEASE LET ME INTRODUCE YOU TO .311+.312
+# Receive pointer to cell, possibly recycled, in .311+.312
+(303)   PLEASE (3303) NEXT
+        DO .1 <- .301
+        DO .2 <- .302
+        DO .301 <- ,201SUB.1.2#3
+        DO .302 <- ,201SUB.1.2#4
+        PLEASE STASH .1+.2
+          DO .311 <- ,201SUB.1.2#5
+          DO .312 <- ,201SUB.1.2#6
+          DO (302) NEXT
+        PLEASE RETRIEVE .1+.2
+        DO .311 <- .1
+        DO .312 <- .2
+        DO (5303) NEXT
+(3303)  PLEASE DO (4303) NEXT
+        DO (201) NEXT
+        DO .311 <- .201
+        DO .312 <- .202
+(5303)  DO ,201SUB.311.312#1 <- #32767
+        PLEASE ,201SUB.311.312#2 <- #32767
+# Initialize pointers to null so errors are (hopefully) caught easier.
+        DO ,201SUB.311.312#3 <- #0
+        DO ,201SUB.311.312#5 <- #0
+        PLEASE RESUME #2
+(4303)  DO RESUME "?!301~.301'$#1"~#3
+# As (303), but set CDR to NIL
+(304)   PLEASE (303) NEXT
+        DO ,201SUB.311.312#5 <- .303
+        DO ,201SUB.311.312#6 <- .304
+        DO RESUME #1
+# As (304), but also set CAR to NIL
+(305)   PLEASE (304) NEXT
+        DO ,201SUB.311.312#3 <- .303
+        DO ,201SUB.311.312#4 <- .304
+        DO RESUME #1
+
+# ,401+,402 is a table of pointers to the parameterless
+# primitive functions.
+        PLEASE NOTE `=#1 K=#2 K1=#3 S=#4 S1=#5 S2=#6 I=#7 V=#8 C=#9
+                    CONT=#10 D=#11 D1=#12 .=#13 E=#14 @=#15 ?=#16
+                    |=#17 (R=#18=#13$.80)
+(3400)  PLEASE STASH .1
+          PLEASE (305) NEXT
+        PLEASE RETRIEVE .1
+        DO ,201SUB.311.312#2 <- #0
+        DO ,201SUB.311.312#7 <- .1$#0
+        DO ,401SUB.1 <- .311
+        DO ,402SUB.1 <- .312
+        DO RESUME #1
+(400)   PLEASE ,401 <- #18
+        DO ,402 <- #18
+        DO .1 <- #2     DO (3400) NEXT
+        DO .1 <- #4     DO (3400) NEXT
+        DO .1 <- #7     DO (3400) NEXT
+        DO .1 <- #8     DO (3400) NEXT
+        DO .1 <- #9     DO (3400) NEXT
+        DO .1 <- #11    DO (3400) NEXT
+        DO .1 <- #14    DO (3400) NEXT
+        DO .1 <- #15    DO (3400) NEXT
+        DO .1 <- #17    DO (3400) NEXT
+        DO .1 <- #18    DO (3400) NEXT
+        PLEASE ,201SUB.311.312#7 <- #13$.80
+# ,400 is a character table.
+        PLEASE NOTE 7=ILLEGAL 6=BLANK 5=COMMENT
+                    4=PRIMITIVE 3=KRAPS 2=WHAT 1=SPOT
+(410)   PLEASE ,400 <- #127
+        PLEASE .1 <- #127
+        PLEASE (3410) NEXT
+        DO ,400SUB#8   <- #6 $ #0
+        DO ,400SUB#10  <- #6 $ #0
+        DO ,400SUB#13  <- #6 $ #0
+        DO ,400SUB#32  <- #6 $ #0
+        DO ,400SUB#35  <- #5 $ #0
+        DO ,400SUB#46  <- #1 $ #13
+        DO ,400SUB#63  <- #2 $ #16
+        DO ,400SUB#64  <- #4 $ #15
+        DO ,400SUB#67  <- #4 $ #9
+        DO ,400SUB#68  <- #4 $ #11
+        DO ,400SUB#69  <- #4 $ #14
+        DO ,400SUB#73  <- #4 $ #7
+        DO ,400SUB#75  <- #4 $ #2
+        DO ,400SUB#82  <- #4 $ #18
+        DO ,400SUB#83  <- #4 $ #4
+        DO ,400SUB#86  <- #4 $ #8
+        DO ,400SUB#96  <- #3 $ #0
+        DO ,400SUB#99  <- #4 $ #9
+        DO ,400SUB#100 <- #4 $ #11
+        DO ,400SUB#101 <- #4 $ #14
+        DO ,400SUB#105 <- #4 $ #7
+        DO ,400SUB#107 <- #4 $ #2
+        DO ,400SUB#114 <- #4 $ #18
+        DO ,400SUB#115 <- #4 $ #4
+        DO ,400SUB#118 <- #4 $ #8
+(5410)  DO ,400SUB#124 <- #4 $ #17
+        PLEASE COME FROM (3410)
+(3410)  PLEASE (4410) NEXT
+(4410)  PLEASE ,400SUB.1 <- #7
+        DO .1 <- "?.1$!1~#64'"~'#63$#1'
+        DO RESUME "?!1~.1'$#64"~"#64$#64"
+        DO COME FROM (5410)
+# ,403 is a character table the other way.
+        PLEASE NOTE KSIVCDE@|=#7 K1,S1,D1=#6 S2=#5
+                    CONT=#4 KRAPS=#3 WHAT=#2 SPOT=#1
+(420)   PLEASE ,403 <- #17
+        DO ,403SUB#1  <- #3 $ #6
+        DO ,403SUB#2  <- #7 $ #210
+        DO ,403SUB#3  <- #6 $ #210
+        DO ,403SUB#4  <- #7 $ #202
+        DO ,403SUB#5  <- #6 $ #202
+        DO ,403SUB#6  <- #5 $ #202
+        DO ,403SUB#7  <- #7 $ #146
+        DO ,403SUB#8  <- #7 $ #106
+        DO ,403SUB#9  <- #7 $ #194
+        DO ,403SUB#10 <- #4 $ #0
+        DO ,403SUB#11 <- #7 $ #34
+        DO ,403SUB#12 <- #6 $ #34
+        DO ,403SUB#13 <- #1 $ #116
+        DO ,403SUB#14 <- #7 $ #162
+        DO ,403SUB#15 <- #7 $ #2
+        DO ,403SUB#16 <- #2 $ #252
+        DO ,403SUB#17 <- #7 $ #62
+        PLEASE RESUME #1
+
+# Parser continuation stack cell types
+        PLEASE NOTE 3=TOP 2=BOTH 1=LAST
+# Generate stack top in .401+.402
+(401)   DO (305) NEXT
+        DO .401 <- .311
+        DO .402 <- .312
+        DO ,201SUB.401.402#7 <- #3
+        PLEASE (402) NEXT
+        PLEASE ABSTAIN FROM SUCH MEANINGLESS LANGUAGE
+(4402)  DO RESUME '?"?!101~#128'$!101~.101'"$#2'~#3
+(3402)  DO (3101) NEXT
+        DOG ATE END OF MY ESSAY
+# Parse expression and send to continuation
+        DO COME FROM (5402)
+(402)   DO (3402) NEXT
+        PLEASE (4402) NEXT
+(5402)  DO (412) NEXT
+# Comments
+        DON'T COMMENT
+(412)   PLEASE (422) NEXT
+        DO COME FROM (4412)
+        DO (3402) NEXT
+(4412)  PLEASE (3412) NEXT
+(3412)  DO FORGET "?'#255~"'?.101$#10'~'#0$#65535'"'$#1"~#1
+        DO FORGET "?'#255~"'?.101$#13'~'#0$#65535'"'$#1"~#1
+        DO RESUME #1
+# Primitive functions
+        DO YOU THINK _THIS_ IS PRIMITIVE?
+(422)   PLEASE (432) NEXT
+        DO .311 <- ,401SUB!410~"#0$#31"'
+        DO .312 <- ,402SUB!410~"#0$#31"'
+        DO FORGET #1
+        PLEASE (403) NEXT
+# Application
+        PLEASE FILL OUT THE APPLICATION FORM
+(432)   PLEASE (442) NEXT
+        DO (305) NEXT
+        DO ,201SUB.311.312#5 <- .401
+        DO ,201SUB.311.312#6 <- .402
+        DO ,201SUB.311.312#7 <- #2
+        PLEASE .401 <- .311
+        DO .402 <- .312
+        DO RESUME #3
+# ?x
+        DO WHAT?
+(442)   PLEASE (452) NEXT
+        DO (3402) NEXT
+        DO (305) NEXT
+        DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.101
+        DO FORGET #3
+        PLEASE (403) NEXT
+# .x
+        DOT OR SPOT, WE'RE ALL CIVILIZED PEOPLE HERE
+(452)   PLEASE (462) NEXT
+        DO (3402) NEXT
+        DO (305) NEXT
+        DO .2 <- .101
+        PLEASE (102) NEXT
+        DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.2
+        DO FORGET #4
+        PLEASE (403) NEXT
+(462)   DO .410 <- ,400SUB.101
+        DO RESUME .410~'#7$#0'
+
+# Handle a parsed expression in .311+.312
+# Remember to resume one extra level afterwards if continuing.
+# First top expression
+        DO YOU KNOW THE TOP MAN FOR THIS OPERATION?
+        DO COME FROM (3423)
+(403)   PLEASE (413) NEXT
+        DO STASH .311+.312
+          DO .311 <- .401
+          DO .312 <- .402
+          PLEASE (302) NEXT
+        DO RETRIEVE .311+.312
+# Return all the way from (401)
+        DO RESUME #4
+# Still one subexpression remaining
+        PLEASE CAN I HAVE SOME MORE?
+(413)   PLEASE (423) NEXT
+        DO ,201SUB.401.402#3 <- .311
+        DO ,201SUB.401.402#4 <- .312
+        DO ,201SUB.401.402#7 <- #1
+        PLEASE RESUME #3
+# Application constructed
+        DOUBLE APPLICATION FORM RECEIVED
+(423)   PLEASE (433) NEXT
+        DO .1 <- ,201SUB.401.402#5
+        DO .2 <- ,201SUB.401.402#6
+        DO ,201SUB.401.402#5 <- .311
+        DO ,201SUB.401.402#6 <- .312
+        DO ,201SUB.401.402#7 <- #1$#0
+        DO .311 <- .401
+        PLEASE .312 <- .402
+        DO .401 <- .1
+        DO .402 <- .2
+(3423)  DO FORGET #2
+(433)   PLEASE RESUME ,201SUB.401.402#7
+
+# Unparsing .311+.312
+        DO YOU WANT A REPORT?
+(404)   DO STASH .311+.312
+          PLEASE (6404) NEXT
+        DO RETRIEVE .311+.312
+        DO .2 <- .80 DO (103) NEXT
+        DO RESUME #1
+# Uses weak pointer stack in .401+.402 with NIL at bottom (which is of type 0)
+(6404)  DO .401 <- .303
+        DO .402 <- .304
+        DO COME FROM (4404)
+        PLEASE DO (5404) NEXT
+# Unparse the remainder of the stack
+        PLEASE (3404) NEXT
+        DO .311 <- ,201SUB.401.402#3
+        DO .312 <- ,201SUB.401.402#4
+        PLEASE STASH .311+.312
+          DO .1 <- ,201SUB.401.402#5
+          DO .2 <- ,201SUB.401.402#6
+          DO ,201SUB.401.402#3 <- .303
+          DO ,201SUB.401.402#4 <- .304
+          DO ,201SUB.401.402#5 <- .303
+          DO ,201SUB.401.402#6 <- .304
+          DO .311 <- .401
+          DO .312 <- .402
+          DO .401 <- .1
+          DO .402 <- .2
+          PLEASE DO (302) NEXT
+(4404)  DO RETRIEVE .311+.312
+(3404)  DO RESUME "?"#65535~',201SUB.401.402#7'"$#2"~#3
+        DO COME FROM (5404)
+(5404)  PLEASE DO (414) NEXT
+# Primitives
+        PLEASE DON'T BRING AUSTRALOPITHECI INTO THE HOUSE
+(414)   PLEASE DO (424) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        DO RESUME #2
+# Single parameter
+(424)   PLEASE DO (434) NEXT
+        DO .2 <- #6 DO (103) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        PLEASE COME FROM (4434)
+(3424)  DO .1 <- ,201SUB.311.312#3
+        DO .312 <- ,201SUB.311.312#4
+        DO .311 <- .1
+        DO RESUME #2
+# Two-parameter
+        DOUBLE DOUBLE TOIL AND TROUBLE
+(434)   PLEASE DO (444) NEXT
+        DO .2 <- #6 DO (103) NEXT DO (103) NEXT 
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        DO COME FROM (3454)
+(3434)  PLEASE STASH .311+.312
+          PLEASE DO (303) NEXT
+          DO ,201SUB.311.312#5 <- .401
+          DO ,201SUB.311.312#6 <- .402
+          DO ,201SUB.311.312#7 <- #1
+          DO .401 <- .311 DO .402 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO ,201SUB.401.402#3 <- ,201SUB.311.312#5
+        DO ,201SUB.401.402#4 <- ,201SUB.311.312#6
+(4434)  DO FORGET #1
+# Continuations
+        DO CONTINUATIONS DREAM OF MONADIC SHEEP
+(444)   PLEASE DO (454) NEXT
+        PLEASE DO .2 <- #60   DO (103) NEXT
+        PLEASE DO .2 <- #194  DO (103) NEXT
+        PLEASE DO .2 <- #242  DO (103) NEXT
+        PLEASE DO .2 <- #114  DO (103) NEXT
+        PLEASE DO .2 <- #42   DO (103) NEXT
+        PLEASE DO .2 <- #124  DO (103) NEXT
+        PLEASE RESUME #5
+# Applications
+(454)   PLEASE DO (464) NEXT
+        PLEASE FORGET #2
+        DO .2 <- #6
+(3454)  DO (103) NEXT
+# ?x
+        DON'T LOOK LIKE A QUESTION MARK
+(464)   PLEASE DO (474) NEXT
+        DO .2 <- .411~'#0$#255' DO (103) NEXT
+        PLEASE DO .2 <- .410~'#0$#255'
+        DO (102) NEXT DO (103) NEXT
+        DO RESUME #7
+# .x
+        PLEASE CAN YOU SPOT THE DIFFERENCE?
+(474)   PLEASE DO (484) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO .410 <- .410~'#0$#255'
+        DO .411 <- #7$#74
+        PLEASE DO (3474) NEXT
+        DO (103) NEXT
+        PLEASE DO .2 <- .410
+        DO (103) NEXT
+        DO RESUME #8
+# Resume 1 or 7 times
+(3474)  DO RESUME '"?"#255~'"?.410$.80"~"#0$#65535"'"$#3"$#1'~#11
+(484)   DO .410 <- ,201SUB.311.312#7
+        DO .411 <- ,403SUB!410~"#31$#0"'
+        PLEASE RESUME .411~'#7$#0'
+
+        PLEASE WELCOME TO THE PITS OF EVAL
+# May use up the reference to .311+.312.
+(501)   DO .511 <- .311
+        DO .512 <- .312
+        PLEASE DO (3501) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+# Continuation types
+        PLEASE NOTE EVAL2=1 APPLY=2
+        PLEASE NOTE
+          .601=CURRENT CHARACTER
+          .501+.502=CURRENT CONTINUATION
+          .511+.512=CURRENT EXPRESSION
+(3501)  DO .601 <- #256
+        DO (304) NEXT
+        DO ,201SUB.311.312#3 <- ,401SUB#14
+        DO ,201SUB.311.312#4 <- ,402SUB#14
+        DO ,201SUB.311.312#7 <- #2
+        DO .501 <- .311
+        DO .502 <- .312
+# Evaluate .511+.512 with the continuation given in .501+.502.
+        PLEASE COME FROM (3622)
+        PLEASE COME FROM (7503)
+(502)   DO (3502) NEXT
+        DO (503) NEXT
+(4502)  PLEASE RESUME "?'#15~"',201SUB.511.512#7'~'#30$#0'"'$#1"~#3
+        DO NOTE KRAPS
+        PLEASE COME FROM (5502)
+(3502)  DO (4502) NEXT
+        PLEASE (303) NEXT
+        DO ,201SUB.311.312#5 <- .501
+        DO ,201SUB.311.312#6 <- .502
+        DO ,201SUB.311.312#7 <- #1
+        DO .501 <- .311
+        DO .502 <- .312
+        DO .311 <- ,201SUB.511.512#5
+        DO .312 <- ,201SUB.511.512#6
+        PLEASE DO (301) NEXT
+        DO ,201SUB.501.502#3 <- .311
+        DO ,201SUB.501.502#4 <- .312
+        DO .311 <- ,201SUB.511.512#3
+        DO .312 <- ,201SUB.511.512#4
+        PLEASE DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO .511 <- .311
+(5502)  DO .512 <- .312
+# Send .511+.512 to the current continuation.
+        PLEASE NOTE THAT WE ARE CURRENTLY PROCESSING YOUR APPLICATION
+(503)   DO FORGET #1
+        PLEASE (3503) NEXT
+        DO .311 <- ,201SUB.501.502#3
+        DO .312 <- ,201SUB.501.502#4
+        DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          PLEASE STASH .311+.312
+            DO .311 <- ,201SUB.501.502#5
+            DO .312 <- ,201SUB.501.502#6
+            DO (301) NEXT
+            DO .501 <- .311
+            DO .502 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO (302) NEXT
+(8503)  PLEASE RETRIEVE .311+.312
+(4503)  PLEASE RESUME ,201SUB.501.502#7
+        PLEASE STAY WITH US FOR THE SECOND HALF OF THE SHOW
+(3503)  PLEASE (4503) NEXT
+        DO (5503) NEXT
+        DO FORGET #1
+        DO .311 <- .501
+        DO .312 <- .502
+        PLEASE STASH .311+.312
+          DO .311 <- ,201SUB.501.502#3
+          DO .312 <- ,201SUB.501.502#4
+          DO (301) NEXT
+          PLEASE STASH .311+.312
+            DO .311 <- ,201SUB.501.502#5
+            DO .312 <- ,201SUB.501.502#6
+            PLEASE DO (301) NEXT
+            DO STASH .311+.312
+              DO (304) NEXT
+              DO ,201SUB.311.312#3 <- .511
+              DO ,201SUB.311.312#4 <- .512
+              DO ,201SUB.311.312#7 <- #2
+              DO .501 <- .311
+              DO .502 <- .312
+            PLEASE RETRIEVE .311+.312
+            DO ,201SUB.501.502#5 <- .311
+            DO ,201SUB.501.502#6 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+(7503)  DO (302) NEXT
+        DO D DO DAH
+(6503)  PLEASE RESUME 
+                "?'#15~"'?"',201SUB.511.512#7'~'#31$#0'"$#11'
+                ~"#0$#65535""'$#1"~#3
+(5503)  DO (6503) NEXT
+        DO FORGET #2
+        DO .311 <- ,201SUB.501.502#3
+        DO .312 <- ,201SUB.501.502#4
+        DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO (304) NEXT
+          DO ,201SUB.311.312#7 <- #12$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO ,201SUB.511.512#3 <- .311
+        DO ,201SUB.511.512#4 <- .312
+        DO .311 <- ,201SUB.501.502#5
+        DO .312 <- ,201SUB.501.502#6
+        PLEASE DO (301) NEXT
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          PLEASE DO (302) NEXT
+        DO RETRIEVE .311+.312
+        DO .501 <- .311
+        DO .502 <- .312
+        DO (503) NEXT
+
+        PLEASE LEARN THE DIFFERENCE BETWEEN APPLYS AND ORANGUTANS
+# Apply .311+.312 to .511+.512 with the current continuation .501+.502
+        PLEASE COME FROM (8503)
+        DO COME FROM (603)
+(601)   PLEASE DO (627) NEXT
+        DO (503) NEXT
+        PLEASE DON'T CLIMB INTO THE PIPES
+(627)   PLEASE DO (626) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        PLEASE DO (3627) NEXT
+        DO STASH .311+.312
+          PLEASE DO (305) NEXT
+          DO .2 <- .601
+          DO (102) NEXT
+          DO ,201SUB.311.312#7 <- #13$.2
+          DO .511 <- .311
+          DO .512 <- .312
+        DO RETRIEVE .311+.312
+        PLEASE DO (603) NEXT
+(3627)  PLEASE DO (4627) NEXT
+        DO FORGET #1
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+(4627)  PLEASE RESUME '?.601$#512'~'#256$#256'
+        PLEASE WHAT DID YOU SAY?
+(626)   PLEASE DO (625) NEXT
+        DO .602 <- ',201SUB.311.312#7'~'#0$#255'
+        DO (302) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        PLEASE DO (3626) NEXT
+        DO FORGET #1
+        DO .511 <- ,401SUB#7
+        DO .512 <- ,402SUB#7
+        PLEASE DO (603) NEXT
+(3626)  PLEASE DO (4626) NEXT
+        DO FORGET #2
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+(4626)  DO RESUME "?'#255~"'?.601$.602'~'#0$#255'"'$#2"~#3
+        DON'T FALL INTO THE WHIRLPOOL
+(625)   PLEASE DO (624) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        DO (3625) NEXT
+        DO FORGET #2
+        DO .601 <- .101
+        DO .511 <- ,401SUB#7
+        DO .512 <- ,402SUB#7
+        PLEASE DO (603) NEXT
+(3625)  DO (3101) NEXT
+        PLEASE REINSTATE (3101)
+        DO FORGET #3
+        DO .601 <- #256
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+        DO YOU THINK THIS IS THE END?
+(624)   PLEASE DO (623) NEXT
+        DO RESUME #5
+        PLEASE STAY IN ONE SPOT SO I CAN HIT YOU
+(623)   PLEASE DO (622) NEXT
+        DO .2 <- ',201SUB.311.312#7'~'#0$#255'
+        DO (103) NEXT
+        DO (302) NEXT
+        DO RESUME #5
+        DON'T PROMISE WHAT YOU CAN'T KEEP
+(622)   PLEASE DO (621) NEXT
+        DO FORGET #6
+        DO STASH .311+.312
+          PLEASE DO (303) NEXT
+          DO ,201SUB.311.312#3 <- .511
+          DO ,201SUB.311.312#4 <- .512
+          DO ,201SUB.311.312#5 <- .501
+          DO ,201SUB.311.312#6 <- .502
+          DO ,201SUB.311.312#7 <- #1
+          DO .501 <- .311
+          DO .502 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+(3622)  DO (302) NEXT
+        DO EXPECT SOME DELAY
+(621)   PLEASE DO (620) NEXT
+        DO RESUME #7
+        PLEASE CONTINUE, NOTHING TO SEE HERE...
+(620)   PLEASE DO (619) NEXT
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          PLEASE .501 <- .311
+          PLEASE .502 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        DO RESUME #8
+        DO CALL ME ANY TIME
+(619)   PLEASE DO (618) NEXT
+        DO FORGET #8
+        DO .311 <- .511
+        DO .312 <- .512
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          DO (301) NEXT
+          PLEASE DO (304) NEXT
+          DO ,201SUB.311.312#3 <- .501
+          DO ,201SUB.311.312#4 <- .502
+          DO ,201SUB.311.312#7 <- #10$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (603) NEXT
+        DON'T LOOK INTO THE ABYSS OR THE ABYSS LOOKS BACK INTO YOU
+(618)   PLEASE DO (617) NEXT
+        DO STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO .511 <- .311
+        DO .512 <- .312
+        DO RESUME #10
+        DOESN'T REALLY DO MUCH
+(617)   PLEASE DO (616) NEXT
+        DO RESUME #11
+        DO WATCH OUT FOR SUBSTITUTES
+(616)   PLEASE DO (615) NEXT
+        DO FORGET #11
+        DO STASH .311+.312+.511+.512
+            DO .311 <- .511
+            DO .312 <- .512
+            DO (301) NEXT
+            PLEASE DO (303) NEXT
+            DO ,201SUB.311.312#5 <- .501
+            DO ,201SUB.311.312#6 <- .502
+            DO ,201SUB.311.312#7 <- #1
+            DO .501 <- .311
+            DO .502 <- .312
+            PLEASE DO (303) NEXT
+            DO ,201SUB.311.312#5 <- .511
+            DO ,201SUB.311.312#6 <- .512
+            DO ,201SUB.311.312#7 <- #1$#0
+            DO ,201SUB.501.502#3 <- .311
+            DO ,201SUB.501.502#4 <- .312
+            DO .511 <- .311
+            DO .512 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO STASH .311+.312
+            DO .1 <- ,201SUB.311.312#5
+            DO .312 <- ,201SUB.311.312#6
+            DO .311 <- .1
+            DO (301) NEXT
+            DO ,201SUB.511.512#3 <- .311
+            DO ,201SUB.511.512#4 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO STASH .311+.312
+            DO .1 <- ,201SUB.311.312#3
+            DO .312 <- ,201SUB.311.312#4
+            DO .311 <- .1
+            PLEASE DO (301) NEXT
+            DO .511 <- .311
+            DO .512 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO (302) NEXT
+          DO .311 <- .511
+          DO .312 <- .512
+        PLEASE RETRIEVE .511+.512
+        DO (603) NEXT
+(615)   PLEASE DO (614) NEXT
+        DO STASH .311+.312
+          DO (303) NEXT
+          DO ,201SUB.311.312#5 <- .511
+          DO ,201SUB.311.312#6 <- .512
+          DO ,201SUB.311.312#7 <- #6$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          PLEASE DO (301) NEXT
+          DO ,201SUB.511.512#3 <- .311
+          DO ,201SUB.511.512#4 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        PLEASE RESUME #13
+(614)   PLEASE DO (613) NEXT
+        DO FORGET #13
+        DO .602 <- #5$#0
+        DO (602) NEXT
+        DON'T WORRY ABOUT THE CONSTANT NOISE
+(613)   PLEASE DO (612) NEXT
+        DO STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        PLEASE RESUME #15
+(612)   PLEASE DO (611) NEXT
+        DO FORGET #15
+        DO .602 <- #3$#0
+        DO (602) NEXT
+(611)   PLEASE DO (610) NEXT
+        PLEASE HOW DID YOU GET HERE?
+(610)   PLEASE RESUME ',201SUB.311.312#7'~'#31$#0'
+# Only for primitives!
+(602)   DO (304) NEXT
+        DO ,201SUB.311.312#3 <- .511
+        DO ,201SUB.311.312#4 <- .512
+        DO ,201SUB.311.312#7 <- .602
+        DO .511 <- .311
+        DO .512 <- .312
+        PLEASE RESUME #2
+(603)   PLEASE FORGET #2
diff --git a/pit/unlambda.i b/pit/unlambda.i
new file mode 100644 (file)
index 0000000..11fc4b3
--- /dev/null
@@ -0,0 +1,857 @@
+       PLEASE NOTE
+       
+Copyright (C) 2001 Ã˜rjan Johansen
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+        PLEASE .200 <- #8       PLEASE NOTE AMOUNT OF INITIAL MEMORY
+        PLEASE .80 <- #80       PLEASE NOTE END-OF-LINE CHARACTER
+
+        DO (100) NEXT           PLEASE NOTE IO SETUP
+        DO (200) NEXT           PLEASE NOTE MEMORY SETUP
+        DO (300) NEXT           PLEASE NOTE REFERENCE COUNTING SETUP
+        DO (400) NEXT           PLEASE NOTE PARSER TABLE SETUP
+
+        DO (401) NEXT           PLEASE NOTE PARSING
+        DON'T (404) NEXT        PLEASE NOTE PRINTING PROGRAM
+        DO (501) NEXT           PLEASE NOTE EVALUATION
+        DON'T (404) NEXT        PLEASE NOTE PRINTING RESULT
+        DON'T (203) NEXT        PLEASE NOTE MEMORY MAP
+        PLEASE GIVE UP
+
+        PLEASE NOTE DIPLOMATIC RELATIONS
+        PLEASE NOTE .101=LAST READ .102=LAST WRITTEN
+(100)   DO ,101 <- #1
+        PLEASE DO .101 <- #0
+        DO .102 <- #0
+        DO RESUME #1
+        PLEASE READ ME A STORY
+(101)   DO (3101) NEXT
+        DO .101 <- .1
+        PLEASE REINSTATE (3101)
+        DO RESUME #1
+(3101)  DON'T THINK YOU CAN HAVE YOUR CAKE AND EAT IT
+        DO WRITE IN ,101
+        PLEASE .1 <- ,101SUB#1
+        DO .2 <- .101
+        DO (1000) NEXT
+        PLEASE DO .101 <- .3~#255
+        PLEASE RESUME '?.1$#512'~'#256$#256'
+(102)   DO .2 <- !2~#15'$!2~#240'
+        DO .2 <- !2~#15'$!2~#240'
+        DO .2 <- !2~#15'$!2~#240'
+        PLEASE RESUME #1
+(103)   PLEASE .1 <- .102
+        DO .102 <- .2
+        DO (1010) NEXT
+        DO ,101SUB#1 <- .3
+        PLEASE READ OUT ,101
+        DO RESUME #1
+
+        DO ASSERT TERRITORIAL CLAIMS
+(200)   DO .204 <- #7
+        DO ,201 <- .200 BY #32767 BY .204
+(3200)  PLEASE DO .201 <- #0
+        DO .202 <- #16383
+        PLEASE RESUME #1
+
+        PLEASE LET THEM EAT CAKE
+        PLEASE NOTE .201+.202=MEMORY TOP
+(201)   DO (3201) NEXT
+(5201)  DON'T (202) NEXT
+        DO COME FROM (7202)
+        PLEASE .1 <- .201
+        DO (4201) NEXT
+        PLEASE REINSTATE (5201)
+        DO RESUME #1
+(4201)  DO (1020) NEXT
+        DO FORGET '#65535~"'?.1$.200'~'#0$#65535'"'~#1
+        DO .201 <- .1
+        PLEASE RESUME #1
+        DON'T STEP ON THE GALOIS FIELD MINES
+(3201)  DO .202 <- "?.202$!202~#16384'"~'#16383$#1'
+        PLEASE RESUME "?!202~.202'$#32768"~"#16384$#16384"
+
+        PLEASE STAND BY FOR ASSIMILATION
+(202)   PLEASE DON'T RESUME #3
+        DO REINSTATE (202)
+        DO FORGET #1
+        PLEASE STASH .203+,202
+          DO .203 <- '.200$#0'~'#65535$#1'
+          DON'T TELL ME WE HAVE TO MOVE IT ALL?
+          DO ,202 <- .200 BY #32767 BY .204
+          DO (3200) NEXT
+          DO ABSTAIN FROM (5201)
+          PLEASE DO (3202) NEXT
+          DO ,201 <- .203 BY #32767 BY .204
+          DO (3200) NEXT
+          PLEASE ABSTAIN FROM (5201)
+          PLEASE DO (5202) NEXT
+          DO .200 <- .203
+          DO ABSTAIN FROM (5201)
+          DO ABSTAIN FROM (202)
+(7202)  DO RETRIEVE .203+,202
+(9202)  DO RESUME '?#32768$.203'~'#16384$#32768'
+(3202)  DO COME FROM (4202)
+        PLEASE DO (201) NEXT
+        DO ,202SUB.201.202#1 <- ,201SUB.201.202#1
+        DO ,202SUB.201.202#2 <- ,201SUB.201.202#2
+        DO ,202SUB.201.202#3 <- ,201SUB.201.202#3
+        DO ,202SUB.201.202#4 <- ,201SUB.201.202#4
+        DO ,202SUB.201.202#5 <- ,201SUB.201.202#5
+        DO ,202SUB.201.202#6 <- ,201SUB.201.202#6
+(4202)  DO ,202SUB.201.202#7 <- ,201SUB.201.202#7
+(5202)  DO COME FROM (6202)
+        PLEASE DO (201) NEXT
+        DO ,201SUB.201.202#1 <- ,202SUB.201.202#1
+        DO ,201SUB.201.202#2 <- ,202SUB.201.202#2
+        DO ,201SUB.201.202#3 <- ,202SUB.201.202#3
+        DO ,201SUB.201.202#4 <- ,202SUB.201.202#4
+        DO ,201SUB.201.202#5 <- ,202SUB.201.202#5
+        DO ,201SUB.201.202#6 <- ,202SUB.201.202#6
+(6202)  DO ,201SUB.201.202#7 <- ,202SUB.201.202#7
+        DO TELL ME ALL ABOUT YOURSELF
+(203)   DO READ OUT .201+.202+.301+.302+.311+.312
+        DO (3200) NEXT
+        PLEASE REINSTATE (202)
+        DO ABSTAIN FROM (5201)
+        DO (3203) NEXT
+        PLEASE GIVE UP
+        PLEASE COME FROM (4203)
+(3203)  DO (201) NEXT
+        DO READ OUT .201+.202
+        DO READ OUT ,201SUB.201.202#1
+        DO READ OUT ,201SUB.201.202#2
+        DO READ OUT ,201SUB.201.202#3
+        DO READ OUT ,201SUB.201.202#4
+        DO READ OUT ,201SUB.201.202#5
+        DO READ OUT ,201SUB.201.202#6
+(4203)  DO READ OUT ,201SUB.201.202#7
+
+        PLEASE NOTE
+          #1+#2=REFERENCE COUNT
+          #3+#4=CAR
+          #5+#6=CDR
+          #7=TYPE (TAG$DATA)
+
+        PLEASE WELCOME TO THE BAZAAR
+(300)   PLEASE DO .301 <- #0
+        DO .302 <- #0
+        PLEASE NOTE NIL=.303+.304
+        DO (303) NEXT
+        DO ,201SUB.311.312#1 <- #0
+        PLEASE ,201SUB.311.312#2 <- #0
+        DO ,201SUB.311.312#3 <- .311
+        DO ,201SUB.311.312#4 <- .312
+        DO ,201SUB.311.312#5 <- .311
+        DO ,201SUB.311.312#6 <- .312
+        DO ,201SUB.311.312#7 <- #0
+        PLEASE .303 <- .311
+        DO .304 <- .312
+        DO RESUME #1
+
+        PLEASE REPORT NEW PURCHASES HERE
+(301)   PLEASE .1 <- ,201SUB.311.312#2
+        DO .1 <- "?.1$!1~#16384'"~'#16383$#1'
+        DO ,201SUB.311.312#2 <- .1
+        DO (3301) NEXT
+        PLEASE .1 <- ,201SUB.311.312#1
+        DO .1 <- "?.1$!1~#16384'"~'#16383$#1'
+        DO ,201SUB.311.312#1 <- .1
+        DO (3301) NEXT
+        PLEASE NOTE THAT IMMORTALITY IS TREASON
+        DO ,201SUB.311.312#2 <- #0
+        DO RESUME #1
+(3301)  PLEASE RESUME "?!1~.1'$#32768"~"#16384$#16384"
+
+        PLEASE STAND IN LINE FOR TERMINATION
+        DO COME FROM (4302)
+(302)   PLEASE .1 <- ,201SUB.311.312#2
+        DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0'
+        DO ,201SUB.311.312#2 <- .1
+        DO (3302) NEXT
+        PLEASE .1 <- ,201SUB.311.312#1
+        DO .1 <- "?#0$'"?.1$!1~#2'"~"#0$#65535"'"~'#49151$#0'
+        DO ,201SUB.311.312#1 <- .1
+        DO (3302) NEXT
+        PLEASE .1 <- .311
+        DO .2 <- .312
+        DO .311 <- ,201SUB.1.2#3
+        DO .312 <- ,201SUB.1.2#4
+        DO ,201SUB.1.2#3 <- .301
+        DO ,201SUB.1.2#4 <- .302
+        PLEASE .301 <- .1
+(4302)  DO .302 <- .2
+(3302)  PLEASE RESUME "?'#65535~"'?.1$#16383'~'#0$#65535'"'$#1"~#3
+
+        PLEASE LET ME INTRODUCE YOU TO .311+.312
+(303)   PLEASE (3303) NEXT
+        DO .1 <- .301
+        DO .2 <- .302
+        DO .301 <- ,201SUB.1.2#3
+        DO .302 <- ,201SUB.1.2#4
+        PLEASE STASH .1+.2
+          DO .311 <- ,201SUB.1.2#5
+          DO .312 <- ,201SUB.1.2#6
+          DO (302) NEXT
+        PLEASE RETRIEVE .1+.2
+        DO .311 <- .1
+        DO .312 <- .2
+        DO (5303) NEXT
+(3303)  PLEASE DO (4303) NEXT
+        DO (201) NEXT
+        DO .311 <- .201
+        DO .312 <- .202
+(5303)  DO ,201SUB.311.312#1 <- #32767
+        PLEASE ,201SUB.311.312#2 <- #32767
+        DO ,201SUB.311.312#3 <- #0
+        DO ,201SUB.311.312#5 <- #0
+        PLEASE RESUME #2
+(4303)  DO RESUME "?!301~.301'$#1"~#3
+(304)   PLEASE (303) NEXT
+        DO ,201SUB.311.312#5 <- .303
+        DO ,201SUB.311.312#6 <- .304
+        DO RESUME #1
+(305)   PLEASE (304) NEXT
+        DO ,201SUB.311.312#3 <- .303
+        DO ,201SUB.311.312#4 <- .304
+        DO RESUME #1
+
+        PLEASE NOTE `=#1 K=#2 K1=#3 S=#4 S1=#5 S2=#6 I=#7 V=#8 C=#9
+                    CONT=#10 D=#11 D1=#12 .=#13 E=#14 @=#15 ?=#16
+                    |=#17 (R=#18=#13$.80)
+(3400)  PLEASE STASH .1
+          PLEASE (305) NEXT
+        PLEASE RETRIEVE .1
+        DO ,201SUB.311.312#2 <- #0
+        DO ,201SUB.311.312#7 <- .1$#0
+        DO ,401SUB.1 <- .311
+        DO ,402SUB.1 <- .312
+        DO RESUME #1
+(400)   PLEASE ,401 <- #18
+        DO ,402 <- #18
+        DO .1 <- #2     DO (3400) NEXT
+        DO .1 <- #4     DO (3400) NEXT
+        DO .1 <- #7     DO (3400) NEXT
+        DO .1 <- #8     DO (3400) NEXT
+        DO .1 <- #9     DO (3400) NEXT
+        DO .1 <- #11    DO (3400) NEXT
+        DO .1 <- #14    DO (3400) NEXT
+        DO .1 <- #15    DO (3400) NEXT
+        DO .1 <- #17    DO (3400) NEXT
+        DO .1 <- #18    DO (3400) NEXT
+        PLEASE ,201SUB.311.312#7 <- #13$.80
+        PLEASE NOTE 7=ILLEGAL 6=BLANK 5=COMMENT
+                    4=PRIMITIVE 3=KRAPS 2=WHAT 1=SPOT
+(410)   PLEASE ,400 <- #127
+        PLEASE .1 <- #127
+        PLEASE (3410) NEXT
+        DO ,400SUB#8   <- #6 $ #0
+        DO ,400SUB#10  <- #6 $ #0
+        DO ,400SUB#13  <- #6 $ #0
+        DO ,400SUB#32  <- #6 $ #0
+        DO ,400SUB#35  <- #5 $ #0
+        DO ,400SUB#46  <- #1 $ #13
+        DO ,400SUB#63  <- #2 $ #16
+        DO ,400SUB#64  <- #4 $ #15
+        DO ,400SUB#67  <- #4 $ #9
+        DO ,400SUB#68  <- #4 $ #11
+        DO ,400SUB#69  <- #4 $ #14
+        DO ,400SUB#73  <- #4 $ #7
+        DO ,400SUB#75  <- #4 $ #2
+        DO ,400SUB#82  <- #4 $ #18
+        DO ,400SUB#83  <- #4 $ #4
+        DO ,400SUB#86  <- #4 $ #8
+        DO ,400SUB#96  <- #3 $ #0
+        DO ,400SUB#99  <- #4 $ #9
+        DO ,400SUB#100 <- #4 $ #11
+        DO ,400SUB#101 <- #4 $ #14
+        DO ,400SUB#105 <- #4 $ #7
+        DO ,400SUB#107 <- #4 $ #2
+        DO ,400SUB#114 <- #4 $ #18
+        DO ,400SUB#115 <- #4 $ #4
+        DO ,400SUB#118 <- #4 $ #8
+(5410)  DO ,400SUB#124 <- #4 $ #17
+        PLEASE COME FROM (3410)
+(3410)  PLEASE (4410) NEXT
+(4410)  PLEASE ,400SUB.1 <- #7
+        DO .1 <- "?.1$!1~#64'"~'#63$#1'
+        DO RESUME "?!1~.1'$#64"~"#64$#64"
+        DO COME FROM (5410)
+        PLEASE NOTE KSIVCDE@|=#7 K1,S1,D1=#6 S2=#5
+                    CONT=#4 KRAPS=#3 WHAT=#2 SPOT=#1
+(420)   PLEASE ,403 <- #17
+        DO ,403SUB#1  <- #3 $ #6
+        DO ,403SUB#2  <- #7 $ #210
+        DO ,403SUB#3  <- #6 $ #210
+        DO ,403SUB#4  <- #7 $ #202
+        DO ,403SUB#5  <- #6 $ #202
+        DO ,403SUB#6  <- #5 $ #202
+        DO ,403SUB#7  <- #7 $ #146
+        DO ,403SUB#8  <- #7 $ #106
+        DO ,403SUB#9  <- #7 $ #194
+        DO ,403SUB#10 <- #4 $ #0
+        DO ,403SUB#11 <- #7 $ #34
+        DO ,403SUB#12 <- #6 $ #34
+        DO ,403SUB#13 <- #1 $ #116
+        DO ,403SUB#14 <- #7 $ #162
+        DO ,403SUB#15 <- #7 $ #2
+        DO ,403SUB#16 <- #2 $ #252
+        DO ,403SUB#17 <- #7 $ #62
+        PLEASE RESUME #1
+
+        PLEASE NOTE 3=TOP 2=BOTH 1=LAST
+(401)   DO (305) NEXT
+        DO .401 <- .311
+        DO .402 <- .312
+        DO ,201SUB.401.402#7 <- #3
+        PLEASE (402) NEXT
+        PLEASE ABSTAIN FROM SUCH MEANINGLESS LANGUAGE
+       PLEASE NOTE (AIS) I PATCHED THE NEXT LINE TO AVOID A ONESPOT
+                         OVERFLOW BUG BY ADDING ~#65535
+(4402)  DO RESUME '?'"?!101~#128'$!101~.101'"~#65535'$#2'~#3
+(3402)  DO (3101) NEXT
+        DOG ATE END OF MY ESSAY
+        DO COME FROM (5402)
+(402)   DO (3402) NEXT
+        PLEASE (4402) NEXT
+(5402)  DO (412) NEXT
+        DON'T COMMENT
+(412)   PLEASE (422) NEXT
+        DO COME FROM (4412)
+        DO (3402) NEXT
+(4412)  PLEASE (3412) NEXT
+(3412)  DO FORGET "?'#255~"'?.101$#10'~'#0$#65535'"'$#1"~#1
+        DO FORGET "?'#255~"'?.101$#13'~'#0$#65535'"'$#1"~#1
+        DO RESUME #1
+        DO YOU THINK _THIS_ IS PRIMITIVE?
+(422)   PLEASE (432) NEXT
+        DO .311 <- ,401SUB!410~"#0$#31"'
+        DO .312 <- ,402SUB!410~"#0$#31"'
+        DO FORGET #1
+        PLEASE (403) NEXT
+        PLEASE FILL OUT THE APPLICATION FORM
+(432)   PLEASE (442) NEXT
+        DO (305) NEXT
+        DO ,201SUB.311.312#5 <- .401
+        DO ,201SUB.311.312#6 <- .402
+        DO ,201SUB.311.312#7 <- #2
+        PLEASE .401 <- .311
+        DO .402 <- .312
+        DO RESUME #3
+        DO WHAT?
+(442)   PLEASE (452) NEXT
+        DO (3402) NEXT
+        DO (305) NEXT
+        DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.101
+        DO FORGET #3
+        PLEASE (403) NEXT
+        DOT OR SPOT, WE'RE ALL CIVILIZED PEOPLE HERE
+(452)   PLEASE (462) NEXT
+        DO (3402) NEXT
+        DO (305) NEXT
+        DO .2 <- .101
+        PLEASE (102) NEXT
+        DO ,201SUB.311.312#7 <- !410~"#0$#31"'$.2
+        DO FORGET #4
+        PLEASE (403) NEXT
+(462)   DO .410 <- ,400SUB.101
+        DO RESUME .410~'#7$#0'
+
+        DO YOU KNOW THE TOP MAN FOR THIS OPERATION?
+        DO COME FROM (3423)
+(403)   PLEASE (413) NEXT
+        DO STASH .311+.312
+          DO .311 <- .401
+          DO .312 <- .402
+          PLEASE (302) NEXT
+        DO RETRIEVE .311+.312
+        DO RESUME #4
+        PLEASE CAN I HAVE SOME MORE?
+(413)   PLEASE (423) NEXT
+        DO ,201SUB.401.402#3 <- .311
+        DO ,201SUB.401.402#4 <- .312
+        DO ,201SUB.401.402#7 <- #1
+        PLEASE RESUME #3
+        DOUBLE APPLICATION FORM RECEIVED
+(423)   PLEASE (433) NEXT
+        DO .1 <- ,201SUB.401.402#5
+        DO .2 <- ,201SUB.401.402#6
+        DO ,201SUB.401.402#5 <- .311
+        DO ,201SUB.401.402#6 <- .312
+        DO ,201SUB.401.402#7 <- #1$#0
+        DO .311 <- .401
+        PLEASE .312 <- .402
+        DO .401 <- .1
+        DO .402 <- .2
+(3423)  DO FORGET #2
+(433)   PLEASE RESUME ,201SUB.401.402#7
+
+        DO YOU WANT A REPORT?
+(404)   DO STASH .311+.312
+          PLEASE (6404) NEXT
+        DO RETRIEVE .311+.312
+        DO .2 <- .80 DO (103) NEXT
+        DO RESUME #1
+(6404)  DO .401 <- .303
+        DO .402 <- .304
+        DO COME FROM (4404)
+        PLEASE DO (5404) NEXT
+        PLEASE (3404) NEXT
+        DO .311 <- ,201SUB.401.402#3
+        DO .312 <- ,201SUB.401.402#4
+        PLEASE STASH .311+.312
+          DO .1 <- ,201SUB.401.402#5
+          DO .2 <- ,201SUB.401.402#6
+          DO ,201SUB.401.402#3 <- .303
+          DO ,201SUB.401.402#4 <- .304
+          DO ,201SUB.401.402#5 <- .303
+          DO ,201SUB.401.402#6 <- .304
+          DO .311 <- .401
+          DO .312 <- .402
+          DO .401 <- .1
+          DO .402 <- .2
+          PLEASE DO (302) NEXT
+(4404)  DO RETRIEVE .311+.312
+(3404)  DO RESUME "?"#65535~',201SUB.401.402#7'"$#2"~#3
+        DO COME FROM (5404)
+(5404)  PLEASE DO (414) NEXT
+        PLEASE DON'T BRING AUSTRALOPITHECI INTO THE HOUSE
+(414)   PLEASE DO (424) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        DO RESUME #2
+(424)   PLEASE DO (434) NEXT
+        DO .2 <- #6 DO (103) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        PLEASE COME FROM (4434)
+(3424)  DO .1 <- ,201SUB.311.312#3
+        DO .312 <- ,201SUB.311.312#4
+        DO .311 <- .1
+        DO RESUME #2
+        DOUBLE DOUBLE TOIL AND TROUBLE
+(434)   PLEASE DO (444) NEXT
+        DO .2 <- #6 DO (103) NEXT DO (103) NEXT 
+        DO .2 <- .411~'#0$#255'
+        DO (103) NEXT
+        DO COME FROM (3454)
+(3434)  PLEASE STASH .311+.312
+          PLEASE DO (303) NEXT
+          DO ,201SUB.311.312#5 <- .401
+          DO ,201SUB.311.312#6 <- .402
+          DO ,201SUB.311.312#7 <- #1
+          DO .401 <- .311 DO .402 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO ,201SUB.401.402#3 <- ,201SUB.311.312#5
+        DO ,201SUB.401.402#4 <- ,201SUB.311.312#6
+(4434)  DO FORGET #1
+        DO CONTINUATIONS DREAM OF MONADIC SHEEP
+(444)   PLEASE DO (454) NEXT
+        PLEASE DO .2 <- #60   DO (103) NEXT
+        PLEASE DO .2 <- #194  DO (103) NEXT
+        PLEASE DO .2 <- #242  DO (103) NEXT
+        PLEASE DO .2 <- #114  DO (103) NEXT
+        PLEASE DO .2 <- #42   DO (103) NEXT
+        PLEASE DO .2 <- #124  DO (103) NEXT
+        PLEASE RESUME #5
+(454)   PLEASE DO (464) NEXT
+        PLEASE FORGET #2
+        DO .2 <- #6
+(3454)  DO (103) NEXT
+        DON'T LOOK LIKE A QUESTION MARK
+(464)   PLEASE DO (474) NEXT
+        DO .2 <- .411~'#0$#255' DO (103) NEXT
+        PLEASE DO .2 <- .410~'#0$#255'
+        DO (102) NEXT DO (103) NEXT
+        DO RESUME #7
+        PLEASE CAN YOU SPOT THE DIFFERENCE?
+(474)   PLEASE DO (484) NEXT
+        DO .2 <- .411~'#0$#255'
+        DO .410 <- .410~'#0$#255'
+        DO .411 <- #7$#74
+        PLEASE DO (3474) NEXT
+        DO (103) NEXT
+        PLEASE DO .2 <- .410
+        DO (103) NEXT
+        DO RESUME #8
+(3474)  DO RESUME '"?"#255~'"?.410$.80"~"#0$#65535"'"$#3"$#1'~#11
+(484)   DO .410 <- ,201SUB.311.312#7
+        DO .411 <- ,403SUB!410~"#31$#0"'
+        PLEASE RESUME .411~'#7$#0'
+
+        PLEASE WELCOME TO THE PITS OF EVAL
+(501)   DO .511 <- .311
+        DO .512 <- .312
+        PLEASE DO (3501) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        PLEASE NOTE EVAL2=1 APPLY=2
+        PLEASE NOTE
+          .601=CURRENT CHARACTER
+          .501+.502=CURRENT CONTINUATION
+          .511+.512=CURRENT EXPRESSION
+(3501)  DO .601 <- #256
+        DO (304) NEXT
+        DO ,201SUB.311.312#3 <- ,401SUB#14
+        DO ,201SUB.311.312#4 <- ,402SUB#14
+        DO ,201SUB.311.312#7 <- #2
+        DO .501 <- .311
+        DO .502 <- .312
+        PLEASE COME FROM (3622)
+        PLEASE COME FROM (7503)
+(502)   DO (3502) NEXT
+        DO (503) NEXT
+(4502)  PLEASE RESUME "?'#15~"',201SUB.511.512#7'~'#30$#0'"'$#1"~#3
+        DO NOTE KRAPS
+        PLEASE COME FROM (5502)
+(3502)  DO (4502) NEXT
+        PLEASE (303) NEXT
+        DO ,201SUB.311.312#5 <- .501
+        DO ,201SUB.311.312#6 <- .502
+        DO ,201SUB.311.312#7 <- #1
+        DO .501 <- .311
+        DO .502 <- .312
+        DO .311 <- ,201SUB.511.512#5
+        DO .312 <- ,201SUB.511.512#6
+        PLEASE DO (301) NEXT
+        DO ,201SUB.501.502#3 <- .311
+        DO ,201SUB.501.502#4 <- .312
+        DO .311 <- ,201SUB.511.512#3
+        DO .312 <- ,201SUB.511.512#4
+        PLEASE DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO .511 <- .311
+(5502)  DO .512 <- .312
+        PLEASE NOTE THAT WE ARE CURRENTLY PROCESSING YOUR APPLICATION
+(503)   DO FORGET #1
+        PLEASE (3503) NEXT
+        DO .311 <- ,201SUB.501.502#3
+        DO .312 <- ,201SUB.501.502#4
+        DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          PLEASE STASH .311+.312
+            DO .311 <- ,201SUB.501.502#5
+            DO .312 <- ,201SUB.501.502#6
+            DO (301) NEXT
+            DO .501 <- .311
+            DO .502 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO (302) NEXT
+(8503)  PLEASE RETRIEVE .311+.312
+(4503)  PLEASE RESUME ,201SUB.501.502#7
+        PLEASE STAY WITH US FOR THE SECOND HALF OF THE SHOW
+(3503)  PLEASE (4503) NEXT
+        DO (5503) NEXT
+        DO FORGET #1
+        DO .311 <- .501
+        DO .312 <- .502
+        PLEASE STASH .311+.312
+          DO .311 <- ,201SUB.501.502#3
+          DO .312 <- ,201SUB.501.502#4
+          DO (301) NEXT
+          PLEASE STASH .311+.312
+            DO .311 <- ,201SUB.501.502#5
+            DO .312 <- ,201SUB.501.502#6
+            PLEASE DO (301) NEXT
+            DO STASH .311+.312
+              DO (304) NEXT
+              DO ,201SUB.311.312#3 <- .511
+              DO ,201SUB.311.312#4 <- .512
+              DO ,201SUB.311.312#7 <- #2
+              DO .501 <- .311
+              DO .502 <- .312
+            PLEASE RETRIEVE .311+.312
+            DO ,201SUB.501.502#5 <- .311
+            DO ,201SUB.501.502#6 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+(7503)  DO (302) NEXT
+        DO D DO DAH
+(6503)  PLEASE RESUME 
+                "?'#15~"'?"',201SUB.511.512#7'~'#31$#0'"$#11'
+                ~"#0$#65535""'$#1"~#3
+(5503)  DO (6503) NEXT
+        DO FORGET #2
+        DO .311 <- ,201SUB.501.502#3
+        DO .312 <- ,201SUB.501.502#4
+        DO (301) NEXT
+        PLEASE STASH .311+.312
+          DO (304) NEXT
+          DO ,201SUB.311.312#7 <- #12$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO ,201SUB.511.512#3 <- .311
+        DO ,201SUB.511.512#4 <- .312
+        DO .311 <- ,201SUB.501.502#5
+        DO .312 <- ,201SUB.501.502#6
+        PLEASE DO (301) NEXT
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          PLEASE DO (302) NEXT
+        DO RETRIEVE .311+.312
+        DO .501 <- .311
+        DO .502 <- .312
+        DO (503) NEXT
+
+        PLEASE LEARN THE DIFFERENCE BETWEEN APPLYS AND ORANGUTANS
+        PLEASE COME FROM (8503)
+        DO COME FROM (603)
+(601)   PLEASE DO (627) NEXT
+        DO (503) NEXT
+        PLEASE DON'T CLIMB INTO THE PIPES
+(627)   PLEASE DO (626) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        PLEASE DO (3627) NEXT
+        DO STASH .311+.312
+          PLEASE DO (305) NEXT
+          DO .2 <- .601
+          DO (102) NEXT
+          DO ,201SUB.311.312#7 <- #13$.2
+          DO .511 <- .311
+          DO .512 <- .312
+        DO RETRIEVE .311+.312
+        PLEASE DO (603) NEXT
+(3627)  PLEASE DO (4627) NEXT
+        DO FORGET #1
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+(4627)  PLEASE RESUME '?.601$#512'~'#256$#256'
+        PLEASE WHAT DID YOU SAY?
+(626)   PLEASE DO (625) NEXT
+        DO .602 <- ',201SUB.311.312#7'~'#0$#255'
+        DO (302) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        PLEASE DO (3626) NEXT
+        DO FORGET #1
+        DO .511 <- ,401SUB#7
+        DO .512 <- ,402SUB#7
+        PLEASE DO (603) NEXT
+(3626)  PLEASE DO (4626) NEXT
+        DO FORGET #2
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+(4626)  DO RESUME "?'#255~"'?.601$.602'~'#0$#255'"'$#2"~#3
+        DON'T FALL INTO THE WHIRLPOOL
+(625)   PLEASE DO (624) NEXT
+        DO .311 <- .511
+        DO .312 <- .512
+        DO (3625) NEXT
+        DO FORGET #2
+        DO .601 <- .101
+        DO .511 <- ,401SUB#7
+        DO .512 <- ,402SUB#7
+        PLEASE DO (603) NEXT
+(3625)  DO (3101) NEXT
+        PLEASE REINSTATE (3101)
+        DO FORGET #3
+        DO .601 <- #256
+        DO .511 <- ,401SUB#8
+        DO .512 <- ,402SUB#8
+        PLEASE DO (603) NEXT
+        DO YOU THINK THIS IS THE END?
+(624)   PLEASE DO (623) NEXT
+        DO RESUME #5
+        PLEASE STAY IN ONE SPOT SO I CAN HIT YOU
+(623)   PLEASE DO (622) NEXT
+        DO .2 <- ',201SUB.311.312#7'~'#0$#255'
+        DO (103) NEXT
+        DO (302) NEXT
+        DO RESUME #5
+        DON'T PROMISE WHAT YOU CAN'T KEEP
+(622)   PLEASE DO (621) NEXT
+        DO FORGET #6
+        DO STASH .311+.312
+          PLEASE DO (303) NEXT
+          DO ,201SUB.311.312#3 <- .511
+          DO ,201SUB.311.312#4 <- .512
+          DO ,201SUB.311.312#5 <- .501
+          DO ,201SUB.311.312#6 <- .502
+          DO ,201SUB.311.312#7 <- #1
+          DO .501 <- .311
+          DO .502 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+(3622)  DO (302) NEXT
+        DO EXPECT SOME DELAY
+(621)   PLEASE DO (620) NEXT
+        DO RESUME #7
+        PLEASE CONTINUE, NOTHING TO SEE HERE...
+(620)   PLEASE DO (619) NEXT
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          PLEASE .501 <- .311
+          PLEASE .502 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        DO RESUME #8
+        DO CALL ME ANY TIME
+(619)   PLEASE DO (618) NEXT
+        DO FORGET #8
+        DO .311 <- .511
+        DO .312 <- .512
+        DO STASH .311+.312
+          DO .311 <- .501
+          DO .312 <- .502
+          DO (301) NEXT
+          PLEASE DO (304) NEXT
+          DO ,201SUB.311.312#3 <- .501
+          DO ,201SUB.311.312#4 <- .502
+          DO ,201SUB.311.312#7 <- #10$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (603) NEXT
+        DON'T LOOK INTO THE ABYSS OR THE ABYSS LOOKS BACK INTO YOU
+(618)   PLEASE DO (617) NEXT
+        DO STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO .511 <- .311
+        DO .512 <- .312
+        DO RESUME #10
+        DOESN'T REALLY DO MUCH
+(617)   PLEASE DO (616) NEXT
+        DO RESUME #11
+        DO WATCH OUT FOR SUBSTITUTES
+(616)   PLEASE DO (615) NEXT
+        DO FORGET #11
+        DO STASH .311+.312+.511+.512
+            DO .311 <- .511
+            DO .312 <- .512
+            DO (301) NEXT
+            PLEASE DO (303) NEXT
+            DO ,201SUB.311.312#5 <- .501
+            DO ,201SUB.311.312#6 <- .502
+            DO ,201SUB.311.312#7 <- #1
+            DO .501 <- .311
+            DO .502 <- .312
+            PLEASE DO (303) NEXT
+            DO ,201SUB.311.312#5 <- .511
+            DO ,201SUB.311.312#6 <- .512
+            DO ,201SUB.311.312#7 <- #1$#0
+            DO ,201SUB.501.502#3 <- .311
+            DO ,201SUB.501.502#4 <- .312
+            DO .511 <- .311
+            DO .512 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO STASH .311+.312
+            DO .1 <- ,201SUB.311.312#5
+            DO .312 <- ,201SUB.311.312#6
+            DO .311 <- .1
+            DO (301) NEXT
+            DO ,201SUB.511.512#3 <- .311
+            DO ,201SUB.511.512#4 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO STASH .311+.312
+            DO .1 <- ,201SUB.311.312#3
+            DO .312 <- ,201SUB.311.312#4
+            DO .311 <- .1
+            PLEASE DO (301) NEXT
+            DO .511 <- .311
+            DO .512 <- .312
+          PLEASE RETRIEVE .311+.312
+          DO (302) NEXT
+          DO .311 <- .511
+          DO .312 <- .512
+        PLEASE RETRIEVE .511+.512
+        DO (603) NEXT
+(615)   PLEASE DO (614) NEXT
+        DO STASH .311+.312
+          DO (303) NEXT
+          DO ,201SUB.311.312#5 <- .511
+          DO ,201SUB.311.312#6 <- .512
+          DO ,201SUB.311.312#7 <- #6$#0
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          PLEASE DO (301) NEXT
+          DO ,201SUB.511.512#3 <- .311
+          DO ,201SUB.511.512#4 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        PLEASE RESUME #13
+(614)   PLEASE DO (613) NEXT
+        DO FORGET #13
+        DO .602 <- #5$#0
+        DO (602) NEXT
+        DON'T WORRY ABOUT THE CONSTANT NOISE
+(613)   PLEASE DO (612) NEXT
+        DO STASH .311+.312
+          DO .311 <- .511
+          DO .312 <- .512
+          DO (302) NEXT
+        PLEASE RETRIEVE .311+.312
+        DO STASH .311+.312
+          DO .1 <- ,201SUB.311.312#3
+          DO .312 <- ,201SUB.311.312#4
+          DO .311 <- .1
+          DO (301) NEXT
+          DO .511 <- .311
+          DO .512 <- .312
+        PLEASE RETRIEVE .311+.312
+        DO (302) NEXT
+        PLEASE RESUME #15
+(612)   PLEASE DO (611) NEXT
+        DO FORGET #15
+        DO .602 <- #3$#0
+        DO (602) NEXT
+(611)   PLEASE DO (610) NEXT
+        PLEASE HOW DID YOU GET HERE?
+(610)   PLEASE RESUME ',201SUB.311.312#7'~'#31$#0'
+(602)   DO (304) NEXT
+        DO ,201SUB.311.312#3 <- .511
+        DO ,201SUB.311.312#4 <- .512
+        DO ,201SUB.311.312#7 <- .602
+        DO .511 <- .311
+        DO .512 <- .312
+        PLEASE RESUME #2
+(603)   PLEASE FORGET #2
diff --git a/pit/yapp.doc b/pit/yapp.doc
new file mode 100644 (file)
index 0000000..7e63709
--- /dev/null
@@ -0,0 +1,26 @@
+yapp stands for "yet another program printer", or "yet another
+printing program", or maybe "yet another printer printer". yapp is a
+program that prints out programs that print out.
+
+That is, yapp takes whatever is piped into its standard input, and
+produces on its standard output the source code for an INTERCAL
+program that will, when compiled, produce the original file. The
+created program will be self-contained; it will not need the system
+library to compile. The reason for this is to maximize the amount of
+data that yapp can encode into an INTERCAL program. The current
+compiler has an upper bound on the number of commands one program can
+have; thus yapp will not produce a compilable program if given more
+than 3880 bytes.
+
+Though yapp was intended to create standalone programs, it can also be
+used to generate subroutines. (In fact, the first working version of
+this program was used to generate the lines for the final draft.)  In
+such a case, it is convenient to specify what character the data will
+"follow". The easiest way to accomplish this is to replace the "DO .9
+<- #0" in line 22 with "DO .9 <- <num>", where <num> is the
+bit-reversed code of the character preceeding the data (#80 in the
+case of a newline, for example). A more versatile modification is to
+change line 22 to "DO WRITE IN .9", and then insert the character code
+at the top of the file that is to be fed to yapp. Thus, if the data in
+the file would follow a newline, the line "EIGHT OH" would be added to
+the top of the data file.
diff --git a/pit/yapp.i b/pit/yapp.i
new file mode 100644 (file)
index 0000000..479a862
--- /dev/null
@@ -0,0 +1,414 @@
+       DO (3990) NEXT
+       PLEASE DO ;1 <- #128
+       PLEASE DO ,2 <- #2
+       DO ,2SUB#1 <- #136
+       DO ,2SUB#2 <- #240
+       PLEASE DO ,4 <- #4
+
+       DO      ;1SUB#1 <- #42920$#47080
+       DO      ;1SUB#2 <- #1156$#57920
+       PLEASE  ;1SUB#3 <- #64324$#3496
+       DO      ;1SUB#4 <- #4904$#25152
+       DO      ;1SUB#5 <- #12352$#52716
+       DO      ;1SUB#6 <- #29312$#21504
+       PLEASE  ;1SUB#7 <- #54608$#3496
+       DO      ;1SUB#8 <- #52968$#25152
+       DO      ;1SUB#9 <- #12352$#42740
+       DO      ;1SUB#10 <- #8020$#47488
+       PLEASE  ;1SUB#11 <- #54656$#53200
+       DO .4 <- #44
+       DO (100) NEXT
+
+       DO .9 <- #0
+       DO .7 <- #0
+       PLEASE COME FROM (50)
+       DO .6 <- #0
+       PLEASE COME FROM (5)
+       DO (3000) NEXT
+       DO .5 <- '?".1~#256"$#2'~#3
+       DO (49) NEXT
+       DO .2 <- !1~#15'$!1~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+       DO .1 <- .9
+       DO .9 <- .2
+       DO (1010) NEXT
+       DO .1 <- .6
+       DO (1020) NEXT
+       DO .6 <- .1
+       DO ,4SUB.6 <- .3~#255
+       DO .5 <- '?".6~#4"$#2'~#3
+(5)    DO (4) NEXT
+(4)    DO (1001) NEXT
+       PLEASE FORGET #1
+       DO .6 <- #0
+       DO .1 <- .7
+       DO (1020) NEXT
+       DO .7 <- .1
+       DO .5 <- '?".&7~#1"$#1'~#3
+       DO (7) NEXT
+       DO ;1SUB#1 <- #29032$#34304
+       DO ;1SUB#2 <- #36544$#45352
+       DO ;1SUB#3 <- #41992$#15828
+       DO .4 <- #12
+       DO (8) NEXT
+(7)    DO (1001) NEXT
+       DO ;1SUB#1 <- #3496$#4904
+       DO ;1SUB#2 <- #41992$#15828
+       DO .4 <- #8
+(8)    PLEASE FORGET #1
+       DO (100) NEXT
+       DO .1 <- .7
+       DO (220) NEXT
+       DO .1 <- ',4SUB#1'$',4SUB#2'
+       DO ,3001SUB#1 <- #196
+       DO (3090) NEXT
+       DO .2 <- #36
+       DO (3001) NEXT
+       DO .2 <- #196
+       DO (3001) NEXT
+       DO .1 <- ',4SUB#3'$',4SUB#4'
+(50)   DO (200) NEXT
+(49)   DO (1001) NEXT
+       PLEASE FORGET #1
+
+       DO      ;1SUB#1 <- #29032$#34304
+       DO      ;1SUB#2 <- #36544$#63744
+       PLEASE  ;1SUB#3 <- #8448$#8512
+       DO      ;1SUB#4 <- #12928$#49896
+       DO      ;1SUB#5 <- #47760$#3496
+       DO      ;1SUB#6 <- #12008$#16960
+       PLEASE  ;1SUB#7 <- #29760$#3828
+       DO      ;1SUB#8 <- #8020$#51584
+       DO      ;1SUB#9 <- #54656$#54224
+       DO      ;1SUB#10 <- #29032$#34304
+       PLEASE  ;1SUB#11 <- #36544$#63744
+       DO      ;1SUB#12 <- #8448$#8512
+       DO      ;1SUB#13 <- #12928$#37608
+       DO      ;1SUB#14 <- #6800$#3496
+       PLEASE  ;1SUB#15 <- #31464$#27200
+       DO      ;1SUB#16 <- #63040$#56192
+       DO      ;1SUB#17 <- #43220$#17608
+       DO      ;1SUB#18 <- #33920$#11584
+       PLEASE  ;1SUB#19 <- #40084$#57288
+       DO      ;1SUB#20 <- #12020$#8020
+       DO      ;1SUB#21 <- #47488$#53632
+       DO      ;1SUB#22 <- #59584$#48320
+       PLEASE  ;1SUB#23 <- #52800$#48276
+       DO      ;1SUB#24 <- #34440$#57024
+       DO      ;1SUB#25 <- #14656$#40960
+       DO      ;1SUB#26 <- #44032$#57744
+       PLEASE  ;1SUB#27 <- #3496$#63208
+       DO      ;1SUB#28 <- #34436$#57920
+       DO      ;1SUB#29 <- #64324$#6880
+       DO      ;1SUB#30 <- #8068$#8020
+       PLEASE  ;1SUB#31 <- #51584$#34176
+       DO      ;1SUB#32 <- #52928$#27968
+       DO      ;1SUB#33 <- #7316$#34440
+       DO      ;1SUB#34 <- #60032$#26624
+       PLEASE  ;1SUB#35 <- #53312$#11584
+       DO      ;1SUB#36 <- #51600$#24288
+       DO      ;1SUB#37 <- #38788$#23380
+       DO      ;1SUB#38 <- #10688$#22792
+       PLEASE  ;1SUB#39 <- #54656$#45724
+       DO      ;1SUB#40 <- #58240$#19776
+       DO      ;1SUB#41 <- #6272$#28224
+       DO      ;1SUB#42 <- #14464$#16020
+       PLEASE  ;1SUB#43 <- #4048$#3496
+       DO      ;1SUB#44 <- #54056$#25152
+       DO      ;1SUB#45 <- #45952$#41992
+       DO      ;1SUB#46 <- #28116$#43732
+       PLEASE  ;1SUB#47 <- #39880$#40960
+       DO      ;1SUB#48 <- #59392$#27024
+       DO      ;1SUB#49 <- #3496$#52968
+       DO      ;1SUB#50 <- #41992$#32212
+       PLEASE  ;1SUB#51 <- #42304$#7296
+       DO      ;1SUB#52 <- #20160$#26988
+       DO      ;1SUB#53 <- #6464$#40960
+       DO      ;1SUB#54 <- #59392$#7296
+       PLEASE  ;1SUB#55 <- #65216$#34880
+       DO      ;1SUB#56 <- #37312$#41556
+       DO      ;1SUB#57 <- #34440$#38528
+       DO      ;1SUB#58 <- #30976$#54848
+       PLEASE  ;1SUB#59 <- #27968$#18832
+       DO      ;1SUB#60 <- #3496$#52968
+       DO      ;1SUB#61 <- #41992$#32212
+       DO      ;1SUB#62 <- #42304$#7296
+       PLEASE  ;1SUB#63 <- #16064$#26988
+       DO      ;1SUB#64 <- #6464$#40960
+       DO      ;1SUB#65 <- #59392$#7296
+       DO      ;1SUB#66 <- #65216$#34880
+       PLEASE  ;1SUB#67 <- #37312$#41556
+       DO      ;1SUB#68 <- #34440$#31360
+       DO      ;1SUB#69 <- #32512$#49216
+       DO      ;1SUB#70 <- #27968$#18832
+       PLEASE  ;1SUB#71 <- #3496$#52968
+       DO      ;1SUB#72 <- #41992$#32212
+       DO      ;1SUB#73 <- #42304$#7296
+       DO      ;1SUB#74 <- #65216$#26988
+       PLEASE  ;1SUB#75 <- #6464$#40960
+       DO      ;1SUB#76 <- #59392$#7296
+       DO      ;1SUB#77 <- #65216$#34880
+       DO      ;1SUB#78 <- #37312$#41556
+       PLEASE  ;1SUB#79 <- #34440$#57024
+       DO      ;1SUB#80 <- #26944$#15360
+       DO      ;1SUB#81 <- #58112$#18832
+       DO      ;1SUB#82 <- #3496$#52968
+       PLEASE  ;1SUB#83 <- #41992$#30932
+       DO      ;1SUB#84 <- #47488$#37312
+       DO      ;1SUB#85 <- #41556$#34440
+       DO      ;1SUB#86 <- #57024$#15680
+       PLEASE  ;1SUB#87 <- #46336$#59904
+       DO      ;1SUB#88 <- #57744$#3496
+       DO      ;1SUB#89 <- #31464$#27200
+       DO      ;1SUB#90 <- #63040$#40576
+       PLEASE  ;1SUB#91 <- #6464$#40960
+       DO      ;1SUB#92 <- #44032$#3564
+       DO      ;1SUB#93 <- #31808$#37056
+       DO      ;1SUB#94 <- #17792$#60608
+       PLEASE  ;1SUB#95 <- #26988$#19776
+       DO      ;1SUB#96 <- #48256$#29312
+       DO      ;1SUB#97 <- #21504$#37952
+       DO      ;1SUB#98 <- #39936$#28012
+       PLEASE  ;1SUB#99 <- #6848$#7168
+       DO      ;1SUB#100 <- #20160$#28012
+       DO      ;1SUB#101 <- #49104$#19168
+       DO      ;1SUB#102 <- #49028$#23380
+       PLEASE  ;1SUB#103 <- #58816$#22792
+       DO      ;1SUB#104 <- #54656$#42968
+       DO      ;1SUB#105 <- #58816$#12040
+       DO      ;1SUB#106 <- #46824$#1668
+       PLEASE  ;1SUB#107 <- #57920$#64324
+       DO .4 <- #428
+       DO (100) NEXT
+
+       DO .5 <- '?"!6~.6'~#1"$#1'~#3
+       DO (80) NEXT
+       DO      ;1SUB#1 <- #3496$#52416
+       DO      ;1SUB#2 <- #7168$#6720
+       PLEASE  ;1SUB#3 <- #54548$#36304
+       DO      ;1SUB#4 <- #1108$#20308
+       DO      ;1SUB#5 <- #39296$#54656
+       DO .4 <- #20
+       DO (100) NEXT
+       DO .1 <- .6
+       DO (200) NEXT
+       DO .8 <- #1
+       PLEASE COME FROM (60)
+       DO ;1SUB#1 <- #3496$#52968
+       DO ;1SUB#2 <- #41992$#15828
+       DO .4 <- #8
+       DO (100) NEXT
+       DO .1 <- .8
+       DO (220) NEXT
+       DO .1 <- ,4SUB.8
+       DO (200) NEXT
+       DO .5 <- '?"'#15~"'?.8$.6'~#5"'~#1"$#1'~#3
+       DO (80) NEXT
+       DO .1 <- .8
+       DO (1020) NEXT
+(60)   DO .8 <- .1
+(80)   DO (1001) NEXT
+(79)   PLEASE FORGET #1
+       DO      ;1SUB#1 <- #29032$#34304
+       DO      ;1SUB#2 <- #36544$#13568
+       PLEASE  ;1SUB#3 <- #40128$#13632
+       DO      ;1SUB#4 <- #11624$#3828
+       DO      ;1SUB#5 <- #20032$#35968
+       DO      ;1SUB#6 <- #11520$#24704
+       PLEASE  ;1SUB#7 <- #61032$#6836
+       DO      ;1SUB#8 <- #58240$#19776
+       DO      ;1SUB#9 <- #22656$#9792
+       DO      ;1SUB#10 <- #62912$#52548
+       PLEASE  ;1SUB#11 <- #7904$#17092
+       DO      ;1SUB#12 <- #58240$#19776
+       DO      ;1SUB#13 <- #6592$#55744
+       DO      ;1SUB#14 <- #23872$#1620
+       PLEASE  ;1SUB#15 <- #45520$#8160
+       DO      ;1SUB#16 <- #5508$#8020
+       DO      ;1SUB#17 <- #30080$#54656
+       DO .4 <- #68
+       DO (100) NEXT
+       DO .1 <- '"!7$#0'~'#16383$#1'"$#0'~'#32767$#1'
+       DO (200) NEXT
+       DO      ;1SUB#1 <- #29032$#34304
+       DO      ;1SUB#2 <- #36544$#26304
+       PLEASE  ;1SUB#3 <- #42624$#43904
+       DO      ;1SUB#4 <- #42984$#2720
+       DO .4 <- #16
+       DO (100) NEXT
+
+       PLEASE GIVE UP
+
+(100)  PLEASE STASH .1 + .2 + .3 + .5
+       PLEASE DO ,9 <- .4
+       DO .1 <- #0
+       PLEASE COME FROM (101)
+       DO .2 <- .1
+       DO .3 <- #4
+       PLEASE COME FROM (103)
+       DO .5 <- '?".1~.3"$#1'~#3
+       DO .1 <- '?.1$.3'~'#0$#65535'
+       DO (104) NEXT
+(103)  DO .3 <- !3$#0'~'#32767$#1'
+(104)  DO (1001) NEXT
+       PLEASE FORGET #1
+       DO :1 <- ;1SUB'.1~#65532'
+       DO ,9SUB'".2$#1"~"#65532$#3"' <- :1~'#43690$#0'
+       DO ,9SUB'".2$#2"~"#65532$#3"' <- :1~'#21845$#0'
+       DO ,9SUB'".2$#3"~"#65532$#3"' <- :1~'#0$#43690'
+       DO ,9SUB.1 <- :1~'#0$#21845'
+       DO .5 <- '?"'#65535~"'?.4$.1'~'#0$#65532'"'~#1"$#1'~#3
+(101)  DO (102) NEXT
+(102)  DO (1001) NEXT
+       PLEASE READ OUT ,9
+       PLEASE RETRIEVE .1 + .2 + .3 + .5
+       PLEASE RESUME #2
+
+(200)  DO ,3001SUB#1 <- #196
+       DO (3099) NEXT
+       PLEASE RESUME #1
+
+(220)  DO ,3001SUB#1 <- #196
+       DO (3090) NEXT
+       DO .2 <- #60
+       DO (3001) NEXT
+       PLEASE READ OUT ,2
+       DO ,3001SUB#1 <- #196
+       PLEASE RESUME #1
+
+       PLEASE NOTE THE SMALL SUBSET OF THE SYSTEM LIBRARY
+
+(1000) DO STASH .1 + .2 + .5 + .6
+       DO (1004) NEXT
+(1004) PLEASE FORGET #1
+       DO .3 <- '?.1$.2'~'#0$#65535'
+       DO .6 <- '&.1$.2'~'#0$#65535'
+       DO .5 <- '?"!6~.6'~#1"$#1'~#3
+       DO (1003) NEXT
+       DO .1 <- .3
+       DO .2 <- !6$#0'~'#32767$#1'
+       DO (1004) NEXT
+(1003) DO (1001) NEXT
+       PLEASE RETRIEVE .1 + .2 + .5 + .6
+       PLEASE RESUME #2
+(1001) DO RESUME .5
+
+(1010) DO STASH .1 + .2
+       DO .3 <- .1
+       DO .1 <- '?.2$#65535'~'#0$#65535'
+       DO (1020) NEXT
+       PLEASE DO .2 <- .3
+       PLEASE DO (1000) NEXT
+       DO RETRIEVE .1 + .2
+       PLEASE RESUME #1
+
+(1020) DO STASH .2 + .3
+       DO .2 <- #1
+       PLEASE DO (1021) NEXT
+(1021) DO FORGET #1
+       DO .3 <- "?!1~.2'$#1"~#3
+       PLEASE DO .1 <- '?.1$.2'~'#0$#65535'
+       DO (1022) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       DO (1021) NEXT
+(1023) PLEASE RESUME .3
+(1022) DO (1023) NEXT
+       PLEASE RETRIEVE .2 + .3
+       PLEASE RESUME #2
+
+       PLEASE USE A SUBSET OF THE AUTHORIZED CHANNELS
+
+(2030) DO STASH .1 + .5
+       DO .3 <- #0
+       DO .5 <- '?"!2~.2'~#1"$#1'~#3
+       PLEASE DO (2031) NEXT
+       DO .4 <- #1
+       PLEASE DO (2033) NEXT
+(2033) DO FORGET #1
+       DO .5 <- '?".2~#32768"$#2'~#3
+       DO (2032) NEXT
+       DO .2 <- !2$#0'~'#32767$#1'
+       PLEASE DO .4 <- !4$#0'~'#32767$#1'
+       DO (2033) NEXT
+(2032) DO (1001) NEXT
+(2036) PLEASE FORGET #1
+        DO .5 <- '?.1$.2'~'#0$#65535'
+        DO .5 <- '?"'&"!2~.5'~'"?'?.5~.5'$#32768"~"#0$#65535"'"$
+                 ".5~.5"'~#1"$#2'~#3
+       DO (2034) NEXT
+       DO .5 <- .3
+       DO (1010) NEXT
+       PLEASE DO .1 <- .3
+        DO .3 <- 'V.4$.5'~'#0$#65535'
+       DO (2035) NEXT
+(2034) PLEASE DO (1001) NEXT
+(2035) DO FORGET #1
+       DO .5 <- "?'.4~#1'$#2"~#3
+       DO (2031) NEXT
+       DO .2 <- .2~#65534
+       DO .4 <- .4~#65534
+       PLEASE DO (2036) NEXT
+(2031) DO (1001) NEXT
+       PLEASE DO .4 <- .1
+       PLEASE RETRIEVE .1 + .5
+       PLEASE RESUME #2
+
+(3000) DO STASH .2 + .3 + .5
+       DO .2 <- ,3000SUB#1
+       PLEASE WRITE IN ,3000
+       DO .1 <- ,3000SUB#1
+       DO .5 <- '?".1~#256"$#2'~#3
+       DO (3008) NEXT
+       DO (1000) NEXT
+       DO .1 <- .3~#255
+       DO ,3000SUB#1 <- .1
+       DO (3009) NEXT
+(3008) DO (1001) NEXT
+(3009) DO RETRIEVE .2 + .3 + .5
+       PLEASE RESUME #2
+
+(3001) DO STASH .1 + .3
+       DO .1 <- ,3001SUB#1
+       DO (1010) NEXT
+       DO ,3001SUB#1 <- .3~#255
+       PLEASE READ OUT ,3001
+       DO ,3001SUB#1 <- .2
+       DO .1 <- .2
+       DO RETRIEVE .1 + .3
+       PLEASE RESUME #1
+
+(3090) PLEASE ABSTAIN FROM (3097)
+(3099) PLEASE STASH .1 + .2 + .3 + .4
+       DO .2 <- #256
+       PLEASE STASH .2
+       DO (3091) NEXT
+       DO (3095) NEXT
+       DO .2 <- #80
+(3097) DO (3001) NEXT
+       PLEASE REINSTATE (3097)
+       PLEASE RETRIEVE .1 + .2 + .3 + .4
+       PLEASE RESUME #1
+(3098) PLEASE RESUME '?"!1~.1'~#1"$#2'~#3
+(3091) DO COME FROM (3092)
+       DO .2 <- #10
+       DO (2030) NEXT
+       DO .2 <- .4
+       PLEASE STASH .2
+       DO .1 <- .3
+(3092) DO (3098) NEXT
+
+(3095) DO COME FROM (3094)
+       PLEASE RETRIEVE .2
+       DO (3093) NEXT
+       DO .2 <- .2$#3
+       DO .2 <- !2~#15'$!2~#240'
+       DO .2 <- !2~#15'$!2~#240'
+(3094) DO (3001) NEXT
+(3093) PLEASE RESUME '?".2~#256"$#1'~#3
+
+(3990) PLEASE DO ,3000 <- #1
+       DO ,3000SUB#1 <- #0
+       PLEASE DO ,3001 <- #1
+       DO ,3001SUB#1 <- #0
+       PLEASE RESUME #1