From 30c060a583920eff935d3399eac9d4a92e7ce905 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 30 Aug 2007 22:28:50 -0400 Subject: [PATCH] Alex Smith's 1.26 release (This is a retrospective comment.) --- MANIFEST.txt | 369 +- NEWS.txt | 36 +- README.txt | 69 +- cleanick.bat | 28 +- cleanick.sh | 2 +- configure.ac => config.ac | 2 +- config.log | 1144 ------ configure.sh => config.sh | 18 +- config.status | 688 ---- districk.bat | 18 +- doc/Makefile | 94 +- doc/READ.ME | 72 +- doc/THEORY | 396 +-- doc/chip.spec | 1214 +++---- doc/intercal.mm | 6300 ++++++++++++++++----------------- djfix.bat => etc/ctrlmfix.bat | 5 +- djfix.sh => etc/ctrlmfix.sh | 37 +- ickspec | 120 +- makeick.bat | 134 +- makeick.sh | 5 +- pit/CATALOG | 268 +- pit/Makefile | 294 +- pit/blinkers | 32 +- pit/delta.fft | 516 +-- pit/glider | 28 +- pit/gun | 180 +- pit/hail_mary.3i | 76 +- pit/lib/syslib.3i | 646 ++-- pit/lib/syslib.4i | 708 ++-- pit/lib/syslib.5i | 710 ++-- pit/lib/syslib.6i | 746 ++-- pit/lib/syslib.7i | 804 ++--- pit/t_tet | 24 +- pit/tests/count.3i | 86 +- pit/tests/limits.3i | 10 +- pit/tests/testops.3i | 36 +- pit/tests/testops.5i | 34 +- pit/tests/version.4i | 14 +- pit/tophat.fft | 516 +-- src/abcess.h | 2 +- src/dekludge.c | 11 +- src/feh2.c | 10 +- src/ick.bat | 8 - src/lexer.l | 4 + src/perpet.c | 61 +- src/yuk.c | 4 +- src/yuk.h | 10 +- 47 files changed, 7433 insertions(+), 9156 deletions(-) rename configure.ac => config.ac (94%) delete mode 100644 config.log rename configure.sh => config.sh (99%) delete mode 100755 config.status rename djfix.bat => etc/ctrlmfix.bat (74%) rename djfix.sh => etc/ctrlmfix.sh (78%) delete mode 100755 src/ick.bat diff --git a/MANIFEST.txt b/MANIFEST.txt index 7847e36..8a3a311 100644 --- a/MANIFEST.txt +++ b/MANIFEST.txt @@ -1,186 +1,183 @@ -.: -BUGS.txt -COPYING.txt -MANIFEST.txt -Makefile.in -NEWS.txt -README.txt -bin -cleanick.bat -cleanick.sh -config.log -config.status -configure.ac -configure.sh -districk.bat -districk.sh -djfix.bat -djfix.sh -doc -etc -ickspec -ickspec.in -include -install.sh -lib -makeick.bat -makeick.sh -pit -src -temp - -./bin: - -./doc: -Makefile -READ.ME -THEORY -chip.spec -intercal.mm - -./etc: -intercal.el - -./include: - -./lib: - -./pit: -CATALOG -Makefile -beer.doc -beer.i -blinkers -bubble.doc -bubble.i -change.doc -change.i -delta.fft -fft.doc -fft.i -flonck.doc -flonck.i -glider -gun -hail_mary.3i -hail_mary.doc -icat.i -iching.doc -iching1.i -iching2.i -ins.doc -ins.i -lib -life.doc -life.i -life2.doc -life2.i -pass.i -pi.doc -pi.i -pow.i -primes.doc -primes.i -quine.i -random.doc -random.i -random2.i -rot13.doc -rot13.i -rot13b.doc -rot13b.i -sample.i -sort.i -syslib.i -t_tet -tests -tophat.fft -tpk.doc -tpk.i -yapp.doc -yapp.i - -./pit/lib: -1910.doc -floatlib.doc -floatlib.i -lib2.doc -lib2.i -numio.doc -numio.i -plus.i -syslib-orig.i -syslib.3i -syslib.4i -syslib.5i -syslib.6i -syslib.7i -syslib.doc -syslib.i -syslib3-7.doc - -./pit/tests: -ais1.i -ais2.i -arrtest.doc -arrtest.i -compucome.i -count.3i -count.doc -hello.i -iogerunds.doc -iogerunds.i -knuth.i -limits.3i -limits.i -onceagain.i -permute.doc -permute.i -pictest.i -sink.doc -sink.i -test1.i -test16bit.i -test2.i -testarray.i -testcf.i -testi18n.i -testlib2.i -testonce.i -testops.3i -testops.5i -testsplat.i -version.4i -version.doc - -./src: -abcess.h -arrgghh.c -cesspool.c -coopt.sh -dekludge.c -feh.h -feh2.c -fiddle.c -fiddle.h -ick-wrap.c -ick.bat -ick.h -lexer.l -lose.c -lose.h -numerals.c -parser.y -perpet.c -pick1.h -pick2.h -pickwrap.c -sizes.h -unravel.c -yuk.c -yuk.h - -./temp: -lexer.c -parser.c -parser.h +.: +BUGS.txt +COPYING.txt +MANIFEST.txt +Makefile.in +NEWS.txt +README.txt +bin +cleanick.bat +cleanick.sh +config.ac +config.sh +districk.bat +districk.sh +doc +etc +ickspec +ickspec.in +include +install.sh +lib +makeick.bat +makeick.sh +pit +src +temp + +./bin: + +./doc: +Makefile +READ.ME +THEORY +chip.spec +intercal.mm + +./etc: +ctrlmfix.bat +ctrlmfix.sh +intercal.el + +./include: + +./lib: + +./pit: +CATALOG +Makefile +beer.doc +beer.i +blinkers +bubble.doc +bubble.i +change.doc +change.i +delta.fft +fft.doc +fft.i +flonck.doc +flonck.i +glider +gun +hail_mary.3i +hail_mary.doc +icat.i +iching.doc +iching1.i +iching2.i +ins.doc +ins.i +lib +life.doc +life.i +life2.doc +life2.i +pass.i +pi.doc +pi.i +pow.i +primes.doc +primes.i +quine.i +random.doc +random.i +random2.i +rot13.doc +rot13.i +rot13b.doc +rot13b.i +sample.i +sort.i +syslib.i +t_tet +tests +tophat.fft +tpk.doc +tpk.i +yapp.doc +yapp.i + +./pit/lib: +1910.doc +floatlib.doc +floatlib.i +lib2.doc +lib2.i +numio.doc +numio.i +plus.i +syslib-orig.i +syslib.3i +syslib.4i +syslib.5i +syslib.6i +syslib.7i +syslib.doc +syslib.i +syslib3-7.doc + +./pit/tests: +ais1.i +ais2.i +arrtest.doc +arrtest.i +compucome.i +count.3i +count.doc +hello.i +iogerunds.doc +iogerunds.i +knuth.i +limits.3i +limits.i +onceagain.i +permute.doc +permute.i +pictest.i +sink.doc +sink.i +test1.i +test16bit.i +test2.i +testarray.i +testcf.i +testi18n.i +testlib2.i +testonce.i +testops.3i +testops.5i +testsplat.i +version.4i +version.doc + +./src: +abcess.h +arrgghh.c +cesspool.c +coopt.sh +dekludge.c +feh.h +feh2.c +fiddle.c +fiddle.h +ick-wrap.c +ick.h +lexer.l +lose.c +lose.h +numerals.c +parser.y +perpet.c +pick1.h +pick2.h +pickwrap.c +sizes.h +unravel.c +yuk.c +yuk.h + +./temp: +lexer.c +parser.c +parser.h diff --git a/NEWS.txt b/NEWS.txt index 14c66b3..5fdd276 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,7 +1,39 @@ NEW IN THIS RELEASE + Release 1.26 (by Alex Smith) [a bugfix of 0.26] + +1. Fixed an optimizer bug (thanks to Joris Huizer for pointing it out), + relating to active-bits deduction in some expressions involving select. + +2. Fixed a bug in the flow optimizer that caused it to occasionally confuse + ABSTAIN with REINSTATE when gerunds were used. + +3. Simplified the compilation of INTERCAL files to .exe under DJGPP, to avoid + some temporary files (hopefully solving some problems users may be having + with finding which directory the temporary files are in under DJGPP); + when under DJGPP a temporary file other than .c or .exe is needed, the + compiler now looks for a directory reserved for temporary files to place it + in rather than just using the current directory. + +4. The original INTERCAL manual specifies that GIVE UP cannot be REINSTATED + or ABSTAINED FROM; this is now implemented, by taking only the original + DO/DO NOT status into account when executing a GIVE UP statement. + +5. Dealt with problems with what happens with the 'original' stdin (this + information was previously lost, making it hard for the debugger to accept + input because it had no obvious place to accept it from), and removed the + previous hacky workarounds for this problem (which were my fault). + +6. Made several improvements to the documentation, especially with respect to + installing and running under DJGPP. + +7. Modified the version number scheme, so that minor revisions and bugfixes + now increment the major version number rather than the minor version number + (it was getting a little bored stuck at 0). The next major release will be + version 0.27. + Release 0.26 (by Alex Smith) -   + 1. Fixed a few bugs in the previous release (some bugfixed by Joris Huizer). 2. Ported to DJGPP. The compiler now works on both POSIX and DJGPP systems. @@ -64,7 +96,7 @@ that only one infix operator is allowed for each group, variable, and/or mesh). -18. Added ¬ as a synonym for NOT. +18. Added the not character as a synonym for NOT. 19. Added operand overloading, for onespot and twospot variables. This uses the slat operator in almost, but not quite, the same way as diff --git a/README.txt b/README.txt index 927ff81..9450f46 100644 --- a/README.txt +++ b/README.txt @@ -62,16 +62,16 @@ Makefile.in -- makefile input for the INTERCAL compiler (POSIX) makeick.bat -- script to compile under DJGPP districk.bat -- script to remove files not distributed (DJGPP) cleanick.bat -- script to remove all non-source files (DJGPP) -djfix.bat -- script to remove ^Ms that may have got in by mistake +ctrlmfix.bat -- script to remove ^Ms that may have got in by mistake makeick.sh --\ districk.sh --|the same as above, but in sh format -cleanick.sh --| -djfix.sh --/ +cleanick.sh --|(use .bat under command.com/cmd, and .sh under bash) +ctrlmfix.sh --/ -configure.sh -- GNU Autoconf script that generates a makefile +config.sh -- GNU Autoconf script that generates a makefile from Makefile.in -ickspec.in -- Input to configure.sh -configure.ac -- Source from which configure.sh was generated +ickspec.in -- Input to config.sh +config.ac -- Source from which config.sh was generated install.sh -- Helper file for 'make install' bin/* -- Directory that holds binaries after the build @@ -135,11 +135,23 @@ There is an INTERCAL Resource Page at http://www.catb.org/intercal The latest version of INTERCAL is also kept available at the Retrocomputing Museun, http://www.catb.org/retro. +(Note that the above paragraph appears to be out of date. Looking through the +alt.lang.intercal archives is usually the best way to find out what the latest +version of C-INTERCAL (and you'll find out how to get its rival too, for that +matter) is nowadays; they tend to pop up in various unusual places, so giving +a URL might be misleading. Note also that contact details, and even who to +contact, often end up out of date; the newsgroup is also a good way to find out +who to contact.) + There is, in addition, an occasionally active USENET newsgroup devoted to the language: alt.lang.intercal. NOTES ON THE POSIX BUILD +The configure script in this distribution is called 'config.sh', to be kind to +people trying to build under DOS, and also just because we like being +different. + At the top of ick.h are two defines that you may need to remove if you are using lex instead of flex. @@ -152,6 +164,11 @@ while others automatically restart after seeing an EOF. (This is the case with flex.) If your build fails at link time because yyrestart is not defined, comment out the define of USE_YYRESTART. +I have also come across lexes whose default limits for various things aren't +high enough to handle INTERCAL's various lexing conundrums. In this case, pay +attention to the error messages they give you, and alter the source file +src/lexer.l accordingly. + If you are using gcc in an non-ANSI environment, such as SunOS, it is strongly recommended that you add "-Wno-unused -Wimplicit" to the gcc command in the makefile. If you are in an ANSI environment and are using the current versions @@ -161,13 +178,20 @@ As the debugger is interactive, it needs to be able to find the GNU GPL. The Makefile attempts to copy the GPL to /dev/null to prove it exists. If this fails, you will have to point the Makefile to a copy of the GPL yourself. You can always copy the one included with this distribution somewhere safe and use -that (what the Makefile will try to do by default). +that (what the Makefile will try to do by default, but I suspect it always +fails). + +If you get an error about 'gettimeofday()', or if you have a more accurate +timing function available, there's a whole section about profiling in yuk.h +that you can change to affect the accuracy of the timings. (Option 0 is pure +ANSI C, which can be used as a fallback to allow the debugging library to +compile if you have nothing better.) NOTES ON THE DJGPP BUILD This distribution needs prebuilding; you can use the makeick.bat or makeick.sh file provided to compile the program if you can't compile using the usual -POSIX methods via configure and make. Once the implementation has been built, +POSIX methods via config.sh and make. Once the implementation has been built, you can install it by adding the \bin subdirectory to your PATH environment variable (at either end). The temporary output from bison and flex is included in the distribution (for those people who don't have bison and flex, makeick @@ -176,16 +200,28 @@ districk.bat file will remove all generated files that weren't in the distribution, and the cleanick.bat file will remove all files that aren't needed for a build (including the temporary bison/flex output). Note that makeick.bat and makeick.sh produce DJGPP-specific output; and if you're -running DJGPP under bash under Windows XP, you'll need to either set your -default command interpreter for batch files to cmd rather than command.com, or -explicitly invoke the compiler as cmd /c ick rather than just ick. +running DJGPP under bash under Windows XP, you may need to either set your +default command interpreter for batch files to cmd rather than command.com (by +setting your SHELL environment variable, or use some better workaround that I +don't know about. (command.com seems to have problems with the PATH environment +variable under Windows XP when running under bash.) Also try to make sure that +you use the .sh versions of the makeick.* scripts when running under bash or a +similar ported shell, and the .bat versions when running under a DOS shell. Some distributions of DJGPP have a bug where they complain that they can't find -'m4.exe'. You can solve this problem by copying m4.exe into the \temp -subdirectory before running makeick.bat. +'m4.exe' (or maybe my PATH is still wrong...). You can solve this problem by +copying m4.exe into the \temp subdirectory before running makeick.bat. + +(P.S. It was my PATH that was wrong. Still, if you made the same mistake as me, +you may want to try the same fix.) Some features (for instance, -F) are unavailable at the moment under DJGPP -(they are documented, but have no effect). +(they are documented, but have no effect). Note also that the profiler is +pretty much useless under DOS; this is a problem inherent in DOS, in that it +doesn't provide timings to any decent resolution (it was worse than 50ms last I +checked, and the DJGPP documentation agrees with me on this; INTERCAL may be +traditionally considered to be slow, but it isn't that slow, especially with +the optimiser enabled). Note that for copyright reasons, the compilation needs to know a location of the GNU GPL on your system. There is one provided as COPYING.txt. You will @@ -194,6 +230,11 @@ default (/DJGPP/COPYING) is incorrect. You can get a copy of DJGPP at . +If you release your own version of C-INTERCAL and have edited it on DJGPP, +please run etc/ctrlmfix.bat (or sh) from the main installation directory before +releasing it; this will remove any trailing control-M characters that may have +got into the files by mistake. + NOTES ON COMPILING PIC-INTERCAL PIC C compilers tend to differ substantially in the way they handle various diff --git a/cleanick.bat b/cleanick.bat index c5cc758..5a77cf0 100755 --- a/cleanick.bat +++ b/cleanick.bat @@ -1,14 +1,14 @@ -@echo off -rem This batch file removes all files that aren't needed to recompile. -del /q bin\*.* -del /q lib\*.* -del /q include\*.* -del /q temp\*.h -del /q temp\*.c -del /q temp\*.o -del /q temp\*.a -del /q temp\*.y -del /q temp\*.l -del /q temp\*.bat -del /q temp\*.sh -del /q temp\ickmain.exe +@echo off +rem This batch file removes all files that aren't needed to recompile. +del /Q bin\*.* +del /Q lib\*.* +del /Q include\*.* +del /Q temp\*.h +del /Q temp\*.c +del /Q temp\*.o +del /Q temp\*.a +del /Q temp\*.y +del /Q temp\*.l +del /Q temp\*.bat +del /Q temp\*.sh +del /Q temp\*.exe diff --git a/cleanick.sh b/cleanick.sh index 2c459fd..176c2c3 100755 --- a/cleanick.sh +++ b/cleanick.sh @@ -13,7 +13,7 @@ rm -f temp/*.y rm -f temp/*.l rm -f temp/*.bat rm -f temp/*.sh -rm -f temp/ickmain.exe +rm -f temp/*.exe rm -f temp/*~ rm -f src/*~ rm -f *~ \ No newline at end of file diff --git a/configure.ac b/config.ac similarity index 94% rename from configure.ac rename to config.ac index 37da6fb..0571ecc 100644 --- a/configure.ac +++ b/config.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(intercal, 0.26, esr@thyrsus.com) +AC_INIT(intercal, 1.26, esr@thyrsus.com) AC_CONFIG_SRCDIR([src/lose.h]) # Checks for programs. diff --git a/config.log b/config.log deleted file mode 100644 index 75ff729..0000000 --- a/config.log +++ /dev/null @@ -1,1144 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by intercal configure.sh 0.26, which was -generated by GNU Autoconf 2.57. Invocation command line was - - $ configure.sh - -## --------- ## -## Platform. ## -## --------- ## - -hostname = chillingi -uname -m = sun4u -uname -r = 5.9 -uname -s = SunOS -uname -v = Generic_118558-34 - -/usr/bin/uname -p = sparc -/bin/uname -X = System = SunOS -Node = chillingi -Release = 5.9 -KernelID = Generic_118558-34 -Machine = sun4u -BusType = -Serial = -Users = -OEM# = 0 -Origin# = 1 -NumCPU = 2 - -/bin/arch = sun4 -/usr/bin/arch -k = sun4u -/usr/convex/getsysinfo = unknown -hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: . -PATH: /home/ais523/bin -PATH: /home/ais523 -PATH: /opt/SUNWspro/bin -PATH: /usr/local/bin -PATH: /usr/sbin -PATH: /usr/ucb -PATH: /usr/bin -PATH: /usr/ccs/bin -PATH: /usr/etc -PATH: /usr/dt/bin -PATH: /usr/openwin/bin -PATH: /apps7/bin -PATH: /apps7/script - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure.sh:1275: checking for bison -configure.sh:1304: result: no -configure.sh:1275: checking for byacc -configure.sh:1304: result: no -configure.sh:1358: checking for gcc -configure.sh:1374: found /usr/local/bin/gcc -configure.sh:1384: result: gcc -configure.sh:1628: checking for C compiler version -configure.sh:1631: gcc --version &5 -2.95.2 -configure.sh:1634: $? = 0 -configure.sh:1636: gcc -v &5 -Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs -gcc version 2.95.2 19991024 (release) -configure.sh:1639: $? = 0 -configure.sh:1641: gcc -V &5 -gcc: argument to `-V' is missing -configure.sh:1644: $? = 1 -configure.sh:1668: checking for C compiler default output -configure.sh:1671: gcc conftest.c >&5 -configure.sh:1674: $? = 0 -configure.sh:1720: result: a.out -configure.sh:1725: checking whether the C compiler works -configure.sh:1731: ./a.out -configure.sh:1734: $? = 0 -configure.sh:1751: result: yes -configure.sh:1758: checking whether we are cross compiling -configure.sh:1760: result: no -configure.sh:1763: checking for suffix of executables -configure.sh:1765: gcc -o conftest conftest.c >&5 -configure.sh:1768: $? = 0 -configure.sh:1793: result: -configure.sh:1799: checking for suffix of object files -configure.sh:1821: gcc -c conftest.c >&5 -configure.sh:1824: $? = 0 -configure.sh:1846: result: o -configure.sh:1850: checking whether we are using the GNU C compiler -configure.sh:1875: gcc -c conftest.c >&5 -configure.sh:1878: $? = 0 -configure.sh:1881: test -s conftest.o -configure.sh:1884: $? = 0 -configure.sh:1897: result: yes -configure.sh:1903: checking whether gcc accepts -g -configure.sh:1925: gcc -c -g conftest.c >&5 -configure.sh:1928: $? = 0 -configure.sh:1931: test -s conftest.o -configure.sh:1934: $? = 0 -configure.sh:1945: result: yes -configure.sh:1962: checking for gcc option to accept ANSI C -configure.sh:2023: gcc -c -g -O2 conftest.c >&5 -configure.sh:2026: $? = 0 -configure.sh:2029: test -s conftest.o -configure.sh:2032: $? = 0 -configure.sh:2050: result: none needed -configure.sh:2068: gcc -c -g -O2 conftest.c >&5 -conftest.c:2: parse error before `me' -configure.sh:2071: $? = 1 -configure.sh: failed program was: -| #ifndef __cplusplus -| choke me -| #endif -configure.sh:2185: checking for flex -configure.sh:2214: result: no -configure.sh:2185: checking for lex -configure.sh:2201: found /usr/ccs/bin/lex -configure.sh:2211: result: lex -configure.sh:2224: checking for yywrap in -lfl -configure.sh:2255: gcc -o conftest -g -O2 conftest.c -lfl >&5 -ld: fatal: library -lfl: not found -ld: fatal: File processing errors. No output written to conftest -collect2: ld returned 1 exit status -configure.sh:2258: $? = 1 -configure.sh: failed program was: -| #line 2231 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| /* end confdefs.h. */ -| -| /* Override any gcc2 internal prototype to avoid an error. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| /* We use char because int might match the return type of a gcc2 -| builtin and then its argument prototype would still apply. */ -| char yywrap (); -| int -| main () -| { -| yywrap (); -| ; -| return 0; -| } -configure.sh:2276: result: no -configure.sh:2281: checking for yywrap in -ll -configure.sh:2312: gcc -o conftest -g -O2 conftest.c -ll >&5 -configure.sh:2315: $? = 0 -configure.sh:2318: test -s conftest -configure.sh:2321: $? = 0 -configure.sh:2333: result: yes -configure.sh:2344: checking lex output file root -configure.sh:2355: lex conftest.l -configure.sh:2358: $? = 0 -configure.sh:2370: result: lex.yy -configure.sh:2375: checking whether yytext is a pointer -configure.sh:2391: gcc -o conftest -g -O2 conftest.c -ll >&5 -conftest.c:418: conflicting types for `yytext' -conftest.c:71: previous declaration of `yytext' -configure.sh:2394: $? = 1 -configure.sh: failed program was: -| #include -| #include -| #include -| # define U(x) x -| # define NLSTATE yyprevious=YYNEWLINE -| # define BEGIN yybgin = yysvec + 1 + -| # define INITIAL 0 -| # define YYLERR yysvec -| # define YYSTATE (yyestate-yysvec-1) -| # define YYOPTIM 1 -| # ifndef YYLMAX -| # define YYLMAX BUFSIZ -| # endif -| #ifndef __cplusplus -| # define output(c) (void)putc(c,yyout) -| #else -| # define lex_output(c) (void)putc(c,yyout) -| #endif -| -| #if defined(__cplusplus) || defined(__STDC__) -| -| #if defined(__cplusplus) && defined(__EXTERN_C__) -| extern "C" { -| #endif -| int yyback(int *, int); -| int yyinput(void); -| int yylook(void); -| void yyoutput(int); -| int yyracc(int); -| int yyreject(void); -| void yyunput(int); -| int yylex(void); -| #ifdef YYLEX_E -| void yywoutput(wchar_t); -| wchar_t yywinput(void); -| #endif -| #ifndef yyless -| int yyless(int); -| #endif -| #ifndef yywrap -| int yywrap(void); -| #endif -| #ifdef LEXDEBUG -| void allprint(char); -| void sprint(char *); -| #endif -| #if defined(__cplusplus) && defined(__EXTERN_C__) -| } -| #endif -| -| #ifdef __cplusplus -| extern "C" { -| #endif -| void exit(int); -| #ifdef __cplusplus -| } -| #endif -| -| #endif -| # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} -| # define yymore() (yymorfg=1) -| #ifndef __cplusplus -| # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) -| #else -| # define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) -| #endif -| #define ECHO fprintf(yyout, "%s",yytext) -| # define REJECT { nstr = yyreject(); goto yyfussy;} -| int yyleng; -| #define YYISARRAY -| char yytext[YYLMAX]; -| int yymorfg; -| extern char *yysptr, yysbuf[]; -| int yytchar; -| FILE *yyin = {stdin}, *yyout = {stdout}; -| extern int yylineno; -| struct yysvf { -| struct yywork *yystoff; -| struct yysvf *yyother; -| int *yystops;}; -| struct yysvf *yyestate; -| extern struct yysvf yysvec[], *yybgin; -| # define YYNEWLINE 10 -| yylex(){ -| int nstr; extern int yyprevious; -| #ifdef __cplusplus -| /* to avoid CC and lint complaining yyfussy not being used ...*/ -| static int __lex_hack = 0; -| if (__lex_hack) goto yyfussy; -| #endif -| while((nstr = yylook()) >= 0) -| yyfussy: switch(nstr){ -| case 0: -| if(yywrap()) return(0); break; -| case -1: -| break; -| default: -| (void)fprintf(yyout,"bad switch yylook %d",nstr); -| } return(0); } -| /* end of yylex */ -| int yyvstop[] = { -| 0, -| 0}; -| # define YYTYPE unsigned char -| struct yywork { YYTYPE verify, advance; } yycrank[] = { -| 0,0, 0,0, 0,0, 0,0, -| 0,0}; -| struct yysvf yysvec[] = { -| 0, 0, 0, -| yycrank+0, 0, 0, -| yycrank+0, 0, 0, -| 0, 0, 0}; -| struct yywork *yytop = yycrank+0; -| struct yysvf *yybgin = yysvec+1; -| char yymatch[] = { -| 0, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 1, 1, 1, 1, 1, 1, 1, 1, -| 0}; -| char yyextra[] = { -| 0,0,0,0,0,0,0,0, -| 0}; -| /* Copyright (c) 1989 AT&T */ -| /* All Rights Reserved */ -| -| /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ -| /* The copyright notice above does not evidence any */ -| /* actual or intended publication of such source code. */ -| -| #pragma ident "@(#)ncform 6.12 97/12/08 SMI" -| -| int yylineno =1; -| # define YYU(x) x -| # define NLSTATE yyprevious=YYNEWLINE -| struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; -| char yysbuf[YYLMAX]; -| char *yysptr = yysbuf; -| int *yyfnd; -| extern struct yysvf *yyestate; -| int yyprevious = YYNEWLINE; -| #if defined(__cplusplus) || defined(__STDC__) -| int yylook(void) -| #else -| yylook() -| #endif -| { -| register struct yysvf *yystate, **lsp; -| register struct yywork *yyt; -| struct yysvf *yyz; -| int yych, yyfirst; -| struct yywork *yyr; -| # ifdef LEXDEBUG -| int debug; -| # endif -| char *yylastch; -| /* start off machines */ -| # ifdef LEXDEBUG -| debug = 0; -| # endif -| yyfirst=1; -| if (!yymorfg) -| yylastch = yytext; -| else { -| yymorfg=0; -| yylastch = yytext+yyleng; -| } -| for(;;){ -| lsp = yylstate; -| yyestate = yystate = yybgin; -| if (yyprevious==YYNEWLINE) yystate++; -| for (;;){ -| # ifdef LEXDEBUG -| if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); -| # endif -| yyt = yystate->yystoff; -| if(yyt == yycrank && !yyfirst){ /* may not be any transitions */ -| yyz = yystate->yyother; -| if(yyz == 0)break; -| if(yyz->yystoff == yycrank)break; -| } -| #ifndef __cplusplus -| *yylastch++ = yych = input(); -| #else -| *yylastch++ = yych = lex_input(); -| #endif -| #ifdef YYISARRAY -| if(yylastch > &yytext[YYLMAX]) { -| fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); -| exit(1); -| } -| #else -| if (yylastch >= &yytext[ yytextsz ]) { -| int x = yylastch - yytext; -| -| yytextsz += YYTEXTSZINC; -| if (yytext == yy_tbuf) { -| yytext = (char *) malloc(yytextsz); -| memcpy(yytext, yy_tbuf, sizeof (yy_tbuf)); -| } -| else -| yytext = (char *) realloc(yytext, yytextsz); -| if (!yytext) { -| fprintf(yyout, -| "Cannot realloc yytext\n"); -| exit(1); -| } -| yylastch = yytext + x; -| } -| #endif -| yyfirst=0; -| tryagain: -| # ifdef LEXDEBUG -| if(debug){ -| fprintf(yyout,"char "); -| allprint(yych); -| putchar('\n'); -| } -| # endif -| yyr = yyt; -| if ( (uintptr_t)yyt > (uintptr_t)yycrank){ -| yyt = yyr + yych; -| if (yyt <= yytop && yyt->verify+yysvec == yystate){ -| if(yyt->advance+yysvec == YYLERR) /* error transitions */ -| {unput(*--yylastch);break;} -| *lsp++ = yystate = yyt->advance+yysvec; -| if(lsp > &yylstate[YYLMAX]) { -| fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); -| exit(1); -| } -| goto contin; -| } -| } -| # ifdef YYOPTIM -| else if((uintptr_t)yyt < (uintptr_t)yycrank) { /* r < yycrank */ -| yyt = yyr = yycrank+(yycrank-yyt); -| # ifdef LEXDEBUG -| if(debug)fprintf(yyout,"compressed state\n"); -| # endif -| yyt = yyt + yych; -| if(yyt <= yytop && yyt->verify+yysvec == yystate){ -| if(yyt->advance+yysvec == YYLERR) /* error transitions */ -| {unput(*--yylastch);break;} -| *lsp++ = yystate = yyt->advance+yysvec; -| if(lsp > &yylstate[YYLMAX]) { -| fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); -| exit(1); -| } -| goto contin; -| } -| yyt = yyr + YYU(yymatch[yych]); -| # ifdef LEXDEBUG -| if(debug){ -| fprintf(yyout,"try fall back character "); -| allprint(YYU(yymatch[yych])); -| putchar('\n'); -| } -| # endif -| if(yyt <= yytop && yyt->verify+yysvec == yystate){ -| if(yyt->advance+yysvec == YYLERR) /* error transition */ -| {unput(*--yylastch);break;} -| *lsp++ = yystate = yyt->advance+yysvec; -| if(lsp > &yylstate[YYLMAX]) { -| fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); -| exit(1); -| } -| goto contin; -| } -| } -| if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ -| # ifdef LEXDEBUG -| if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); -| # endif -| goto tryagain; -| } -| # endif -| else -| {unput(*--yylastch);break;} -| contin: -| # ifdef LEXDEBUG -| if(debug){ -| fprintf(yyout,"state %d char ",yystate-yysvec-1); -| allprint(yych); -| putchar('\n'); -| } -| # endif -| ; -| } -| # ifdef LEXDEBUG -| if(debug){ -| fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); -| allprint(yych); -| putchar('\n'); -| } -| # endif -| while (lsp-- > yylstate){ -| *yylastch-- = 0; -| if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ -| yyolsp = lsp; -| if(yyextra[*yyfnd]){ /* must backup */ -| while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ -| lsp--; -| unput(*yylastch--); -| } -| } -| yyprevious = YYU(*yylastch); -| yylsp = lsp; -| yyleng = yylastch-yytext+1; -| yytext[yyleng] = 0; -| # ifdef LEXDEBUG -| if(debug){ -| fprintf(yyout,"\nmatch "); -| sprint(yytext); -| fprintf(yyout," action %d\n",*yyfnd); -| } -| # endif -| return(*yyfnd++); -| } -| unput(*yylastch); -| } -| if (yytext[0] == 0 /* && feof(yyin) */) -| { -| yysptr=yysbuf; -| return(0); -| } -| #ifndef __cplusplus -| yyprevious = yytext[0] = input(); -| if (yyprevious>0) -| output(yyprevious); -| #else -| yyprevious = yytext[0] = lex_input(); -| if (yyprevious>0) -| lex_output(yyprevious); -| #endif -| yylastch=yytext; -| # ifdef LEXDEBUG -| if(debug)putchar('\n'); -| # endif -| } -| } -| #if defined(__cplusplus) || defined(__STDC__) -| int yyback(int *p, int m) -| #else -| yyback(p, m) -| int *p; -| #endif -| { -| if (p==0) return(0); -| while (*p) { -| if (*p++ == m) -| return(1); -| } -| return(0); -| } -| /* the following are only used in the lex library */ -| #if defined(__cplusplus) || defined(__STDC__) -| int yyinput(void) -| #else -| yyinput() -| #endif -| { -| #ifndef __cplusplus -| return(input()); -| #else -| return(lex_input()); -| #endif -| } -| #if defined(__cplusplus) || defined(__STDC__) -| void yyoutput(int c) -| #else -| yyoutput(c) -| int c; -| #endif -| { -| #ifndef __cplusplus -| output(c); -| #else -| lex_output(c); -| #endif -| } -| #if defined(__cplusplus) || defined(__STDC__) -| void yyunput(int c) -| #else -| yyunput(c) -| int c; -| #endif -| { -| unput(c); -| } -| extern char *yytext; -configure.sh:2413: result: no -configure.sh:2461: checking for a BSD-compatible install -configure.sh:2515: result: ./install.sh -c -configure.sh:2526: checking whether ln -s works -configure.sh:2530: result: yes -configure.sh:2537: checking whether make sets $(MAKE) -configure.sh:2557: result: yes -configure.sh:2575: checking how to run the C preprocessor -configure.sh:2611: gcc -E conftest.c -configure.sh:2617: $? = 0 -configure.sh:2649: gcc -E conftest.c -configure:2648: ac_nonexistent.h: No such file or directory -configure.sh:2655: $? = 1 -configure.sh: failed program was: -| #line 2640 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| /* end confdefs.h. */ -| #include -configure.sh:2693: result: gcc -E -configure.sh:2718: gcc -E conftest.c -configure.sh:2724: $? = 0 -configure.sh:2756: gcc -E conftest.c -configure:2755: ac_nonexistent.h: No such file or directory -configure.sh:2762: $? = 1 -configure.sh: failed program was: -| #line 2747 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| /* end confdefs.h. */ -| #include -configure.sh:2805: checking for egrep -configure.sh:2815: result: egrep -configure.sh:2820: checking for ANSI C header files -configure.sh:2846: gcc -c -g -O2 conftest.c >&5 -configure.sh:2849: $? = 0 -configure.sh:2852: test -s conftest.o -configure.sh:2855: $? = 0 -configure.sh:2944: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:2947: $? = 0 -configure.sh:2949: ./conftest -configure.sh:2952: $? = 0 -configure.sh:2967: result: yes -configure.sh:2991: checking for sys/types.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for sys/stat.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for stdlib.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for string.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for memory.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for strings.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for inttypes.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:2991: checking for stdint.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure:3047: stdint.h: No such file or directory -configure.sh:3011: $? = 1 -configure.sh: failed program was: -| #line 2996 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| /* end confdefs.h. */ -| #include -| #if HAVE_SYS_TYPES_H -| # include -| #endif -| #if HAVE_SYS_STAT_H -| # include -| #endif -| #if STDC_HEADERS -| # include -| # include -| #else -| # if HAVE_STDLIB_H -| # include -| # endif -| #endif -| #if HAVE_STRING_H -| # if !STDC_HEADERS && HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #if HAVE_STRINGS_H -| # include -| #endif -| #if HAVE_INTTYPES_H -| # include -| #else -| # if HAVE_STDINT_H -| # include -| # endif -| #endif -| #if HAVE_UNISTD_H -| # include -| #endif -| -| #include -configure.sh:3028: result: no -configure.sh:2991: checking for unistd.h -configure.sh:3008: gcc -c -g -O2 conftest.c >&5 -configure.sh:3011: $? = 0 -configure.sh:3014: test -s conftest.o -configure.sh:3017: $? = 0 -configure.sh:3028: result: yes -configure.sh:3049: checking for memory.h -configure.sh:3054: result: yes -configure.sh:3058: checking stddef.h usability -configure.sh:3071: gcc -c -g -O2 conftest.c >&5 -configure.sh:3074: $? = 0 -configure.sh:3077: test -s conftest.o -configure.sh:3080: $? = 0 -configure.sh:3090: result: yes -configure.sh:3094: checking stddef.h presence -configure.sh:3105: gcc -E conftest.c -configure.sh:3111: $? = 0 -configure.sh:3130: result: yes -configure.sh:3166: checking for stddef.h -configure.sh:3173: result: yes -configure.sh:3049: checking for stdlib.h -configure.sh:3054: result: yes -configure.sh:3049: checking for string.h -configure.sh:3054: result: yes -configure.sh:3049: checking for unistd.h -configure.sh:3054: result: yes -configure.sh:3188: checking for stdbool.h that conforms to C99 -configure.sh:3242: gcc -c -g -O2 conftest.c >&5 -configure:3218: #error bool is not defined -configure:3230: #error true is not 1 -configure.sh:3245: $? = 1 -configure.sh: failed program was: -| #line 3193 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| -| #include -| #ifndef bool -| # error bool is not defined -| #endif -| #ifndef false -| # error false is not defined -| #endif -| #if false -| # error false is not 0 -| #endif -| #ifndef true -| # error true is not defined -| #endif -| #if true != 1 -| # error true is not 1 -| #endif -| #ifndef __bool_true_false_are_defined -| # error __bool_true_false_are_defined is not defined -| #endif -| -| struct s { _Bool s: 1; _Bool t; } s; -| -| char a[true == 1 ? 1 : -1]; -| char b[false == 0 ? 1 : -1]; -| char c[__bool_true_false_are_defined == 1 ? 1 : -1]; -| char d[(bool) -0.5 == true ? 1 : -1]; -| bool e = &s; -| char f[(_Bool) -0.0 == false ? 1 : -1]; -| char g[true]; -| char h[sizeof (_Bool)]; -| char i[sizeof s.t]; -| -| int -| main () -| { -| return !a + !b + !c + !d + !e + !f + !g + !h + !i; -| ; -| return 0; -| } -configure.sh:3262: result: no -configure.sh:3264: checking for _Bool -configure.sh:3289: gcc -c -g -O2 conftest.c >&5 -configure: In function `main': -configure:3328: `_Bool' undeclared (first use in this function) -configure:3328: (Each undeclared identifier is reported only once -configure:3328: for each function it appears in.) -configure:3328: parse error before `)' -configure.sh:3292: $? = 1 -configure.sh: failed program was: -| #line 3269 "configure" -| /* confdefs.h. */ -| -| #define PACKAGE_NAME "intercal" -| #define PACKAGE_TARNAME "intercal" -| #define PACKAGE_VERSION "0.26" -| #define PACKAGE_STRING "intercal 0.26" -| #define PACKAGE_BUGREPORT "esr@thyrsus.com" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include -| #if HAVE_SYS_TYPES_H -| # include -| #endif -| #if HAVE_SYS_STAT_H -| # include -| #endif -| #if STDC_HEADERS -| # include -| # include -| #else -| # if HAVE_STDLIB_H -| # include -| # endif -| #endif -| #if HAVE_STRING_H -| # if !STDC_HEADERS && HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #if HAVE_STRINGS_H -| # include -| #endif -| #if HAVE_INTTYPES_H -| # include -| #else -| # if HAVE_STDINT_H -| # include -| # endif -| #endif -| #if HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if ((_Bool *) 0) -| return 0; -| if (sizeof (_Bool)) -| return 0; -| ; -| return 0; -| } -configure.sh:3309: result: no -configure.sh:3328: checking for an ANSI C-conforming const -configure.sh:3396: gcc -c -g -O2 conftest.c >&5 -configure.sh:3399: $? = 0 -configure.sh:3402: test -s conftest.o -configure.sh:3405: $? = 0 -configure.sh:3416: result: yes -configure.sh:3426: checking for size_t -configure.sh:3451: gcc -c -g -O2 conftest.c >&5 -configure.sh:3454: $? = 0 -configure.sh:3457: test -s conftest.o -configure.sh:3460: $? = 0 -configure.sh:3471: result: yes -configure.sh:3490: checking for stdlib.h -configure.sh:3495: result: yes -configure.sh:3627: checking for GNU libc compatible malloc -configure.sh:3657: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:3660: $? = 0 -configure.sh:3662: ./conftest -configure.sh:3665: $? = 0 -configure.sh:3679: result: yes -configure.sh:3707: checking for stdlib.h -configure.sh:3712: result: yes -configure.sh:3844: checking for GNU libc compatible realloc -configure.sh:3874: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:3877: $? = 0 -configure.sh:3879: ./conftest -configure.sh:3882: $? = 0 -configure.sh:3896: result: yes -configure.sh:3919: checking return type of signal handlers -configure.sh:3951: gcc -c -g -O2 conftest.c >&5 -configure.sh:3954: $? = 0 -configure.sh:3957: test -s conftest.o -configure.sh:3960: $? = 0 -configure.sh:3971: result: void -configure.sh:3986: checking for memset -configure.sh:4036: gcc -o conftest -g -O2 conftest.c >&5 -configure:4034: warning: conflicting types for built-in function `memset' -configure.sh:4039: $? = 0 -configure.sh:4042: test -s conftest -configure.sh:4045: $? = 0 -configure.sh:4056: result: yes -configure.sh:3986: checking for strrchr -configure.sh:4036: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:4039: $? = 0 -configure.sh:4042: test -s conftest -configure.sh:4045: $? = 0 -configure.sh:4056: result: yes -configure.sh:3986: checking for strtol -configure.sh:4036: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:4039: $? = 0 -configure.sh:4042: test -s conftest -configure.sh:4045: $? = 0 -configure.sh:4056: result: yes -configure.sh:3986: checking for strtoul -configure.sh:4036: gcc -o conftest -g -O2 conftest.c >&5 -configure.sh:4039: $? = 0 -configure.sh:4042: test -s conftest -configure.sh:4045: $? = 0 -configure.sh:4056: result: yes -configure.sh:4067: Version is 0.26 -configure.sh:4196: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by intercal config.status 0.26, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on chillingi - -config.status:614: creating Makefile -config.status:614: creating ickspec - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_c_compiler_gnu=yes -ac_cv_c_const=yes -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_exeext= -ac_cv_func_malloc_0_nonnull=yes -ac_cv_func_memset=yes -ac_cv_func_realloc_0_nonnull=yes -ac_cv_func_strrchr=yes -ac_cv_func_strtol=yes -ac_cv_func_strtoul=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_memory_h=yes -ac_cv_header_stdbool_h=no -ac_cv_header_stdc=yes -ac_cv_header_stddef_h=yes -ac_cv_header_stdint_h=no -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_unistd_h=yes -ac_cv_lib_fl_yywrap=no -ac_cv_lib_l_yywrap=yes -ac_cv_objext=o -ac_cv_prog_CPP=$'gcc -E' -ac_cv_prog_LEX=lex -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_cc_g=yes -ac_cv_prog_cc_stdc= -ac_cv_prog_egrep=egrep -ac_cv_prog_lex_root=lex.yy -ac_cv_prog_lex_yytext_pointer=no -ac_cv_prog_make_make_set=yes -ac_cv_type__Bool=no -ac_cv_type_signal=void -ac_cv_type_size_t=yes - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -CC='gcc' -CFLAGS='-g -O2' -CPP='gcc -E' -CPPFLAGS='' -DEFS='-DPACKAGE_NAME=\"intercal\" -DPACKAGE_TARNAME=\"intercal\" -DPACKAGE_VERSION=\"0.26\" -DPACKAGE_STRING=\"intercal\ 0.26\" -DPACKAGE_BUGREPORT=\"esr@thyrsus.com\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_MEMSET=1 -DHAVE_STRRCHR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 ' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='egrep' -EXEEXT='' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -LDFLAGS='' -LEX='lex' -LEXLIB='-ll' -LEX_OUTPUT_ROOT='lex.yy' -LIBOBJS='' -LIBS='' -LN_S='ln -s' -LTLIBOBJS='' -OBJEXT='o' -PACKAGE_BUGREPORT='esr@thyrsus.com' -PACKAGE_NAME='intercal' -PACKAGE_STRING='intercal 0.26' -PACKAGE_TARNAME='intercal' -PACKAGE_VERSION='0.26' -PATH_SEPARATOR=':' -SET_MAKE='' -SHELL='/bin/bash' -YACC='yacc' -ac_ct_CC='gcc' -bindir='${exec_prefix}/bin' -build_alias='' -datadir='${prefix}/share' -exec_prefix='${prefix}' -host_alias='' -includedir='${prefix}/include' -infodir='${prefix}/info' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localstatedir='${prefix}/var' -mandir='${prefix}/man' -oldincludedir='/usr/include' -prefix='/usr/local' -program_transform_name='s,x,x,' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -#define HAVE_INTTYPES_H 1 -#define HAVE_MALLOC 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MEMSET 1 -#define HAVE_REALLOC 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNISTD_H 1 -#define PACKAGE_BUGREPORT "esr@thyrsus.com" -#define PACKAGE_NAME "intercal" -#define PACKAGE_STRING "intercal 0.26" -#define PACKAGE_TARNAME "intercal" -#define PACKAGE_VERSION "0.26" -#define RETSIGTYPE void -#define STDC_HEADERS 1 - -configure.sh: exit 0 diff --git a/configure.sh b/config.sh similarity index 99% rename from configure.sh rename to config.sh index 9609f29..2657829 100755 --- a/configure.sh +++ b/config.sh @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for intercal 0.26. +# Generated by GNU Autoconf 2.57 for intercal 1.26. # # Report bugs to . # @@ -268,8 +268,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='intercal' PACKAGE_TARNAME='intercal' -PACKAGE_VERSION='0.26' -PACKAGE_STRING='intercal 0.26' +PACKAGE_VERSION='1.26' +PACKAGE_STRING='intercal 1.26' PACKAGE_BUGREPORT='esr@thyrsus.com' ac_unique_file="src/lose.h" @@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures intercal 0.26 to adapt to many kinds of systems. +\`configure' configures intercal 1.26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -836,7 +836,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of intercal 0.26:";; + short | recursive ) echo "Configuration of intercal 1.26:";; esac cat <<\_ACEOF @@ -915,7 +915,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -intercal configure 0.26 +intercal configure 1.26 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -930,7 +930,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by intercal $as_me 0.26, which was +It was created by intercal $as_me 1.26, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -4461,7 +4461,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by intercal $as_me 0.26, which was +This file was extended by intercal $as_me 1.26, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4516,7 +4516,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -intercal config.status 0.26 +intercal config.status 1.26 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/config.status b/config.status deleted file mode 100755 index 9ee60a8..0000000 --- a/config.status +++ /dev/null @@ -1,688 +0,0 @@ -#! /bin/bash -# Generated by configure.sh. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=${CONFIG_SHELL-/bin/bash} -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by intercal $as_me 0.26, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -config_files=" Makefile ickspec" - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -ac_cs_version="\ -intercal config.status 0.26 -configured by configure.sh, generated by GNU Autoconf 2.57, - with options \"\" - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=. -INSTALL="./install.sh -c" -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - echo "running /bin/bash configure.sh " $ac_configure_extra_args " --no-create --no-recursion" >&6 - exec /bin/bash configure.sh $ac_configure_extra_args --no-create --no-recursion -fi - -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "ickspec" ) CONFIG_FILES="$CONFIG_FILES ickspec" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF -s,@SHELL@,/bin/bash,;t t -s,@PATH_SEPARATOR@,:,;t t -s,@PACKAGE_NAME@,intercal,;t t -s,@PACKAGE_TARNAME@,intercal,;t t -s,@PACKAGE_VERSION@,0.26,;t t -s,@PACKAGE_STRING@,intercal 0.26,;t t -s,@PACKAGE_BUGREPORT@,esr@thyrsus.com,;t t -s,@exec_prefix@,${prefix},;t t -s,@prefix@,/usr/local,;t t -s,@program_transform_name@,s,x,x,,;t t -s,@bindir@,${exec_prefix}/bin,;t t -s,@sbindir@,${exec_prefix}/sbin,;t t -s,@libexecdir@,${exec_prefix}/libexec,;t t -s,@datadir@,${prefix}/share,;t t -s,@sysconfdir@,${prefix}/etc,;t t -s,@sharedstatedir@,${prefix}/com,;t t -s,@localstatedir@,${prefix}/var,;t t -s,@libdir@,${exec_prefix}/lib,;t t -s,@includedir@,${prefix}/include,;t t -s,@oldincludedir@,/usr/include,;t t -s,@infodir@,${prefix}/info,;t t -s,@mandir@,${prefix}/man,;t t -s,@build_alias@,,;t t -s,@host_alias@,,;t t -s,@target_alias@,,;t t -s,@DEFS@,-DPACKAGE_NAME=\"intercal\" -DPACKAGE_TARNAME=\"intercal\" -DPACKAGE_VERSION=\"0.26\" -DPACKAGE_STRING=\"intercal\ 0.26\" -DPACKAGE_BUGREPORT=\"esr@thyrsus.com\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_MEMSET=1 -DHAVE_STRRCHR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 ,;t t -s,@ECHO_C@,,;t t -s,@ECHO_N@,-n,;t t -s,@ECHO_T@,,;t t -s,@LIBS@,,;t t -s,@YACC@,yacc,;t t -s,@CC@,gcc,;t t -s,@CFLAGS@,-g -O2,;t t -s,@LDFLAGS@,,;t t -s,@CPPFLAGS@,,;t t -s,@ac_ct_CC@,gcc,;t t -s,@EXEEXT@,,;t t -s,@OBJEXT@,o,;t t -s,@LEX@,lex,;t t -s,@LEXLIB@,-ll,;t t -s,@LEX_OUTPUT_ROOT@,lex.yy,;t t -s,@INSTALL_PROGRAM@,${INSTALL},;t t -s,@INSTALL_SCRIPT@,${INSTALL},;t t -s,@INSTALL_DATA@,${INSTALL} -m 644,;t t -s,@LN_S@,ln -s,;t t -s,@SET_MAKE@,,;t t -s,@CPP@,gcc -E,;t t -s,@EGREP@,egrep,;t t -s,@LIBOBJS@,,;t t -s,@LTLIBOBJS@,,;t t -CEOF - - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - sed "/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done - -{ (exit 0); exit 0; } diff --git a/districk.bat b/districk.bat index 9a593ef..87103a2 100755 --- a/districk.bat +++ b/districk.bat @@ -1,9 +1,9 @@ -@echo off -rem This batch file removes all files that weren't in the distribution. -ren temp\parser.c parser.tmp -ren temp\parser.h parserh.tmp -ren temp\lexer.c lexer.tmp -call cleanick -ren temp\parser.tmp parser.c -ren temp\parserh.tmp parser.h -ren temp\lexer.tmp lexer.c +@echo off +rem This batch file removes all files that weren't in the distribution. +ren temp\parser.c parser.tmp +ren temp\parser.h parserh.tmp +ren temp\lexer.c lexer.tmp +call cleanick +ren temp\parser.tmp parser.c +ren temp\parserh.tmp parser.h +ren temp\lexer.tmp lexer.c diff --git a/doc/Makefile b/doc/Makefile index 6a134a5..6621a54 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,47 +1,47 @@ -# -# Makefile for the Intercal documentation -# - -# To see the Revised Manual, generate intercal.txt or intercal.ps -# To see the original INTERCAL-72 manual, generate original.txt or original.ps. - -# We make two passes in order to resolve SETR/GETNH references. -# The sed hackery strips the trailing dots from level 1 section references. - -x.txt: x.mm - groff -dc=y -Tascii -p -t -mm x.mm >x.txt - - -all: intercal.ps intercal.txt original.ps original.txt - -intercal.ps: intercal.mm - groff -dc=y -Tps -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=y -Tps -p -t -mm intercal.mm >intercal.ps - rm intercal.refs.qrf - -original.ps: intercal.mm - groff -dc=n -Tps -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=n -Tps -p -t -mm intercal.mm >original.ps - rm intercal.refs.qrf - -intercal.txt: intercal.mm - groff -dc=y -Tascii -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=y -Tascii -p -t -mm intercal.mm >intercal.txt - rm intercal.refs.qrf - -original.txt: intercal.mm - groff -dc=n -Tascii -p -t -mm intercal.mm >/dev/null - sed tmp.refs; - mv tmp.refs intercal.refs.tmp - groff -dc=n -Tascii -p -t -mm intercal.mm >original.txt - rm intercal.refs.qrf - -clean: - rm -f *.ps *.txt *.refs* - +# +# Makefile for the Intercal documentation +# + +# To see the Revised Manual, generate intercal.txt or intercal.ps +# To see the original INTERCAL-72 manual, generate original.txt or original.ps. + +# We make two passes in order to resolve SETR/GETNH references. +# The sed hackery strips the trailing dots from level 1 section references. + +x.txt: x.mm + groff -dc=y -Tascii -p -t -mm x.mm >x.txt + + +all: intercal.ps intercal.txt original.ps original.txt + +intercal.ps: intercal.mm + groff -dc=y -Tps -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=y -Tps -p -t -mm intercal.mm >intercal.ps + rm intercal.refs.qrf + +original.ps: intercal.mm + groff -dc=n -Tps -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=n -Tps -p -t -mm intercal.mm >original.ps + rm intercal.refs.qrf + +intercal.txt: intercal.mm + groff -dc=y -Tascii -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=y -Tascii -p -t -mm intercal.mm >intercal.txt + rm intercal.refs.qrf + +original.txt: intercal.mm + groff -dc=n -Tascii -p -t -mm intercal.mm >/dev/null + sed tmp.refs; + mv tmp.refs intercal.refs.tmp + groff -dc=n -Tascii -p -t -mm intercal.mm >original.txt + rm intercal.refs.qrf + +clean: + rm -f *.ps *.txt *.refs* + diff --git a/doc/READ.ME b/doc/READ.ME index fd507bf..2fc871c 100644 --- a/doc/READ.ME +++ b/doc/READ.ME @@ -1,36 +1,36 @@ -This directory contains the documentation (such as it is) for INTERCAL. - -READ.ME - This file. - -intercal.mm: - Masters for the INTERCAL manual (needs pic to render illos) - This has been carefully proofread against the original paper - version. - -THEORY - Implementation notes on the C-INTERCAL implementation. - -chip.spec: - Christian Brunschen's spec sheet for the INTERCAL chip. - -Note 1: The TeX version we formerly distributed has been dropped. The -combination of groff and pic does an effective job of rendering the -illustrations and is easier to maintain. - -Note 2: The supplemental reference manual, ick.txt, has been merged -into the intercal manual. (It is still possible to generate the -original; see the Makefile.) - -Note 3: The flat-ASCII directly transcribed from the paper original is -also gone. You can regenerate something very close to it with `make -original.txt'. The differences will be (a) page breaks may fall in -different places, (b) the circuit diagrams present in the paper -version but absent in the ASCII transcription are instead poorly -approximated with ASCII boxology, (c) every "butchered Roman numeral" -is preceded and followed by a line break, (d) the hanging-indent list -of Princeton compiler options has all marks above each description, -rather than to its left. - -The aim of these changes was to reduce to one the number of manual masters that -need to be maintained. +This directory contains the documentation (such as it is) for INTERCAL. + +READ.ME + This file. + +intercal.mm: + Masters for the INTERCAL manual (needs pic to render illos) + This has been carefully proofread against the original paper + version. + +THEORY + Implementation notes on the C-INTERCAL implementation. + +chip.spec: + Christian Brunschen's spec sheet for the INTERCAL chip. + +Note 1: The TeX version we formerly distributed has been dropped. The +combination of groff and pic does an effective job of rendering the +illustrations and is easier to maintain. + +Note 2: The supplemental reference manual, ick.txt, has been merged +into the intercal manual. (It is still possible to generate the +original; see the Makefile.) + +Note 3: The flat-ASCII directly transcribed from the paper original is +also gone. You can regenerate something very close to it with `make +original.txt'. The differences will be (a) page breaks may fall in +different places, (b) the circuit diagrams present in the paper +version but absent in the ASCII transcription are instead poorly +approximated with ASCII boxology, (c) every "butchered Roman numeral" +is preceded and followed by a line break, (d) the hanging-indent list +of Princeton compiler options has all marks above each description, +rather than to its left. + +The aim of these changes was to reduce to one the number of manual masters that +need to be maintained. diff --git a/doc/THEORY b/doc/THEORY index a2004da..a4fd402 100644 --- a/doc/THEORY +++ b/doc/THEORY @@ -1,199 +1,199 @@ - INTERCAL IMPLEMENTOR'S NOTES - by ESR - -The C-INTERCAL compiler has a very conventional implementation using -YACC and LEX (latterly, bison and flex). It generates C, which -is then passed to your C compiler. - - Lexical issues - -Note that the spectacular ugliness of INTERCAL syntax requires that -the lexical analyzer have two levels. One, embedded in the input() -function, handles the backquote and bang constructs, and stashes the -input line away in a buffer for the splat construct's benefit. The -upper level is generated by lex(1) and does normal tokenizing for YACC. - -In order to splatter erroneous statements correctly, the generated code has -to track both logical and physical lines. That's the reason for the -`lineno' variable in the generated C, it's actually tracking physical lines. - -Numeral tokens for input are defined in a symbol table (numerals.c) -that is directly included in the run-time library module (cesspool.c). -This avoids having to put the the size of the numerals array in an -extern. To add new numeral tokens, simply put them in the numerals -initializer. - -AIS: Now computed COME FROM is in the language, the lexer is called forth to - do a bit of syntax analysis, by distinguishing it from an ordinary - COME FROM and passing different symbols to the parser. The lexer is also - responsible for helping the parser to match sparks and ears in complicated - array situations, by distinguishing possibly closing sparkears from - definitely opening sparkears. - - Compilation - -The parser builds an array of tuples, one for each INTERCAL statement. Most -tuples have node trees attached. Once all tuples have been generated, -the compile-time checker and optimizer phases can do consistency checks -and expression-tree rewrites. Finally, the tuples are ground out as C code -by the emit() function. - -Calculations are fully type-checked at compile time; they have to be because -(as I read the manual) the 16- and 32-bit versions of the unary ops do -different things. The only potential problem here is that the typechecker -has to assume that :m ~ :n has the type of :n (32-bit) even though the -result might fit in 16 bits. At run-time everything is calculated in 32 -bits. When INTERCAL-72 was designed 32 bits was expensive; now it's cheap. -Really, the only reason for retaining a 16-bit type at all is for the -irritation value of it (yes, C-INTERCAL *does* enforce the 16-bit limit -on constants). - -Labels are mapped to tuple indices (logical line numbers) in the code -checker, just before optimization. - -The optimizer does full recursive folding of all constant expressions -at compile time (evaluating away all the irritating little kluges you -have to use to generate 32-bit constants). It also checks for known -INTERCAL idioms for `test for equality', `test for nonzeroness', and -the C logical operators &, |, ^, and ~. - -AIS: The optimizer has now been expanded. See below. - - Code Generation - -Each line of INTERCAL is translated into a C if()-then; the guard part -is used to implement abstentions and RESUMES, and the arm part -translates the `body' of the corresponding INTERCAL statement. - -The generated C code is plugged into the template file ick-wrap.c -inside main(). It needs to be linked with cesspool.o, fiddle.o and -lose.o (these are in libick.a, with the support for runtime switches, -arrgghh.o). Cesspool.o is the code that implements the storage -manager; fiddle.o implements the INTERCAL operators; and lose.o is the -code that generates INTERCAL's error messages. The routine arrgghh.o -parses the runtime command line arguments. - -The abstain[] array in the generated C is used to track line and label -abstentions; if member i is on, the statement on line i is being -abstained from. If gerund abstentions/reinstatements are present in -the code, a second array recording the type of each statement in -generated into the runtime, and used to ensure that these operations -are translated into abstention-guard changes on all appropriate line numbers. - -RESUMES are implemented with a branch to a generated switch statement -that executes a goto to the appropriate label. If there are no RESUMES, -no such switch is generated. - -The compiler places a simple label at the location of each COME FROM -in the program, while all of the machinery for checking for abstention -and conditional execution and actually performing the jump is placed -immediately after the code for the target statement. - - Credits - -I wrote the first version of this compiler over a weekend using a -pre-ANSI C compiler. It worked, but it wasn't pretty. Louis Howell -added the array support later; he also torture-tested the COME FROM -implementation by actually using it for the life2.i program included -in this distribution, and fixed some bugs. Brian Raiter did a -much-needed delinting while porting it for ANSI C, flex and Linux. He -also improved the lexical analyzer's line tracking. - - Code Generation 2 (by AIS) - -The recent additions to the language have made code generation -potentially more complicated, depending on which switches are on. Each -INTERCAL command is still translated into an if()-then, but with extra -guards around it. COME FROM is still handled the same way, but only in -singlethreaded programs with no computed COME FROMs. For anything more -complicated than that, a general COMING FROM mechanism is invoked. C's -most confusing control-flow identifiers, setjmp and longjmp, are -used. When computed COME FROMs are involved, after every labeled -statement, a set of gotos are done to check each in turn. A jmp_buf, -cjb, is used to store the point in the program where the check -started. Each COME FROM leading to that line and computed COME FROM -anywhere in the program is checked, and modifies cjb to aim for its -suckpoint if neccesary. In the case of a multithreaded program, one -cjb will be stored in a linked ring of threads, and the other will be -the one in the main program. -Extra guards are also added for ONCE/AGAIN; the position of this guard -depends on whether the command is a NEXT or something else. ONCE/AGAIN -are quite legal even in singlethreaded programs. Computed ABSTAIN is -dealt with by allowing the abstain[] array to hold values other than 0 -or 1. -Multithreading is supported by a new library, libickmt.a, to hold the -multithread versions of libick.a functions. See unravel.c for an -explanation of the full gory details of the multithread implementation -(it has many comments explaining the implementation at the top). - - Optimisation (by AIS) - -When I got my C-INTERCAL distribution, it only had a rudimentary -optimiser. Constant folding had already been done, and the following -optimisations. The following is mixed INTERCAL and C, sometimes in the -same statement. It should be clear from context and whether I have -used INTERCAL spark-ears or C brackets which language is which, although -in some places I've mixed them. Note that apart from constant folding, the -optimizer is only run in binary. - -Optimizations available with -O - -Optimisations that had already been done -Constant folding -'Vx$y'~"#0x55555555" into (x | y) -'?x$y'~"#0x55555555" into (x ^ y) -'&x$y'~"#0x55555555" into (x & y) -(x ^ 0xFFFF) or (x ^ 0xFFFFFFFF) into ~x -I added: -Support for the first three examples above for some appropriate constants -other than 0x55555555 (e.g. 0x1555) -x~k into (x & k) where k is 2**n-1 -x~k into !!(x & k) where k is 2**n -x~k into (x & k)>>1 where k is 2**n-2 -'x$0'~k into (x & )<<1 for values of k that represent - left-shifts -'x$1'~k into ((x & )<<1) | 1 likewise -32-bit left-shift idioms -Double left-shift idioms -syslib's left-shift by 8 idiom -'x~x'~1 into ('x~x' & 1) into !!x -'?x$1'~3 into (x & 1)+ 1 -'?x$2'~3 into 2 - (x & 1) -(x & 1) & 1 into (x & 1) in the above two cases -(!!x & 1) into !!x in the two cases above the above case -Idioms that represent 32-bit logical operations (|, &, ^, ~) into their C -equivalents -No-op detection for some C-like idioms -Simplification of some C-like idioms via the distributive law -Some C-like operations done only on the even or odd bits of a value -Some mingle/select combinations that can be replaced with & | and bitshifts -A truly stupid idiom in syslib that does 32-bit rightshifts by separating -odd bits and even bits -Analysis of which bits in a number must always be 0, and which ones -actually carry information (which can often remove a redundant & or -other logical operator) -Idiom recognition for > and != -Various other optimizations (many only on partially-optimized code) - -Optimizations available with -f (I wrote all these) - -Guard removal (if a line can't be abstained, the if(!abstained[x]) -line is removed when possible -Ignorance checks (if a variable can't be ignored and it can't -overflow, assignment is done with C's = rather than a function) -Recognition of NEXT...NEXT...computed RESUME as an idiom for if() - -Optimizations available with -F (I wrote this one) - -This optimization should mean that INTERCAL suddenly becomes the best -language for various benchmark programs. Basically, the file is -analysed to try to determine whether it takes no input and always -produces the same output. If that is the case, the output is simply a -shell-script (with executable permissions set and a #! line) that -outputs the correct output! Therefore, the time required for one run -of the program is taken up during compilation, and whenever the -program is executed, it just copies out the predetermined output. This -means (for instance) that primes.i runs in only a fraction of a second -when optimized with -F. -Of course, this tends to slow down the compiler and often produces a + INTERCAL IMPLEMENTOR'S NOTES + by ESR + +The C-INTERCAL compiler has a very conventional implementation using +YACC and LEX (latterly, bison and flex). It generates C, which +is then passed to your C compiler. + + Lexical issues + +Note that the spectacular ugliness of INTERCAL syntax requires that +the lexical analyzer have two levels. One, embedded in the input() +function, handles the backquote and bang constructs, and stashes the +input line away in a buffer for the splat construct's benefit. The +upper level is generated by lex(1) and does normal tokenizing for YACC. + +In order to splatter erroneous statements correctly, the generated code has +to track both logical and physical lines. That's the reason for the +`lineno' variable in the generated C, it's actually tracking physical lines. + +Numeral tokens for input are defined in a symbol table (numerals.c) +that is directly included in the run-time library module (cesspool.c). +This avoids having to put the the size of the numerals array in an +extern. To add new numeral tokens, simply put them in the numerals +initializer. + +AIS: Now computed COME FROM is in the language, the lexer is called forth to + do a bit of syntax analysis, by distinguishing it from an ordinary + COME FROM and passing different symbols to the parser. The lexer is also + responsible for helping the parser to match sparks and ears in complicated + array situations, by distinguishing possibly closing sparkears from + definitely opening sparkears. + + Compilation + +The parser builds an array of tuples, one for each INTERCAL statement. Most +tuples have node trees attached. Once all tuples have been generated, +the compile-time checker and optimizer phases can do consistency checks +and expression-tree rewrites. Finally, the tuples are ground out as C code +by the emit() function. + +Calculations are fully type-checked at compile time; they have to be because +(as I read the manual) the 16- and 32-bit versions of the unary ops do +different things. The only potential problem here is that the typechecker +has to assume that :m ~ :n has the type of :n (32-bit) even though the +result might fit in 16 bits. At run-time everything is calculated in 32 +bits. When INTERCAL-72 was designed 32 bits was expensive; now it's cheap. +Really, the only reason for retaining a 16-bit type at all is for the +irritation value of it (yes, C-INTERCAL *does* enforce the 16-bit limit +on constants). + +Labels are mapped to tuple indices (logical line numbers) in the code +checker, just before optimization. + +The optimizer does full recursive folding of all constant expressions +at compile time (evaluating away all the irritating little kluges you +have to use to generate 32-bit constants). It also checks for known +INTERCAL idioms for `test for equality', `test for nonzeroness', and +the C logical operators &, |, ^, and ~. + +AIS: The optimizer has now been expanded. See below. + + Code Generation + +Each line of INTERCAL is translated into a C if()-then; the guard part +is used to implement abstentions and RESUMES, and the arm part +translates the `body' of the corresponding INTERCAL statement. + +The generated C code is plugged into the template file ick-wrap.c +inside main(). It needs to be linked with cesspool.o, fiddle.o and +lose.o (these are in libick.a, with the support for runtime switches, +arrgghh.o). Cesspool.o is the code that implements the storage +manager; fiddle.o implements the INTERCAL operators; and lose.o is the +code that generates INTERCAL's error messages. The routine arrgghh.o +parses the runtime command line arguments. + +The abstain[] array in the generated C is used to track line and label +abstentions; if member i is on, the statement on line i is being +abstained from. If gerund abstentions/reinstatements are present in +the code, a second array recording the type of each statement in +generated into the runtime, and used to ensure that these operations +are translated into abstention-guard changes on all appropriate line numbers. + +RESUMES are implemented with a branch to a generated switch statement +that executes a goto to the appropriate label. If there are no RESUMES, +no such switch is generated. + +The compiler places a simple label at the location of each COME FROM +in the program, while all of the machinery for checking for abstention +and conditional execution and actually performing the jump is placed +immediately after the code for the target statement. + + Credits + +I wrote the first version of this compiler over a weekend using a +pre-ANSI C compiler. It worked, but it wasn't pretty. Louis Howell +added the array support later; he also torture-tested the COME FROM +implementation by actually using it for the life2.i program included +in this distribution, and fixed some bugs. Brian Raiter did a +much-needed delinting while porting it for ANSI C, flex and Linux. He +also improved the lexical analyzer's line tracking. + + Code Generation 2 (by AIS) + +The recent additions to the language have made code generation +potentially more complicated, depending on which switches are on. Each +INTERCAL command is still translated into an if()-then, but with extra +guards around it. COME FROM is still handled the same way, but only in +singlethreaded programs with no computed COME FROMs. For anything more +complicated than that, a general COMING FROM mechanism is invoked. C's +most confusing control-flow identifiers, setjmp and longjmp, are +used. When computed COME FROMs are involved, after every labeled +statement, a set of gotos are done to check each in turn. A jmp_buf, +cjb, is used to store the point in the program where the check +started. Each COME FROM leading to that line and computed COME FROM +anywhere in the program is checked, and modifies cjb to aim for its +suckpoint if neccesary. In the case of a multithreaded program, one +cjb will be stored in a linked ring of threads, and the other will be +the one in the main program. +Extra guards are also added for ONCE/AGAIN; the position of this guard +depends on whether the command is a NEXT or something else. ONCE/AGAIN +are quite legal even in singlethreaded programs. Computed ABSTAIN is +dealt with by allowing the abstain[] array to hold values other than 0 +or 1. +Multithreading is supported by a new library, libickmt.a, to hold the +multithread versions of libick.a functions. See unravel.c for an +explanation of the full gory details of the multithread implementation +(it has many comments explaining the implementation at the top). + + Optimisation (by AIS) + +When I got my C-INTERCAL distribution, it only had a rudimentary +optimiser. Constant folding had already been done, and the following +optimisations. The following is mixed INTERCAL and C, sometimes in the +same statement. It should be clear from context and whether I have +used INTERCAL spark-ears or C brackets which language is which, although +in some places I've mixed them. Note that apart from constant folding, the +optimizer is only run in binary. + +Optimizations available with -O + +Optimisations that had already been done +Constant folding +'Vx$y'~"#0x55555555" into (x | y) +'?x$y'~"#0x55555555" into (x ^ y) +'&x$y'~"#0x55555555" into (x & y) +(x ^ 0xFFFF) or (x ^ 0xFFFFFFFF) into ~x +I added: +Support for the first three examples above for some appropriate constants +other than 0x55555555 (e.g. 0x1555) +x~k into (x & k) where k is 2**n-1 +x~k into !!(x & k) where k is 2**n +x~k into (x & k)>>1 where k is 2**n-2 +'x$0'~k into (x & )<<1 for values of k that represent + left-shifts +'x$1'~k into ((x & )<<1) | 1 likewise +32-bit left-shift idioms +Double left-shift idioms +syslib's left-shift by 8 idiom +'x~x'~1 into ('x~x' & 1) into !!x +'?x$1'~3 into (x & 1)+ 1 +'?x$2'~3 into 2 - (x & 1) +(x & 1) & 1 into (x & 1) in the above two cases +(!!x & 1) into !!x in the two cases above the above case +Idioms that represent 32-bit logical operations (|, &, ^, ~) into their C +equivalents +No-op detection for some C-like idioms +Simplification of some C-like idioms via the distributive law +Some C-like operations done only on the even or odd bits of a value +Some mingle/select combinations that can be replaced with & | and bitshifts +A truly stupid idiom in syslib that does 32-bit rightshifts by separating +odd bits and even bits +Analysis of which bits in a number must always be 0, and which ones +actually carry information (which can often remove a redundant & or +other logical operator) +Idiom recognition for > and != +Various other optimizations (many only on partially-optimized code) + +Optimizations available with -f (I wrote all these) + +Guard removal (if a line can't be abstained, the if(!abstained[x]) +line is removed when possible +Ignorance checks (if a variable can't be ignored and it can't +overflow, assignment is done with C's = rather than a function) +Recognition of NEXT...NEXT...computed RESUME as an idiom for if() + +Optimizations available with -F (I wrote this one) + +This optimization should mean that INTERCAL suddenly becomes the best +language for various benchmark programs. Basically, the file is +analysed to try to determine whether it takes no input and always +produces the same output. If that is the case, the output is simply a +shell-script (with executable permissions set and a #! line) that +outputs the correct output! Therefore, the time required for one run +of the program is taken up during compilation, and whenever the +program is executed, it just copies out the predetermined output. This +means (for instance) that primes.i runs in only a fraction of a second +when optimized with -F. +Of course, this tends to slow down the compiler and often produces a large object file, which is why it has a command-line option of its own. \ No newline at end of file diff --git a/doc/chip.spec b/doc/chip.spec index 8e1b204..2ae01b3 100644 --- a/doc/chip.spec +++ b/doc/chip.spec @@ -1,607 +1,607 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - The Intercal Machine Machine Language Specification File - (c) 1990 Christian Brunschen, - a. k. a. d89cb@efd.lth.se - -This file contains the specifications for the Machine / Assembly Language -used by the Intercal Machine Microprocesor, which closely follows the -definition of the Intercal Compiler Language as defined by Woods/Lyon -in 1972. It also contains ideas as to the actual implementation, -hard- or softwarewise, of the Processor Instruction Set in an actual -environment. - -It should be noted that the Intercal Machine Microprocessor is the first -actual RISC processor (RISC being, of course, the acronym for -Ridiculous Instruction Set Computer). - -Overview of processor capabilities / requirements - -Schematic overview of processor I/O busses: - - +----------------\ /--------------+ - _| \_/ |_ - D +--- |_| D0 A04 |_| ---+ - a | _| |_ | - t | |_| D1 A05 |_| | - a | _| |_ | - | |_| D2 A06 |_| | - b | _| |_ | - u | |_| D3 A07 |_| | - s ---+ _| |_ | - | |_| D4 A08 |_| | - 8 | _| |_ | A - | |_| D5 A09 |_| | d - b | _| |_ | d - i | |_| D6 A10 |_| | r - t | _| |_ | e - s +--- |_| D7 A11 |_| | s - _| |_ | s - |_| DACK A12 |_| | - _| |_ | - |_| GND A13 |_| | - _| _____ |_ | b - |_| RESET A14 |_| +--- u - _| ____ |_ | s - |_| MEM/WRLD A15 |_| | - _| _ |_ | 2 - |_| R/W A16 |_| | 4 - _| |_ | - |_| CLK A17 |_| | b - _| |_ | i - |_| VCC A18 |_| | t - _| |_ | s - |_| ERROR A19 |_| | - _| |_ | - +--- |_| A00 A20 |_| | - | _| |_ | - | |_| A01 A21 |_| | - | _| |_ | - | |_| A02 A22 |_| | - | _| |_ | - | |_| A03 A23 |_| | - | | | | - | +-----------------------------------+ | - | | - | | - +-------------------------------------------------+ - -The only signals that might require some explanation are probably - _ -R/W : When this signal is low, The processor is reading data from the databus. - When it is high, the processor is driving the the databus. -_____ -RESET : When this signal goes low, the processor is reset, and starts reading - incoming data from the databus, one byte each clock cycle, until the - line goes high again, at which time the processor will resume execution - of the program at memory location (Hex) 000000 (24 bits, remeber ?) - ____ -MEM/WRLD : _ - Indicates the `target' or `source' (depending on the status of the R/W - line) of the data bus, sort of like an additional address bit. If this - line is low, the processor is communicating with the outside world. If - it is high, the processor is talking to its memory. - -DACK : Data ACKnowledge. Used when the processor communicates with the - outside world. Two cases: - a) Processor Talking - After the processor put the data on the databus, it will wait - until the DACK has been raised, and then dropped again. Then - it will put the next byte of data (if any) on the bus, or - proceed to the next instruction. - b) Processor listening - The same procedure as above, but in the other direction : - After the processor has read one byte of data, it quickly raises & - drops the line, and then expects the next data item to be present. - -ERROR : Indicates the fact that an error condition has occurred somewhere - in the program. The error number is present on the data bus. - After the error number has ben read, the address of the next statement - to be executed, had the eror not occurred, can be read in three - consecutive bytes from the databus. - -Processor Memory Management - -Since the Intercal Language provides quite a few interesting ways to manipulate -arrays, stash and retrieve data, etc, all of which operations require -manipulations of memory, and it was the intention of this implementation to -provide an instruction set which immediately makes the average Intercal -programmer feel right at home, quite a few very complex instructions have been -provided. - -Intercal Machine Language Reference Part - -Summary of instructions: - -ABG ABstain from Gerund -ABL ABstain from Label -ALA ALlocate Aray -BAA Begin Array Allocation -BIA Begin Indexing Array -BIN BINary operator -CAL CALculate -DLD Data LoaD -EAA End Array Allocation -FRG FoRGet -IDA InDex Array -IGN IGNore -INS INitiate Statement -NEX NEXt -OST Open STorage -PCT PerCenTage qualifier -POP POP -PPA PoP Array pointers -PSA PuSh Array pointers -PSH PuSH -RDO ReaD Out -REG Reinstate Gerund -REL Reinstate Label -RMB ReMemBer -RSM ReSuMe -RTV ReTrieVe -STS STaSh -UNO UNary Operator -WRI WRite In - -General Format: - - i i i i i p p s - -where - - i = instruction field - p = private field - s = size field - -ABstain from Label - -ABL Label - - 0 1 1 1 1 0 0 0 - -Sets the abstain bit of instruction at Label - -ABstain from Gerund - -ABG mnm - - 0 1 1 1 1 1 0 0 - -Sets the abstain bit of all statements whosde main instruction is mnm - -Allocate Array - - -ALA #num -ALA .var -ALA :var -ALA , -ALA ; -ALA RES - - - 0 0 0 1 1 p p s - -where p p specifies the source, - 0 0 : immediate data <16 bits> - 0 1 : Variable - 1 0 : Array, as pointed to by the Read Array Pointer - 1 1 : the contents of the RES register - -Takes the ALA argument, multiplies it with the current contents of the -Temproary Register, and puts the result in the Temporary Register. - -Begin Allocating Array - -BAA ,var -BAA ;var - - - 0 0 0 1 0 0 0 s - array specifier, 16 bits - jump offset, 16 bits - -Deallocates the memory block currently allocated to array `var', -opens the Arrray Entry for array `var' for writing, and puts a pointer -to the Array Entry in the Wite Array Data pointer register. If the array -is being ignored, none of these things actually happen -- instead, the -jump offset is added to the program counter. - -Begin Indexing Array - -BIA R ,var -BIA W ,var -BIA R ;var -BIA W ;var - - - 0 0 1 0 1 0 t s - array specifier, 16 bits - -where t = type, 0 = Read or 1 = Write - -Sets the Read Array Data pointer to the address of the first array element, -and the Read Array Dimension pointer to the first Dimension entry in the -Array Table, thus preparing for further indexing. - -BINary operator - -BIN ~ Select -BIN c/ Interleave, -BIN $ aka Mingle - - 0 1 1 0 0 t 0 0 - -where t is the operation specifier: - 0 : Select - 1 : Interleave / Mingle - -The operation is performed on the OP1 and OP2 registers, and the result is -placed in the RES register. - -CALculate - -CAL . -CAL : -CAL , -CAL ; - - - 0 1 0 1 0 0 0 s - -Puts the contents of the RES register in the memory location pointed to by -the Write Array Data pointer - -Data LoaD - -DLD t #num -DLD t .var -DLD t :var -DLD t , -DLD t ; -DLD t RES - - - 0 1 0 0 t p p s - -where t = target register, 0 = OP1 or 1 = OP2 - p p = source : - 0 0 : Immediate data <16 bits> - 0 1 : Variable - 1 0 : Array item (as indexed by the Read Array Data pointer) - 1 1 : RES register - -Loads the target register with the contents of the source - -End Allocating Array - -EAA - - - 0 0 1 0 0 0 0 0 - -Allocates a chunk of memory to the size of - -FoRGet - -FRG #num -FRG .var -FRG :var -FRG , -FRG ; -FRG RES - - - 1 0 0 0 0 p p s - -where p p = source : - 0 0 : Immediate <16 bits> - 0 1 : variable - 1 0 : array (as indexed by the Read Array Data pointer) - 1 1 : RES register - -Pops source number of addresses from the stack, discarding them. - -InDex Array -IDA R #num -IDA W #num -IDA R .var -IDA W .var -IDA R :var -IDA W :var -IDA R RES -IDA W RES - - - 0 0 1 1 t p p s - -where t = type, 0 = Read or 1 = Write - p p = source : - 0 0 : Immediate Data <16 bits> - 0 1 : variable - 1 0 : ILLEGAL - 1 1 : RES register - -Takes the Array Dimension (i.e, what the Array Dimension Pointer points to), -adds (#num or RES) instances of it to the Array Data Pointer, and adds 2 to the -Array Dimension Pointer. - -IGNore - -IGN .var -IGN :var -IGN ,var -IGN ;var - - 1 0 1 0 1 0 0 s - variable specifier, 16 bits - -Sets the ignore flag of the variable specified - -INitiate Statement - -INS mnm Label - -where `mnm' is one of the following 3-character mnemonics: - -ABS ABStain -REI REInstate -CAL CALculate -NEX NEXt -FRG FoRGet -RES RESume -STS STaSh -RTV ReTrieVe -IGN IGNore -RMB ReMemBer -WRI WRite In -RDO ReaD Out - - - 1 1 1 p p p p p - 2 bytes : - a o o o o o o o o o o o o o o o - -where p p p p p = major instruction opcode - -where a is the abstain bit of the instruction : set if this instruction -is to be abstained from. The remaining 15 bits are the jump offset, which will -be added to the program counter should the instruction be abstained from. -It is presumed that no statement will result in code exceeding 32.767 bytes. - -NEXt - -NEX Label - - 0 1 1 0 1 0 0 0 - Target Address, 24 bits - -Pushes the address of the next instruction on the return stack and puts the -Target addres in the Program counter - -Open STorage - -OST .var Label -OST :var Label -OST ,var Label -OST ;var Label - - - 0 0 0 0 1 0 0 s - variable/array specifier, 16 bits - jump offset, 8 bits - - -Trys to open the specified variable for writing. -If it being ignored (i.e, its ignore flag is set) the jump offset is -added to the program counter. -If it is an array, the Write Array Data pointer is set to the address -of the first element of the array, and the Write Array Dimension pointer -to the first dimension entry in the Array Table. -If it is a Variable, the Write Array Data pointer is set to the address -of the Variable. - -PerCenTage qualifier - -PCT #num Label - - - 0 0 0 0 0 0 0 0 - 0 c c c c c c c - Jump offset, 16 bits - -where c c c c c c c is a 7 bit binary number between 0 and 100 - -Gets a random number in the range 0 .. 99, compares it to the percent chance -and acts on the result: -- if the random number is less than the percent chance, nothing is done -- if it is equal or greater, the jump offset is added to the program counter - -POP - -POP - - - 1 1 0 0 0 0 1 0 - -Gets the top item on the stack and puts it in the RES register -- 32 bits - -PoP Array pointers - -PPA - - 1 1 0 0 1 0 1 0 - -Retrieves the contents of the Read Array Data pointer from the stack - -PuSh Array pointers - -PSA - - - 1 1 0 0 1 0 0 0 - -Pushes the contents of the Read Array Data pointer to an internal stack - -PuSH - -PSH - - - 1 1 0 0 0 0 0 0 - -Pushes the RES register to the stack -- 32 bits - -ReaD Out - -RDO #num -RDO .var -RDO :var -RDO , -RDO ; -RDO RES - - - 1 0 1 1 1 p p s - -where p p = source: - 0 0 : Immediate <16 bits> - 0 1 : Variable - 1 0 : Array (as pointed to by the Read Array Data pointer) - 1 1 : RES register - -Writes 2 or 4 bytes (16 or 32 bits) on the data bus - -REinstate Gerund - -REG mnm - - 0 1 1 1 0 1 0 0 - operation specifier, 8 bits - -In this form, the hole program will be searched to find instructions of the -specified type, and their abstain bits will be reset. - -REinstate Label - -REL Label - - 0 1 1 1 0 0 0 0 - Label, 24 bits - -In this form, the instruction at the address of Label will have its abstain -bit set/reset. - -ReMemBer - -RMB .var -RMB :var -RMB ,var -RMB ;var - - 1 0 1 0 0 0 0 s - variable specifier, 16 bits - -Clears the specified variable's ignore flag - -ReSuMe - -RSM #num -RSM .var -RSM :var -RSM , -RSM ; -RSM RES - - 1 0 0 0 1 p p s - -where p p = source : - 0 0 : Immediate <16 bits> - 0 1 : variable - 1 0 : array (as indexed by the Read Array Data pointer) - 1 1 : RES register - -Pops source number of addresses from the stack. -If there are less than `source' items on the stack, the procesor is halted -and an error signaled -If no error occurs, the last popped address is NOT discarded, but instead -placed in the Program counter. - -ReTrieVe - -RTV .var -RTV :var -RTV ,var -RTV ;var - - 1 0 0 1 1 0 0 s - Variable/Array Specifier, 16 bits - -Retrieves the latest stashed instance of the variable or array specified - -STaSh - -STS .var -STS :var -STS ,var -STS ;var - - 1 0 0 1 0 0 0 s - Variable/Array specifier, 16 bits - -Stashes the variable or array specified - -UNary Operator - -UNO & AND -UNO V OR -UNO V- XOR -UNO ? XOR - - 0 1 0 1 1 t t s - -where t is the operation specifier: - 00 : AND - 01 : OR - 10 : XOR - 11 : Illegal - -The specified operation is performed on the RESult register, leaving it there. - -WRite In - -WRI . -WRI : -WRI , -WRI ; - - - 1 0 1 1 0 0 0 s - -Reads 2 or 4 bytes (16 or 32 bits) from the data bus and puts them in -the variable pointed to by the Write Array Data pointer - + + + + + + + + + + + + + + + + + + + + + + + + + + + The Intercal Machine Machine Language Specification File + (c) 1990 Christian Brunschen, + a. k. a. d89cb@efd.lth.se + +This file contains the specifications for the Machine / Assembly Language +used by the Intercal Machine Microprocesor, which closely follows the +definition of the Intercal Compiler Language as defined by Woods/Lyon +in 1972. It also contains ideas as to the actual implementation, +hard- or softwarewise, of the Processor Instruction Set in an actual +environment. + +It should be noted that the Intercal Machine Microprocessor is the first +actual RISC processor (RISC being, of course, the acronym for +Ridiculous Instruction Set Computer). + +Overview of processor capabilities / requirements + +Schematic overview of processor I/O busses: + + +----------------\ /--------------+ + _| \_/ |_ + D +--- |_| D0 A04 |_| ---+ + a | _| |_ | + t | |_| D1 A05 |_| | + a | _| |_ | + | |_| D2 A06 |_| | + b | _| |_ | + u | |_| D3 A07 |_| | + s ---+ _| |_ | + | |_| D4 A08 |_| | + 8 | _| |_ | A + | |_| D5 A09 |_| | d + b | _| |_ | d + i | |_| D6 A10 |_| | r + t | _| |_ | e + s +--- |_| D7 A11 |_| | s + _| |_ | s + |_| DACK A12 |_| | + _| |_ | + |_| GND A13 |_| | + _| _____ |_ | b + |_| RESET A14 |_| +--- u + _| ____ |_ | s + |_| MEM/WRLD A15 |_| | + _| _ |_ | 2 + |_| R/W A16 |_| | 4 + _| |_ | + |_| CLK A17 |_| | b + _| |_ | i + |_| VCC A18 |_| | t + _| |_ | s + |_| ERROR A19 |_| | + _| |_ | + +--- |_| A00 A20 |_| | + | _| |_ | + | |_| A01 A21 |_| | + | _| |_ | + | |_| A02 A22 |_| | + | _| |_ | + | |_| A03 A23 |_| | + | | | | + | +-----------------------------------+ | + | | + | | + +-------------------------------------------------+ + +The only signals that might require some explanation are probably + _ +R/W : When this signal is low, The processor is reading data from the databus. + When it is high, the processor is driving the the databus. +_____ +RESET : When this signal goes low, the processor is reset, and starts reading + incoming data from the databus, one byte each clock cycle, until the + line goes high again, at which time the processor will resume execution + of the program at memory location (Hex) 000000 (24 bits, remeber ?) + ____ +MEM/WRLD : _ + Indicates the `target' or `source' (depending on the status of the R/W + line) of the data bus, sort of like an additional address bit. If this + line is low, the processor is communicating with the outside world. If + it is high, the processor is talking to its memory. + +DACK : Data ACKnowledge. Used when the processor communicates with the + outside world. Two cases: + a) Processor Talking + After the processor put the data on the databus, it will wait + until the DACK has been raised, and then dropped again. Then + it will put the next byte of data (if any) on the bus, or + proceed to the next instruction. + b) Processor listening + The same procedure as above, but in the other direction : + After the processor has read one byte of data, it quickly raises & + drops the line, and then expects the next data item to be present. + +ERROR : Indicates the fact that an error condition has occurred somewhere + in the program. The error number is present on the data bus. + After the error number has ben read, the address of the next statement + to be executed, had the eror not occurred, can be read in three + consecutive bytes from the databus. + +Processor Memory Management + +Since the Intercal Language provides quite a few interesting ways to manipulate +arrays, stash and retrieve data, etc, all of which operations require +manipulations of memory, and it was the intention of this implementation to +provide an instruction set which immediately makes the average Intercal +programmer feel right at home, quite a few very complex instructions have been +provided. + +Intercal Machine Language Reference Part + +Summary of instructions: + +ABG ABstain from Gerund +ABL ABstain from Label +ALA ALlocate Aray +BAA Begin Array Allocation +BIA Begin Indexing Array +BIN BINary operator +CAL CALculate +DLD Data LoaD +EAA End Array Allocation +FRG FoRGet +IDA InDex Array +IGN IGNore +INS INitiate Statement +NEX NEXt +OST Open STorage +PCT PerCenTage qualifier +POP POP +PPA PoP Array pointers +PSA PuSh Array pointers +PSH PuSH +RDO ReaD Out +REG Reinstate Gerund +REL Reinstate Label +RMB ReMemBer +RSM ReSuMe +RTV ReTrieVe +STS STaSh +UNO UNary Operator +WRI WRite In + +General Format: + + i i i i i p p s + +where + + i = instruction field + p = private field + s = size field + +ABstain from Label + +ABL Label + + 0 1 1 1 1 0 0 0 + +Sets the abstain bit of instruction at Label + +ABstain from Gerund + +ABG mnm + + 0 1 1 1 1 1 0 0 + +Sets the abstain bit of all statements whosde main instruction is mnm + +Allocate Array + + +ALA #num +ALA .var +ALA :var +ALA , +ALA ; +ALA RES + + + 0 0 0 1 1 p p s + +where p p specifies the source, + 0 0 : immediate data <16 bits> + 0 1 : Variable + 1 0 : Array, as pointed to by the Read Array Pointer + 1 1 : the contents of the RES register + +Takes the ALA argument, multiplies it with the current contents of the +Temproary Register, and puts the result in the Temporary Register. + +Begin Allocating Array + +BAA ,var +BAA ;var + + + 0 0 0 1 0 0 0 s + array specifier, 16 bits + jump offset, 16 bits + +Deallocates the memory block currently allocated to array `var', +opens the Arrray Entry for array `var' for writing, and puts a pointer +to the Array Entry in the Wite Array Data pointer register. If the array +is being ignored, none of these things actually happen -- instead, the +jump offset is added to the program counter. + +Begin Indexing Array + +BIA R ,var +BIA W ,var +BIA R ;var +BIA W ;var + + + 0 0 1 0 1 0 t s + array specifier, 16 bits + +where t = type, 0 = Read or 1 = Write + +Sets the Read Array Data pointer to the address of the first array element, +and the Read Array Dimension pointer to the first Dimension entry in the +Array Table, thus preparing for further indexing. + +BINary operator + +BIN ~ Select +BIN c/ Interleave, +BIN $ aka Mingle + + 0 1 1 0 0 t 0 0 + +where t is the operation specifier: + 0 : Select + 1 : Interleave / Mingle + +The operation is performed on the OP1 and OP2 registers, and the result is +placed in the RES register. + +CALculate + +CAL . +CAL : +CAL , +CAL ; + + + 0 1 0 1 0 0 0 s + +Puts the contents of the RES register in the memory location pointed to by +the Write Array Data pointer + +Data LoaD + +DLD t #num +DLD t .var +DLD t :var +DLD t , +DLD t ; +DLD t RES + + + 0 1 0 0 t p p s + +where t = target register, 0 = OP1 or 1 = OP2 + p p = source : + 0 0 : Immediate data <16 bits> + 0 1 : Variable + 1 0 : Array item (as indexed by the Read Array Data pointer) + 1 1 : RES register + +Loads the target register with the contents of the source + +End Allocating Array + +EAA + + + 0 0 1 0 0 0 0 0 + +Allocates a chunk of memory to the size of + +FoRGet + +FRG #num +FRG .var +FRG :var +FRG , +FRG ; +FRG RES + + + 1 0 0 0 0 p p s + +where p p = source : + 0 0 : Immediate <16 bits> + 0 1 : variable + 1 0 : array (as indexed by the Read Array Data pointer) + 1 1 : RES register + +Pops source number of addresses from the stack, discarding them. + +InDex Array +IDA R #num +IDA W #num +IDA R .var +IDA W .var +IDA R :var +IDA W :var +IDA R RES +IDA W RES + + + 0 0 1 1 t p p s + +where t = type, 0 = Read or 1 = Write + p p = source : + 0 0 : Immediate Data <16 bits> + 0 1 : variable + 1 0 : ILLEGAL + 1 1 : RES register + +Takes the Array Dimension (i.e, what the Array Dimension Pointer points to), +adds (#num or RES) instances of it to the Array Data Pointer, and adds 2 to the +Array Dimension Pointer. + +IGNore + +IGN .var +IGN :var +IGN ,var +IGN ;var + + 1 0 1 0 1 0 0 s + variable specifier, 16 bits + +Sets the ignore flag of the variable specified + +INitiate Statement + +INS mnm Label + +where `mnm' is one of the following 3-character mnemonics: + +ABS ABStain +REI REInstate +CAL CALculate +NEX NEXt +FRG FoRGet +RES RESume +STS STaSh +RTV ReTrieVe +IGN IGNore +RMB ReMemBer +WRI WRite In +RDO ReaD Out + + + 1 1 1 p p p p p + 2 bytes : + a o o o o o o o o o o o o o o o + +where p p p p p = major instruction opcode + +where a is the abstain bit of the instruction : set if this instruction +is to be abstained from. The remaining 15 bits are the jump offset, which will +be added to the program counter should the instruction be abstained from. +It is presumed that no statement will result in code exceeding 32.767 bytes. + +NEXt + +NEX Label + + 0 1 1 0 1 0 0 0 + Target Address, 24 bits + +Pushes the address of the next instruction on the return stack and puts the +Target addres in the Program counter + +Open STorage + +OST .var Label +OST :var Label +OST ,var Label +OST ;var Label + + + 0 0 0 0 1 0 0 s + variable/array specifier, 16 bits + jump offset, 8 bits + + +Trys to open the specified variable for writing. +If it being ignored (i.e, its ignore flag is set) the jump offset is +added to the program counter. +If it is an array, the Write Array Data pointer is set to the address +of the first element of the array, and the Write Array Dimension pointer +to the first dimension entry in the Array Table. +If it is a Variable, the Write Array Data pointer is set to the address +of the Variable. + +PerCenTage qualifier + +PCT #num Label + + + 0 0 0 0 0 0 0 0 + 0 c c c c c c c + Jump offset, 16 bits + +where c c c c c c c is a 7 bit binary number between 0 and 100 + +Gets a random number in the range 0 .. 99, compares it to the percent chance +and acts on the result: +- if the random number is less than the percent chance, nothing is done +- if it is equal or greater, the jump offset is added to the program counter + +POP + +POP + + + 1 1 0 0 0 0 1 0 + +Gets the top item on the stack and puts it in the RES register -- 32 bits + +PoP Array pointers + +PPA + + 1 1 0 0 1 0 1 0 + +Retrieves the contents of the Read Array Data pointer from the stack + +PuSh Array pointers + +PSA + + + 1 1 0 0 1 0 0 0 + +Pushes the contents of the Read Array Data pointer to an internal stack + +PuSH + +PSH + + + 1 1 0 0 0 0 0 0 + +Pushes the RES register to the stack -- 32 bits + +ReaD Out + +RDO #num +RDO .var +RDO :var +RDO , +RDO ; +RDO RES + + + 1 0 1 1 1 p p s + +where p p = source: + 0 0 : Immediate <16 bits> + 0 1 : Variable + 1 0 : Array (as pointed to by the Read Array Data pointer) + 1 1 : RES register + +Writes 2 or 4 bytes (16 or 32 bits) on the data bus + +REinstate Gerund + +REG mnm + + 0 1 1 1 0 1 0 0 + operation specifier, 8 bits + +In this form, the hole program will be searched to find instructions of the +specified type, and their abstain bits will be reset. + +REinstate Label + +REL Label + + 0 1 1 1 0 0 0 0 + Label, 24 bits + +In this form, the instruction at the address of Label will have its abstain +bit set/reset. + +ReMemBer + +RMB .var +RMB :var +RMB ,var +RMB ;var + + 1 0 1 0 0 0 0 s + variable specifier, 16 bits + +Clears the specified variable's ignore flag + +ReSuMe + +RSM #num +RSM .var +RSM :var +RSM , +RSM ; +RSM RES + + 1 0 0 0 1 p p s + +where p p = source : + 0 0 : Immediate <16 bits> + 0 1 : variable + 1 0 : array (as indexed by the Read Array Data pointer) + 1 1 : RES register + +Pops source number of addresses from the stack. +If there are less than `source' items on the stack, the procesor is halted +and an error signaled +If no error occurs, the last popped address is NOT discarded, but instead +placed in the Program counter. + +ReTrieVe + +RTV .var +RTV :var +RTV ,var +RTV ;var + + 1 0 0 1 1 0 0 s + Variable/Array Specifier, 16 bits + +Retrieves the latest stashed instance of the variable or array specified + +STaSh + +STS .var +STS :var +STS ,var +STS ;var + + 1 0 0 1 0 0 0 s + Variable/Array specifier, 16 bits + +Stashes the variable or array specified + +UNary Operator + +UNO & AND +UNO V OR +UNO V- XOR +UNO ? XOR + + 0 1 0 1 1 t t s + +where t is the operation specifier: + 00 : AND + 01 : OR + 10 : XOR + 11 : Illegal + +The specified operation is performed on the RESult register, leaving it there. + +WRite In + +WRI . +WRI : +WRI , +WRI ; + + + 1 0 1 1 0 0 0 s + +Reads 2 or 4 bytes (16 or 32 bits) from the data bus and puts them in +the variable pointed to by the Write Array Data pointer + diff --git a/doc/intercal.mm b/doc/intercal.mm index 970b1c2..51d431e 100644 --- a/doc/intercal.mm +++ b/doc/intercal.mm @@ -1,3150 +1,3150 @@ -.\" Note: This is both a current manual and an archeological exhibit. -.\" All revisions must be properly conditioned on the c string so that -.\" it's still possible to format the INTERCAL-72 manual. Only outright -.\" errors should be corrected -- each of these is marked with CORRECTION -.\" and an explanatory comment. -.\" -.\" This document is free; 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 document is distributed in the hope that it will be amusing, -.\" 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 document; if not, write to the Free Software -.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -.ND -.ds vb V\v'-0.2'\h'-0.6'\-\v'0.2' -.if n .ds es \o"O|" -.if t .ds es \(es -.if n .ds ct \o"c/" -.if t .ds ct \(ct -.if n .ds no \o"-'" -.if t .ds no \(no -.if n .ds ov - -.if t .ds ov \(rn -.INITR intercal.refs -.TL -THE INTERCAL PROGRAMMING LANGUAGE -.br -.if '\*c'y' REVISED REFERENCE MANUAL -.if '!\*c'n' REFERENCE MANUAL - -.AU "Donald R. Woods" -.AF "" -.AU "and" -.AF "" -.AU "James M. Lyon" -.AF "" -.if '\*c'y' \{\ -.AU "" -.AU "C-INTERCAL revisions:" -.AU "Louis Howell" -.AF "" -.AU "and" -.AF "" -.AU "Eric S. Raymond" \} -.AF "" -.AST "" -.AS 2 -.ce 2 -\fICopyright (C) 1973 by Donald R. Woods -and James M. Lyon\fR -.if '\*c'y' \{\ -.ce 2 -\fICopyright (C) 1996, 1997 by Eric S. Raymond -Redistribution encouraged under GPL\} -.sp -.ce 1 -(This version distributed with C-INTERCAL 0.18) -.AE -.MT 4 -.nr % 0 -.nr Hs 5 -.nr Ej 1 -.bp -.H 1 "INTRODUCTION" -.if '\*c'y' \{\ -.DS I F -"But I don't want to go among mad people," Alice remarked. -.P -"Oh, you ca'n't help that," said the Cat: "We're all mad here. I'm -mad. You're mad." -.P -"How do you know I'm mad?" said Alice. -.P -"You must be," said the Cat, "or you wouldn't have come here." -.DE \} -.P -The names you are about to ignore are true. However, the story has been changed -significantly. Any resemblance of the programming language portrayed here -to other programming languages, living or dead, is purely coincidental. -.H 2 "Origin and Purpose" -.P -The INTERCAL programming language was designed the morning of May 26, 1972 -by Donald R. Woods and James M. Lyon, at Princeton University. Exactly when -in the morning will become apparent in the course of this manual. -.ie '\*c'y' \{\ -.P -Eighteen years later (give or take a few months) Eric S. Raymond perpetrated -a UNIX-hosted INTERCAL compiler as a weekend hack. The C-INTERCAL -implementation has since been maintained and extended by an international -community of technomasochists, including Louis Howell, Steve Swales, -Michael Ernst, and Brian Raiter. -.P -(There was evidently an Atari implementation sometime between these -two; notes on it got appended to the INTERCAL-72 manual. The culprits -have sensibly declined to identify themselves.) -.P -INTERCAL \} -.el It -was inspired by one ambition: to have a compiler language which has nothing at -all in common with any other major language. By 'major' was meant anything -with which the authors were at all familiar, e.g., FORTRAN, BASIC, COBOL, -ALGOL, SNOBOL, SPITBOL, FOCAL, SOLVE, TEACH, APL, LISP, and PL/I. For the -most part, INTERCAL has remained true to this goal, sharing only the basic -elements such as variables, arrays, and the ability to do I/O, and eschewing -all conventional operations other than the assignment statement (FORTRAN -"="). -.H 2 "Acronym" -.P -The full name of the compiler is "Compiler Language With No Pronounceable -Acronym", which is, for obvious reasons, abbreviated "INTERCAL". -.H 2 "Acknowledgments" -.P -The authors are deeply indebted to Eric M. Van and Daniel J. Warmenhoven, -without whose unwitting assistance this manual would still have been -possible. -.H 1 "FUNDAMENTAL CONCEPTS" -.if '\*c'y' \{\ -.DS I F -"There's nothing like eating hay when you're faint," the White King -remarked to Alice, as he munched away. -.P -"I should think throwing cold water over you would be better," Alice -suggested: "-- or some sal-volatile." -.P -"I didn't say there was nothing \fIbetter\fR," the King replied. "I -said there was nothing \fIlike\fR it." Which Alice did not venture to -deny. -.DE \} -.P -In this section an attempt is made to describe how and why INTERCAL may be -used; i.e., what it is like and what it is good for. -.H 2 "Sample Program" -.SETR example1 -.P -Shown below is a relatively simple INTERCAL program which will read in 32-bit -unsigned integers, treat them as signed, 2's-complement numbers, and print out -their absolute values. The program exits if the absolute value is zero. Note -in particular the inversion routine (statements 6 through 14), which could -be greatly simplified if the subroutine library (see section -.GETHN sublib -) were used. -.P -A more detailed analysis of a program is made in section -.GETHN proghints - of this manual. -.\" Note: there was an error in line 15 in the original manual; -.\" the operands of the third \(ct were swapped. - -.DS L -.cs R 24 - DO (5) NEXT - (5) DO FORGET #1 - PLEASE WRITE IN :1 - DO .1 <- '\*(vb":1~'#32768\*(ct#0'"\*(ct#1'~#3 - DO (1) NEXT - DO :1 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct#65535' - ~'#0\*(ct#65535'"\*(ct"'\*(vb":1~'#0\*(ct#65535'" - \*(ct#65535'~'#0\*(ct#65535'" - DO :2 <- #1 - PLEASE DO (4) NEXT - (4) DO FORGET #1 - DO .1 <- "\*(vb':1~:2'\*(ct#1"~#3 - DO :1 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct":2~'#65535 - \*(ct#0'"'~'#0\*(ct#65535'"\*(ct"'\*(vb":1~'#0 - \*(ct#65535'"\*(ct":2~'#0\*(ct#65535'"'~'#0\*(ct#65535'" - DO (1) NEXT - DO :2 <- ":2~'#0\*(ct#65535'" - \*(ct"'":2~'#65535\*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" - DO (4) NEXT - (2) DO RESUME .1 - (1) PLEASE DO (2) NEXT - PLEASE FORGET #1 - DO READ OUT :1 - PLEASE DO .1 <- '\*(vb"':1~:1'~#1"\*(ct#1'~#3 - DO (3) NEXT - PLEASE DO (5) NEXT - (3) DO (2) NEXT - PLEASE GIVE UP -.cs R -.DE -.H 2 "Uses for INTERCAL" -.P -INTERCAL's main advantage over other programming languages is its strict -simplicity. It has few capabilities, and thus there are few restrictions to -be kept in mind. Since it is an exceedingly easy language to learn, one -might expect it would be a good language for initiating novice programmers. -Perhaps surprising, then, is the fact that it would be more likely to -initiate a novice into a search for another line of work. As it turns out, -INTERCAL is more useful (which isn't saying much) as a challenge to -professional programmers. Those who doubt this need only refer back to the -sample program in section -.GETHN example1 -.\" CORRECTION: -.\" The original manual counted 22 statements, incorrectly. -\&. This 23-statement program took somewhere -from 15 to 30 minutes to write, whereas the same objectives can be achieved -by single-statement programs in either SNOBOL; -.DS L - PLEASE INPUT POS(0) ('-' ! '') - + (SPAN('0123456789') $ OUTPUT) - + *NE(OUTPUT) :S(PLEASE)F(END) -.DE -or APL; -.DS L - [1] \(->0\(!=\(sq\(<-\(or\(sq -.DE -Admittedly, neither of these is likely to appear more intelligible to -anyone unfamiliar with the languages involved, but they took roughly 60 -seconds and 15 seconds, respectively, to write. Such is the overwhelming -power of INTERCAL! -.P -The other major importance of INTERCAL lies in its seemingly inexhaustible -capacity for amazing one's fellow programmers, confounding programming shop -managers, winning friends, and influencing people. It is a well-known and -oft-demonstrated fact that a person whose work is incomprehensible is held -in high esteem. For example, if one were to state that the simplest way to -store a value of 65536 in a 32-bit INTERCAL variable is: -.DS L - DO :1 <- #0\*(ct#256 -.DE -any sensible programmer would say that that was absurd. Since this is -indeed the simplest method, the programmer would be made to look foolish in -front of his boss, who would of course happened to turn up, as bosses are -wont to do. The effect would be no less devastating for the programmer -having been correct. -.H 1 "DESCRIPTION" -.if '\*c'y' \{\ -.DS I F -"I quite agree with you," said the Duchess; "and the moral of that -is -- 'Be what you would seem to be' -- or, if you'd like it put more -simply -- 'Never imagine yourself not to be otherwise than what it might -appear to others that what you were or might have been was not -otherwise than what you had been would have appeared to them to be -otherwise." -.P -"I think I should understand that better," Alice said very politely, -"if I had it written down: but I ca'n't quite follow it as you say -it." -.P -"That's nothing to what I could say if I chose," the Duchess replied, -in a pleased tone. -.DE \} -.P -The examples of INTERCAL programming which have appeared in the preceding -sections of this manual have probably seemed highly esoteric to the reader -unfamiliar with the language. With the aim of making them more so, we -present here a description of INTERCAL. -.H 2 "Variables" -.P -INTERCAL allows only 2 different types of variables, the -.B "16-bit integer" -and the -.B "32-bit integer." -These are represented by a spot (.) or two-spot -(:), respectively, followed by any number between 1 and 65535, inclusive. -These variables may contain only non-negative numbers; thus they have the -respective ranges of values: 0 to 65535 and 0 to 4294967295. Note: .123 and -:123 are two distinct variables. On the other hand, .1 and .0001 are -identical. Furthermore, the latter may \fInot\fR be written as 1E-3. -.H 2 "Constants" -.P -.B Constants -are 16-bit values only and may range from 0 to 65535. They are -prefixed by a mesh (#). Caution! Under no circumstances confuse the mesh -with the interleave operator, except under confusing circumstances! -.H 2 "Arrays" -.P -.B Arrays -are represented by a tail (,) for 16-bit values, or a hybrid (;) for -32-bit values, followed by a number between 1 and 65535, inclusive. The -number is suffixed by the word SUB, followed by the subscripts, separated -optionally by spaces. Subscripts may be any expressions, including those -involving subscripted variables. This occasionally leads to ambiguous -constructions, which are resolved as discussed in section -.GETHN precedence -\&. Definition -of array dimensions will be discussed later in greater detail, since -discussing it in less detail would be difficult. As before, ,123 and ;123 -are distinct. In summary, .123, :123, #123, ,123, and ;123 are all -distinct. -.H 2 "Operators" -.P -INTERCAL recognizes 5 operators -- 2 binary and 3 unary \*F. Please be kind to -our operators: they may not be very intelligent, but they're all we've got. -In a sense, all 5 operators are binary, as they are all bit-oriented, but -it is not our purpose here to quibble about bits of trivia. -.if '\*c'y' \{\ -.FS -Other operators are also available with C-INTERCAL's non-standard -dialects; see section -.GETHN tri_intercal -\&. -.FE \} -.H 3 "Binary Operators" -.P -The binary operators are \fBinterleave\fR (also called \fBmingle\fR) -and \fBselect\fR, which -are represented by a change (\*(ct) and a sqiggle [sic] (~), respectively. -.if '\*c'y' \{\ -(In C-INTERCAL's ASCII environment, EBCDIC \*(ct is replaced by a big -money ($), but \*(ct can be used if encoded in Latin-1 as \e0xA2 -or UTF-8 as 0xC2A2.) \} -.P -The interleave operator takes two 16-bit values and produces a 32-bit result -by alternating the bits of the operands. Thus, #65535\*(ct#0 has the 32-bit -binary form 101010....10 or 2863311530 decimal, while #0\*(ct#65535 = -0101....01 binary = 1431655765 decimal, and #255\*(ct#255 is equivalent to -#65535. -.P -The select operator takes from the first operand whichever bits correspond -to 1's in the second operand, and packs these bits to the right in the result. -Both operands are automatically padded on the left with zeros to 32 bits -before the selection takes place, so the variable types are unrestricted. -If more than 16 bits are selected, the result is a 32-bit value, otherwise -it is a 16-bit value. For example, #179~#201 (binary value 10110011~11001001) -selects from the first argument the 8th, 7th, 4th, and 1st from last bits, -namely, 1001, which = 9. But #201~#179 selects from binary 11001001 the 8th, -6th, 5th, 2nd, and 1st from last bits, giving 10001 = 17. #179~#179 has the -value 31, while #201~#201 has the value 15. -.P -Perhaps a simpler way of understanding the operation of the select operator -.\" CORRECTION: -.\" "in Figure 1" was originally "on the following page (Figure 1)" -.\" We can't rely on the page boundaries any more. -would be to examine the logic diagram in Figure 1, which -performs the select operation upon two 8-bit values, A and B. The gates used -are Warmenhovian logic gates, which means the outputs have four possible -values: low, high, undefined (value of an uninitialized flip-flop), and -oscillating (output of a NOR gate with one input low and the other input -connected to the output). These values are represented symbolically -by '0', '1', '?', and '\*(es'. -Note in particular that, while NOT-0 is 1 and NOT-1 -is 0 as in two-valued logic, NOT-? is ? and NOT-\*(es is \*(es. The functions -of the various gates are listed in Table 1. -.if n \{\ -.P -[Warning: The following picture will be garbled or missing. -Get a better output device.] -.sp 1 \} -.PS -# The CIRCUITOUS DIAGRAM, Figure 1 of the INTERCAL manual. -# -# Transcribed to PIC by Eric S. Raymond from the paper original. -# The transcription is topologically correct but not geometrically perfect. -# -# I discovered late in the process that the gate spacing to gate width -# ratio should be 6/5, not 5/5. The only place the difference shows is -# in the zigzag part of the adventitious lead below gate 37, which is -# a bit narrower in this version than in the paper original. -# -# Minor liberties have been taken with the sizes of some features at the -# left and right sides to fit the diagram on a letter-sized page. The -# A/B input leads should really be a whole boxwidth wide, and the bus line -# rectangle was slightly wider and further right in the paper original. -# Also, there are only 15 "New York" terminals rather than 16, and in the -# original the bus terminal label texts were rotated 90 degrees clockwise. -# -# The whole diagram can be scaled horizontally or vertically by changing -# the boxwid and boxht variables. At default scale the values boxwid = -# 0.60 boxht = 0.525 reproduce the paper version most exactly; they get -# the gate grid and leads nearly perfect. -# -scale=6/5 # This is how we scale the whole thing to fit on 8.5x11 -boxwid = 0.60 -boxht = 0.525 -linewid = boxwid -lineht = boxht -movewid = boxwid -moveht = boxht - -# Offset of top and bottom pins from gate midline -define pinoffset {(2/3)} - -define warmengate { -# Draw a Warmenhovian gate box - [ - box invis; - line from last box .sw \ - to last box .nw \ - to 1/2 \ - to 1/2 \ - to 1/2 \ - to 1/2 \ - to last box .sw; - IN: last box .w; - UP: pinoffset - DN: pinoffset - OUT: last box .e; - "$1" at last box .center; - ] -} - -[ # Beginning of diagram object - -# Draw the gate array -copy thru % move to (($1-1) * movewid * 2, ($2-1) * moveht * 2); warmengate($3) % until "END" -0 1 6 -0 2 6 -0 3 1 -0 4 1 -0 5 1 -0 6 1 -0 7 1 -0 8 1 -0 9 1 -0 10 1 -END -copy thru % move to ((boxwid + movewid * 7 / 5) + ($1-2) * movewid * 2, ($2-1) * moveht * 2); warmengate($3) % until "END" -1 1 1 -1 2 2 -1 3 2 -1 4 2 -1 5 2 -1 6 2 -1 7 2 -1 8 2 -1 9 2 -1 10 2 -2 1 1 -2 2 7 -2 3 4 -2 4 3 -2 5 3 -2 6 3 -2 7 7 -2 8 3 -2 9 7 -2 10 3 -3 1 1 -3 2 3 -3 3 3 -3 4 4 -3 5 4 -3 6 3 -3 7 3 -3 8 3 -3 9 3 -3 10 3 -4 1 1 -4 2 4 -4 3 5 -4 4 5 -4 5 4 -4 6 5 -4 7 4 -4 8 3 -4 9 2 -4 10 1 -END - -# Draw bus line: -BUSLINE: box with .sw at 41st [].se + (boxwid/2, 0) \ - wid (boxwid / 2) \ - ht (50th [].n.y - 41st [] .s.y) -copy thru % move to $1 / 40 ; "$2" % until "END" -9 B -11 U -13 S -17 L -19 I -21 N -23 E -30 8 -END -define newyork { - line right boxwid/3 - box invis "" "TO" "NEW" "YORK" "" -} -define philly { - line right boxwid/3 - box invis "" "TO" "PHILA-" "DELPHIA" "" -} -for i = 0 to 14 do { - move to (i+1)/18 - newyork -} -move to (i+1)/18 -philly - -define dot {circle rad 0.03 filled 1} - -# Place a junction dot wherever we are -define junction % {dot at Here}; % - -# Draw inputs -define inwidth {boxwid*3/4} -define drawinputs { - line left inwidth from $1.UP; - "A" at last line .end - (0.1, 0) rjust; - "$2" at last line .end - (0.05, 0.1) rjust; - move to last line .center; A$2: junction - line left inwidth from $1.DN; - "B" at last line .end - (0.1, 0) rjust; - "$2" at last line .end - (0.05, 0.1) rjust; - move to last line .center; B$2: junction -} -drawinputs(3rd [],8) -drawinputs(4th [],7) -drawinputs(5th [],6) -drawinputs(6th [],5) -drawinputs(7th [],4) -drawinputs(8th [],3) -drawinputs(9rd [],2) -# Gate 10 inputs have to be done by hand - -define go {move to $1;} - -# Define `gate' to *refer* to nth gate -define gate {`$1'th []} - -# Go to specified pin of given gate -define pin {gate($1).$2} - -# We exploit the quantization of lead placements here -# Draw from left edge of box $1 quanta of inter-box horizontal distance -define left_mv {line left boxwid * $1 / 5;} -# Draw from right edge of box $1 quanta of inter-box horizontal distance -define right_mv {line right boxwid * $1 / 5;} -# Draw from top pin of box $1 quanta of inter-box vertical distance up -define up_mv {line up (boxht * (2 - pinoffset)) * $1 / 4;} -# Draw from bottom pin of box $1 quanta of inter-box vertical distance down -define dn_mv {line down (boxht * (2 - pinoffset)) * $1 / 4;} - -# Draw from here to given object, with directional constraint -define vert {line up ($1.y - Here.y);} -define horz {line right ($1.x - Here.x);} -define zig {vert($1) horz($1)} -define to_bus {line to (BUSLINE.w, Here)} - -define ground { - dn_mv(1) - [ - boxwid = boxwid * (3/4) - boxht = boxht / 3 - box invis - line from last box .ne to last box .nw - line from 1/3 to 1/3 - line from 2/3 to 2/3 - ] -} - -# Now all those connections -# Gate 1: -go(pin(1,OUT)) right_mv(3) CORNER:Here; zig(pin(12,DN)) -go(CORNER) vert(pin(1,UP)) \ - {junction horz(pin(11,UP))} \ - up_mv(2) junction - horz(gate(32).e) right_mv(3) junction - {zig(pin(43,IN))} - horz(gate(42).e) right_mv(1) junction - {to_bus} - vert(pin(43,UP)) up_mv(2) to_bus - -# Gate 2 -go(pin(2,OUT)) right_mv(2) zig(pin(12,UP)) -# Gate 3 -go(A8) up_mv(1) horz(gate(13).e) right_mv(3) zig(pin(23,IN)) -go(B8) dn_mv(1) horz(gate(13)) - right_mv(1) dn_mv(1) - horz(gate(23).e) right_mv(2) dn_mv(2) horz(pin(32,UP)) -go(pin(3,OUT)) right_mv(2) - vert(gate(3).UP) up_mv(3) - horz(gate(13).e) right_mv(2) - vert(gate(15,UP)) up_mv(4) #??? don't know why 4 is necessary - horz(gate(16).w) left_mv(1) - vert(gate(6).w) up_mv(4) - left_mv(2) zig(pin(7,OUT)) -# Gate 4 -go(A7) up_mv(1) horz(gate(14).e) right_mv(1) zig(pin(24,UP)) -go(B7) dn_mv(1) horz(gate(4)) - right_mv(1) dn_mv(1) - horz(gate(14).e) right_mv(3) - vert(pin(26,UP)) up_mv(1) - horz(gate(25)) up_mv(2) - horz(gate(25).e) right_mv(4) - vert(pin(38,UP)) up_mv(1) - horz(gate(48).e) right_mv(1) - vert(pin(47,DN)) dn_mv(1) - horz(gate(47).w) left_mv(3) - vert(gate(46).DN) dn_mv(2) right_mv(2) - vert(gate(45).DN) dn_mv(2) left_mv(3) - vert(gate(44).DN) right_mv(3) dn_mv(2) - horz(gate(33).w) left_mv(1) - vert(gate(33).DN) dn_mv(3) - horz(gate(32).e) up_mv(2) - horz(gate(42).e) dn_mv(2) line down boxwid/5 - to_bus -go(pin(4,OUT)) right_mv(3) junction - {zig(pin(13,UP))} - vert(pin(4,UP)) up_mv(3) junction - {right_mv(3) zig(pin(15,IN))} - left_mv(2) vert(pin(7,UP)) up_mv(3) - right_mv(3) zig(pin(19,DN)) -# Gate 5 -go(A6) up_mv(1) horz(gate(15).e) right_mv(1) vert(pin(15,UP)) junction - {horz(pin(25,UP))} - vert(pin(15,DN)) dn_mv(1) - horz(gate(25).e) right_mv(1) - zig(pin(34,UP)) -go(B6) dn_mv(2) horz(gate(25).e) dn_mv(1) right_mv(4) - vert(pin(24,DN)) dn_mv(1) - horz(gate(34).e) right_mv(1) - vert(pin(32,DN)) dn_mv(1) - right_mv(3) zig(pin(42,IN)) -go(pin(5,OUT)) right_mv(5) junction - {vert(pin(14,IN)) junction {horz(pin(14,IN))} zig(pin(13,IN)) } - vert(pin(17,DN)) junction {horz(pin(17,DN))} zig(pin(18,DN)) -# Gate 6 -go(A5) up_mv(1) horz(gate(16).e) right_mv(1) zig(pin(26,UP)) -go(B5) dn_mv(2) horz(gate(26).e) right_mv(3) zig(pin(34,IN)) -go(pin(6,OUT)) right_mv(4) junction - {horz(pin(16,IN))} - vert(pin(15,DN)) junction - {horz(pin(15,DN))} - vert(pin(14,DN)) junction - {horz(pin(14,DN))} - zig(pin(13,DN)) -# Gate 7 -go(A4) up_mv(1) horz(gate(27).e) right_mv(3) vert(pin(37,IN)) junction - {horz(pin(37,IN))} - vert(pin(37,DN)) dn_mv(2) right_mv(1) junction - {zig(pin(36,IN))} - horz(gate(37).e) right_mv(3) - zig(pin(45,IN)) -go(B4) dn_mv(2) horz(gate(17).e) right_mv(4) - vert(pin(26,DN)) dn_mv(1) - horz(gate(26).e) dn_mv(2) - right_mv(4) vert(pin(35,DN)) dn_mv(1) - horz(gate(35).e) right_mv(2) junction - {zig(pin(45,UP))} {zig(pin(44,UP))} -# Gate 8 -go(A3) up_mv(1) horz(gate(28).e) right_mv(1) zig(pin(38,UP)) -go(B3) dn_mv(2) horz(gate(28).e) right_mv(2) zig(pin(37,UP)) -go(pin(8,OUT)) right_mv(6) junction - {zig(pin(17,IN))} - up_mv(4) left_mv(1) vert(pin(19,UP)) junction - {horz(pin(19,UP))} - zig(pin(20,UP)) -# Gate 9 -go(A2) up_mv(1) horz(gate(19).e) right_mv(1) zig(pin(28,UP)) -go(B2) dn_mv(2) horz(gate(39).e) right_mv(1) - vert(pin(38,DN)) dn_mv(2) right_mv(2) zig(pin(47,IN)) -go(pin(9,OUT)) right_mv(3) junction - {zig(pin(20,DN))} - {horz(pin(19,IN))} - vert(pin(16,DN)) junction - {horz(pin(16,DN))} - zig(pin(15,UP)) -# Gate 10 -line left inwidth from 10th[].UP; -"A" at last line .end - (0.1, 0) rjust; -"1" at last line .end - (0.05, 0.1) rjust; -move to last line .center; A1: junction -line left inwidth from 10th [].DN; -"B" at last line .end - (0.1, 0) rjust; -"1" at last line .end - (0.05, 0.1) rjust; -move to 1/2 ; B1: junction -go(A1) vert(pin(10,DN)) dn_mv(1) horz(gate(20).e) right_mv(2) zig(pin(30,UP)) -go(B1) dn_mv(2) horz(gate(30).e) right_mv(1) junction - {zig(pin(39,UP))} - right_mv(3) zig(pin(40,DN)) -go(pin(10,OUT)) right_mv(2) junction - {horz(pin(20,IN))} - vert(pin(18,UP)) junction - {horz(pin(18,UP))} - vert(pin(16,UP)) junction - {horz(pin(16,UP))} - zig(pin(14,UP)) -# Gate 11 -go(pin(11, DN)) left_mv(3) vert(pin(11,UP)) up_mv(1) \ - horz(gate(31).e) right_mv(1) zig(pin(41,DN)) -go(pin(11,OUT)) right_mv(2) zig(pin(21,DN)) -# Gate 12 -go(pin(12,OUT)) right_mv(3) junction - {horz(pin(22,IN))} - vert(pin(12,UP)) up_mv(1) - horz(gate(12).w) left_mv(3) - zig(pin(12,IN)) -# Gate 13 -go(pin(13,OUT)) right_mv(1) zig(pin(23,UP)) -# Gate 14 -go(pin(14,OUT)) horz(pin(24,IN)) -# Gate 15 -go(pin(15,OUT)) horz(pin(25,IN)) -# Gate 16 -go(pin(16,OUT)) right_mv(2) junction - {horz(pin(26,IN))} - vert(pin(27,UP)) junction - {horz(pin(27,UP))} - zig(pin(29,DN)) -# Gate 17 -go(pin(17,OUT)) horz(pin(27,IN)) -# Gate 18 -go(pin(18,OUT)) right_mv(3) junction - {horz(pin(28,IN))} - zig(pin(27,DN)) -# Gate 19 -go(pin(19,OUT)) horz(pin(29,IN)) -# Gate 20 -go(pin(20,OUT)) right_mv(3) junction - {horz(pin(30,IN))} - zig(pin(29,UP)) -# Gate 21 -go(pin(21,UP)) left_mv(2) vert(pin(21,DN)) ground -go(pin(21,OUT)) right_mv(2) junction - {zig(pin(31,DN))} - up_mv(2) junction -# Gate 22 -go(pin(22,UP)) left_mv(3) up_mv(2) junction -go(pin(22,DN)) left_mv(4) - vert(pin(22,UP)) up_mv(3) right_mv(3) - vert(pin(23,UP)) up_mv(3) - horz(gate(23).e) right_mv(2) - vert(pin(25,UP)) left_mv(1) - vert(pin(28,DN)) right_mv(1) - zig(pin(40,IN)) -go(pin(22,OUT)) right_mv(3) junction - {horz(pin(32,IN))} - {zig(pin(33,IN))} - zig(pin(31,UP)) -# Gate 23 -go(pin(23,OUT)) right_mv(1) - vert(gate(23).DN) dn_mv(1) - horz(gate(33)) right_mv(1) - dn_mv(1) to_bus -# Gate 24 -go(pin(24,OUT)) right_mv(1) zig(pin(33,UP)) -# Gate 25 -go(pin(25,OUT)) horz(pin(35,IN)) -# Gate 26 -go(pin(26,OUT)) right_mv(2) vert(pin(26,DN)) dn_mv(1) junction - {to_bus} - zig(pin(35,UP)) -# Gate 27 -go(pin(27,OUT)) right_mv(2) zig(pin(36,UP)) -# Gate 28 -go(pin(28,OUT)) right_mv(3) junction - {horz(pin(38,IN))} - vert(pin(38, DN)) dn_mv(1) to_bus -# Gate 29 -go(pin(29,OUT)) right_mv(3) junction - {horz(pin(39,IN))} - {vert(pin(39, DN)) dn_mv(1) to_bus} - zig(pin(40,UP)) -# Gate 30 -go(pin(30,OUT)) right_mv(1) - vert(pin(30,DN)) dn_mv(1) - horz(gate(40).e) right_mv(2) - zig(pin(50,UP)) -# Gate 31 -go(pin(31,OUT)) right_mv(2) zig(pin(41,UP)) -# Gate 32 -go(pin(32,OUT)) right_mv(2) vert(pin(32,UP)) junction - {horz(pin(42,UP))} - up_mv(1) to_bus -# Gate 33 -go(pin(33,OUT)) right_mv(2) zig(pin(43,UP)) -# Gate 34 -go(pin(34,OUT)) right_mv(3) junction - {horz(pin(44,IN))} - vert(pin(44, DN)) dn_mv(1) to_bus -# Gate 35 -go(pin(35,OUT)) right_mv(1) dn_mv(1) right_mv(2) dn_mv(1) to_bus -# Gate 36 -go(pin(36,OUT)) horz(pin(46,IN)) -# Gate 37 -go(pin(37,OUT)) right_mv(2) vert(pin(48,UP)) junction - {horz(pin(48,UP))} - zig(pin(49,DN)) -# Gate 38 -go(pin(38,OUT)) right_mv(3) junction - {horz(pin(48,IN))} - vert(pin(48,DN)) right_mv(1) dn_mv(3) left_mv(3) - vert(pin(47,UP)) junction - {horz(pin(47,UP))} - zig(pin(46,UP)) -# Gate 39 -go(pin(39,OUT)) right_mv(3) junction - {horz(pin(49,IN))} - {vert(pin(49, DN)) dn_mv(2) to_bus} - zig(pin(50,IN)) -# Gate 40 -go(pin(40,OUT)) right_mv(1) - vert(pin(40,DN)) - dn_mv(2) junction - {horz(gate(40).w); dn_mv(1); horz(gate(40).e); right_mv(1)} - dn_mv(1) junction - zig(pin(49,UP)) -# Gate 41 -# (should be right_mv(2) but we've squeezed the bus line a bit left) -go(pin(41,OUT)) right_mv(1) vert(pin(41,DN)) ground -# Gate 42 -go(pin(42,OUT)) to_bus -# Gate 43 -go(pin(43,OUT)) to_bus -# Gate 44 -go(pin(44,OUT)) to_bus -# Gate 45 -go(pin(45,OUT)) to_bus -# Gate 46 -go(pin(46,OUT)) to_bus -# Gate 47 -go(pin(47,OUT)) to_bus -# Gate 48 -go(pin(48,OUT)) to_bus -# Gate 49 -go(pin(49,OUT)) to_bus -# Gate 50 -go(pin(50,OUT)) to_bus -# The adventitious lead -go(pin(17,OUT)) right_mv(1) - {vert(pin(17,UP)) up_mv(3) horz(gate(17))} - vert(pin(17,DN)) dn_mv(1) - horz(gate(27).w) dn_mv(1) horz(gate(27).e) - dn_mv(1) horz(gate(36).w) - up_mv(2) right_mv(1) dn_mv(2) - right_mv(1) up_mv(2) right_mv(1) dn_mv(2) - right_mv(1) up_mv(2) right_mv(1) - vert(pin(37,DN)) right_mv(4) dn_mv(2) - right_mv(3) dn_mv(1) left_mv(3) - vert(pin(46,DN)) left_mv(3) dn_mv(3) - horz(gate(36).w) up_mv(1) horz(gate(36)) right_mv(1) - -] # End of diagram object -.PE -.ce 1 -FIGURE 1. CIRCUITOUS DIAGRAM -.bp -.sp 10 -.ps 8 -.vs 10 -.nf -.cs R 24 -.ec % -.ds EO %(ci%v'-0.08'%h'-0.67'+%v'0.08' -.%" This is dodgy, but it's the last place es is used -.if n .ds es %o"O|" -.if t .ds es %(es - __________________________________________________________ - |\ \ - | \ 1. Logic gate. Inputs A, B. Output O = AB. \ - | \ \ - | \ \ 2. Logic gate. Inputs A, B, C. Output O = A+BC. \ - | |\ \ \ - | | \ \ 3. Logic gate. Inputs A, B. Output O = A+AB. \ - | | \ \ \ - | | |\ \ 4. Logic gate. Inputs A, B. Output O = AB %*(EO -(A+-B) \ - | | | \ \ \ - | | | \ \ 5. Logic gate. Inputs A, B. Output O = A%*(EOA + AA \ - | | | \ \ \ - | | | \ \ 6. Uninitialized flip-flop. Inputs none. Output O = ? \ - | | | \ \ \ - | | | \ \ 7. Flip-flop-flap. Inputs A, B, C. Output O = 1 if \ - | | | \ \ A=0 or B+C=0 and A=1. O = 0 if AC=1, B=0. O = %*(es if \ - | | | \ \ AB=1, C=0. O = ? if ABC=1. O as yet undetermined \ - | | | \ \ for other Warmenhovian inputs. See Figure 2. \ - | | | \ \ \ - | | | \ \ 8. Bus line. \ - | | | \ \_________________________________________________________\ - | | | \ | | - | | | | | _____________________________________________________ | - | | | | | | | | | | | | - | | | | | | | | | | | | - | | | | | | | | | | | | - | | | | | | | | | | | | - | | | | | | | | | | | | - \|__| | | | \|__| | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - | | | | | | - \|__| \|__| -.ec \ -.cs R -.fi -.ps 10 -.vs 12 -.sp -.ce 1 -Table 1. Logical (and other) functions. -.bp -.if n \{\ -.P -[Warning: The following picture will be garbled or missing. -Get a better output device.] \} -.sp 10 -.PS -# The FLIP FLAP FLOP, Figure 2 of the INTERCAL manual -down; -A: warmengate(); -move; move; -B: warmengate(); -move; move; -C: warmengate(); -move; move; -D: warmengate(); -dot at 1st []; -dot at 2nd []; -dot at 3rd []; -circle rad 0.06 at last []; -line from last circle.w to last circle.e; -line from last circle.n to last circle.s; -line left 3 from A.UP; "A" rjust -line left 3 from B.IN; "B" rjust -line left 3 from C.UP; "C" rjust -line left 2 from C.IN then down 2 then left; "1" rjust -right; circle rad 0.06 with .w at A.OUT; -line right 0.5; junction {line right 1.5; "D" ljust} -line down 0.25; X1: Here -line left 0.5 from A.IN; line down 0.25; X2: Here -line left 0.5 from B.UP; line up 0.25; line to X1; -line right 1.0 from D.OUT; vert(B.UP) line up 0.25; line to X2; -right; circle rad 0.06 with .w at B.OUT; -line right 0.5; vert(C.DN) line down 0.25; X3: Here; -line left 0.25 from D.UP then up 0.25 then to X3; -right; circle rad 0.06 with .w at C.OUT; -line right 0.3; vert(C.DN) line down 0.25; X4: Here -line left 0.5 from D.IN; vert(D.UP) line up 0.25 then to X4; -.PE -.sp 10 -.ce 1 -FIGURE 2. FLIP FLAP FLOP -.bp -.if n \{\ -.P -[Warning: The following picture will be garbled or missing. -Get a better output device.] \} -.PS -[ - NYC: box ht 4 wid 0.5 "9"; - for i = 0 to 16 do { - move to (i+1)/18 - line left 0.5 - } - for i = 0 to 8 do { - move to (i+1)/10 - line right 0.5 - } -] -move right from last [].w; -box invis wid 6 \ - "GATE TYPE 9. BLACK BOX" ljust \ - "INPUTS A1-8, B1-8. " ljust \ - "OUTPUT O1-8 = A1-8~B1-8" ljust -.PE -.sp 10 -.ce 1 -FIGURE 1 (CONTINUED). NEW YORK -.bp -.if '\*c'y' \{\ -.H 4 "Return type of SELECT" -.P -INTERCAL-72 defined the return type of a select operation -to depend on the number of bits selected. The C-INTERCAL compiler -takes the easier route of defining the return type to be that of -the right operand, independent of its actual value. This form has -the advantage that all types can be determined at compile time. -Putting in run-time type-checking would add significant overhead and -complication, to effect a very minor change in language semantics. -.P -The only time this distinction makes any difference is when a unary -operator is applied to the select result. This happens extremely -rarely in practice, the only known instance being the 32-bit -greater-than test in the standard library, where an XOR operator is -applied to the result of selecting a number against itself. The -INTERCAL-72 authors first select the result against #65535\*(ct#65535 to -insure that XOR sees a 32-bit value. With the current compiler this -extra step is unnecessary, but harmless. -.P -The cautious programmer should write code that does not depend on -the compiler version being used. We therefore suggest the following -guideline for determining the select return type: -.P -A select operation with a 16-bit right operand returns a 16-bit -value. The return type of a select operation with a 32-bit right -operand is undefined, but is guaranteed to be an acceptable input -to a mingle operation so long as 16 or fewer bits are actually -selected. Correct code should not depend on whether the return -type is 16 or 32 bits.\} -.H 3 "Unary Operators" -.P -The unary operators are & (logical \fBAND\fR), V (logical \fBOR\fR), -and \*(vb (logical -\fBXOR\fR). This last character is obtained by overpunching a worm (\-) on a V -(V). -.if '\*c'y' \{\ -(In C-INTERCAL, \*(vb is replaced by what (?). The compiler recognizes -V- as a valid equivalent, in case you are concerned about -compatibility with the Princeton compiler. -In version 0.20 and later, the Unicode character U+2200 FOR ALL, -which looks exactly like V- or an upside-down `A' -is also accepted in UTF-8 form.) \} -The operator is inserted between the spot, two-spot, mesh, or -what-have-you, and the integer, thus: .&123, #\*(vb123. Multiple unary -operators may not be concatenated, thus the form #\*(vb&123 is invalid. This -will be covered later when precedence is discussed. These operators perform -their respective logical operations on all pairs of adjacent bits, the -result from the first and last bits going into the first bit of the result. -The effect is that of rotating the operand one place to the right and -ANDing, ORing, or XORing with its initial value. Thus, #&77 (binary = -1001101) is binary 0000000000000100 = 4, #V77 is binary 1000000001101111 = -32879, and #\*(vb77 is binary 1000000001101011 = 32875. -.H 3 "Precedence" -.SETR precedence -.P -Precedence of operators is as follows: -.sp 10 -(The remainder of this page intentionally left blank)\*F -.FS -Keep in mind that the aim in designing INTERCAL was to have no -precedents. -.FE -.bp -.P -This precedence (or lack thereof) may be overruled by grouping expressions -between pairs of sparks (') or rabbit-ears ("). Thus '#165\*(ct#203'~#358 -(binary value '10100101\*(ct11001011'~101100110) has the value 15, but -#165\*(ct'#203~#358' has the value 34915, and #165\*(ct#203~#358 is invalid -syntax and is completely valueless (except perhaps as an educational tool -to the programmer). A unary operator is applied to a sparked or rabbit-eared -expression by inserting the operator immediately following the opening spark -or ears. Thus, the invalid expression #\*(vb&123, -which was described earlier, -could be coded as '\*(vb#&123' or '\*(vb"{"'. -Note: In the interests of -simplifying the sometimes overly-complex form of expressions, INTERCAL allows -a spark-spot combination ('.) to be replaced with a wow (!). Thus '.1~.2' -is equivalent to !1~.2', and 'V.1\*(ct.2' is equivalent to "V!1\*(ct.2'". -.P -Combining a rabbit-ears with a spot to form a rabbit (\o'".') is not permitted, -although the programmer is free to use it should he find an EBCDIC reader -which will properly translate a 12-3-7-8 punch. -.P -Sparks and/or rabbit-ears must also be used to distinguish among such -otherwise ambiguous subscripted and multiply-subscripted expressions as: -.DS L - ,1 SUB #1 ~ #2 - ,1 SUB ,2 SUB #1 #2 #3 - ,1 SUB " ,2 SUB " ,3 SUB #1 " #2 " " #3 " -.DE -The third case may be isolated into either of its possible interpretations -by simply changing some pairs of rabbit-ears to sparks, instead of adding -more ears (which would only confuse the issue further). Ambiguous cases are -defined as those for which the compiler being used finds a legitimate -interpretation which is different from that which the user had in mind. See -also section -.GETHN princeton -\&. -.H 1 "STATEMENTS" -.if '\*c'y' \{\ -.DS I F -"There's glory for you!" -.P -"I don't know what you mean by 'glory,'" Alice said. -.P -Humpty Dumpty smiled contemptuously. "Of course you don't -- till I tell -you. I meant 'there's a nice knock-down argument for you!'" -.P -"But 'glory' doesn't mean 'a nice knock-down argument.'" Alice -objected. -.P -"When \fII\fR use a word," Humpty Dumpty said, in a rather scornful -tone, "it means just what I choose it to mean -- neither more nor less." -.DE \} -.P -In this section is described the format of INTERCAL statements. -.H 2 "General Format" -.P -Statements may be entered in 'free format'. That is, more than one statement -may occur on a single card, and a statement may begin on one card and end -on a later one. Note that if this is done, all intervening cards and portions -thereof must be part of the same statement. That this restriction is necessary -is immediately apparent from the following example of what might occur if -statements could be interlaced. -.DS L - DO .1 <- ".1\*(ct'&:51~"#\*(vb1c!12~;&75SUB"\*(vb'V.1~ - DO .2 <- '"!1\*(ct"&';\*(vb79SUB",&7SUB:173"'~!\*(vb9\*(ct - .2'\*(ct,&1SUB:5~#33578"'"'"~'#65535\*(ct"\*(vb'V#&85'"' - #8196'"'~.1"\*(ct.2'~'#&5\*(ct"'#1279\*(ct#4351'~#65535"' -.DE -The above statements are obviously meaningless. (For that matter, so are -the statements -.DS L - DO .1 <- ".1\*(ct"&:51~"#\*(vb1\*(ct!12~;&75SUB"\*(vb'V.1~ - .2'\*(ct,&1SUB:5~#333578"'"'"~#65535\*(ct"\*(vb'V#&85'"' - DO .2 <- '"!1\*(ct"&';\*(vb79SUB",&7SUB:173"'~!\*(vb9\*(ct - #8196'"'~.1"\*(ct.2'~'#&5\*(ct"'#1279\*(ct#4351'~#65535"' -.DE -but this is not of interest here.) -.P -Spaces may be used freely to enhance program legibility (or at least reduce -program illegibility), with the restriction that no word of a statement -identifier (see section -.GETHN identifiers -) may contain any spaces. -.H 2 "Labels" -.P -A statement may begin with a -.B "logical line label" -enclosed in wax-wane pairs -(()). A statement may not have more than one label, although it is possible -to omit the label entirely. A line label is any integer from 1 to 65535, -which must be unique within each program. The user is cautioned, however, -that many line labels between 1000 and 1999 are used in the INTERCAL System -Library functions. -.H 2 "Identifiers and Qualifiers" -.SETR identifiers -.P -After the line label (if any), must follow one of the following statement -identifiers: DO, PLEASE, or PLEASE DO. These may be used interchangeably to -improve the aesthetics of the program. The identifier is then followed by -either, neither, or both of the following optional parameters (qualifiers): -(1) either of the character strings NOT or N'T, which causes the statement -to be automatically abstained from (see section -.GETHN abstain -) when execution -begins, and (2) a number between 0 and 100, preceded by a double-oh-seven -(%), which causes the statement to have only the specified percent chance -of being executed each time it is encountered in the course of execution. -.H 2 "Statements" -.P -Following the qualifiers (or, if none are used, the identifier) must occur -one of the -.ie '\*c'y' \{\ -14 \} -.el \{\ -13 \} -valid operations. (Exception: see section -.GETHN comments -\&.) These are -described individually in sections -.GETHN calculate - through -.GETHN last_statement -\&. -.H 3 "Calculate" -.SETR calculate -.P -The INTERCAL equivalent of the half-mesh (=) in FORTRAN, BASIC, PL/I, and -others, is represented by an angle (<) followed by a worm (-). This -combination is read 'gets'. 32-bit variables may be assigned 16-bit values, -which are padded on the left with 16 zero bits. 16-bit variables may be -assigned 32-bit values only if the value is less than 65535. Thus, to -invert the least significant bit of the first element of 16-bit -2-dimensional array number 1, one could write: -.DS -,1SUB#1#1 <- '\*(vb",1SUB#1#1"\*(ct#1'~'#0\*(ct#65535' -.DE -Similarly to SNOBOL and SPITBOL, INTERCAL uses the angle-worm to define the -dimensions of arrays. An example will probably best describe the format. -To define 32-bit array number 7 as 3-dimensional, the first dimension being -seven, the second being the current value of 16-bit variable number seven, -and the third being the current value of the seventh element of 16-bit array -number seven (which is one-dimensional) mingled with the last three bits of -32-bit variable number seven, one would write (just before they came to take -him away): -.DS -;7 <- #7 BY .7 BY ",7SUB#7"\*(ct':7~#7' -.DE -This is, of course, different from the statement: -.DS -;7 <- #7 BY .7 BY ,7SUB"#7\*(ct':7~#7'" -.DE -INTERCAL also permits the redefining of array dimensioning, which is done -the same way as is the initial dimensioning. All values of items in an array -are lost upon redimensioning, unless they have been STASHed (see section -.GETHN stash -), in which case restoring them also restores the old dimensions. -.H 3 "NEXT" -.SETR next -.P -The NEXT statement is used both for subroutine calls and for unconditional -transfers. This statement takes the form: -.DS -DO (label) NEXT -.DE -(or, of course, -.DS -PLEASE DO (label) NEXT -.DE -etc.), where (label) represents any logical line label which appears in the -program. The effect of such a statement is to transfer control to the -statement specified, and to store in a push down list (which is initially -empty) the location from which the transfer takes place. Items may be -removed from this list and may be discarded or used to return to the -statement immediately following the NEXT statement. These operations are -described in sections -.GETHN forget - and -.GETHN resume - respectively. The programmer is -generally advised to discard any stack entries which he does not intend to -utilize, since the stack has a maximum depth of 79 entries. A program's -attempting to initiate an 80th level of NEXTing will result in the fatal -error message, "PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON." -.H 3 "FORGET" -.SETR forget -.P -The statement PLEASE FORGET exp, where exp represents any expression -(except colloquial and facial expressions), causes the expression to be -evaluated, and the specified number of entries to be removed from the -NEXTing stack and discarded. An attempt to FORGET more levels of NEXTing -than are currently stacked will cause the stack to be emptied, and no error -condition is indicated. This is because the condition is not considered to -be an error. As described in section -.GETHN next -\&, it is good programming practice -to execute a DO FORGET #1 after using a NEXT statement as an unconditional -transfer, so that the stack does not get cluttered up with unused entries: -.DS L -.cs R 24 - DO (123) NEXT - . - . - (123) DO FORGET #1 -.cs R -.DE -.H 3 "RESUME" -.SETR resume -.P -The statement PLEASE RESUME exp has the same effect as FORGET, except that -program control is returned to the statement immediately following the NEXT -statement which stored in the stack the last entry to be removed. Note that -a rough equivalent of the FORTRAN computed GO TO and BASIC ON exp GO TO is -performed by a sequence of the form: -.DS L -.cs R 24 - DO (1) NEXT - . - . - (1) DO (2) NEXT - PLEASE FORGET #1 - . - . - (2) DO RESUME .1 -.cs R -.DE -Unlike the FORGET statement, an attempt to RESUME more levels of NEXTing than -has been stacked will cause program termination. See also section -.GETHN give_up -\&. -.H 3 "STASH" -.SETR stash -.P -Since subroutines are not explicitly implemented in INTERCAL, the NEXT and -RESUME statements must be used to execute common routines. However, as -these routines might use the same variables as the main program, it is -necessary for them to save the values of any variables whose values they -alter, and later restore them. This process is simplified by the STASH -statement, which has the form DO STASH list, where list represents a -string of one or more variable or array names, separated by intersections -(+). Thus -.DS -PLEASE STASH .123+:123+,123 -.DE -stashes the values of two variables and one entire array. The values are -left intact, and copies thereof are saved for later retrieval by (what else?) -the RETRIEVE statement (see section -.GETHN retrieve -). It is not possible to STASH -single array items. -.H 3 "RETRIEVE" -.SETR retrieve -.P -PLEASE RETRIEVE list restores the previously STASHed values of the variables -and arrays named in the list. If a value has been stashed more than once, -the most recently STASHed values are RETRIEVEd, and a second RETRIEVE will -restore the second most recent values STASHed. Attempting to RETRIEVE a -value which has not been STASHed will result in the error message, "THROW -STICK BEFORE RETRIEVING." -.H 3 "IGNORE" -.SETR ignore -.P -The statement DO IGNORE list causes all subsequent statements to have no -effect upon variables and/or arrays named in the list. Thus, for example, -after the sequence -.DS L - DO .1 <- #1 - PLEASE IGNORE .1 - DO .1 <- #0 -.DE -16-bit variable number 1 would have the value 1, not 0. Inputting (see -section -.GETHN input -) into an IGNOREd variable also has no effect. The condition -is annulled via the REMEMBER statement (see section -.GETHN remember -). Note that, when -a variable is being IGNOREd, its value, though immutable, is still -available for use in expressions and the like. -.if '\*c'y' \{\ -.P -Though the INTERCAL-72 manual laid down that the value of an IGNOREd -variable cannot change, it was unclear about whether or not a -statement which appears to change an IGNOREd variable is executed or -not. This may appear to be a "If a tree falls in the forest ..." type -of question, but if the statement in question has other side effects -it is not. -.P -Since another mechanism already exists for ABSTAINing from a -statement, C-INTERCAL's IGNORE only prevents the changing of the -specific variable in question, not the execution of the entire -statement. In the present version of the language this only makes -a difference for the WRITE IN (see -.GETHN input -) and RETRIEVE (see -.GETHN retrieve -) statements. Attempting to WRITE IN -to an IGNOREd variable will cause a number to be read from the input, -which will be discarded since it cannot be stored in the variable. -Using RETRIEVE on an IGNOREd variable will pop the variable's stash -stack without actually changing its value. \} -.H 3 "REMEMBER" -.SETR remember -.P -PLEASE REMEMBER list terminates the effect of the IGNORE statement for all -variables and/or arrays named in the list. It does not matter if a variable -has been IGNOREd more than once, nor is it an error if the variable has not -been IGNOREd at all. -.H 3 "ABSTAIN" -.SETR abstain -.P -INTERCAL contains no simple equivalent to an IF statement or computed GO -TO, making it difficult to combine similar sections of code into a single -routine which occasionally skips around certain statements. The IGNORE -statement (see section -.GETHN ignore -) is helpful in some cases, but a more viable -method is often required. In keeping with the goal of INTERCAL having -nothing in common with any other language, this is made possible via the -ABSTAIN statement. -.P -This statement takes on one of two forms. It may not take on both at any one -time. DO ABSTAIN FROM (label) causes the statement whose logical line label -is (label) to be abstained from. PLEASE ABSTAIN FROM gerund list causes all -statements of the specified type(s) to be abstained from, as in -.DS L -.ta .3i .6i T .6i - PLEASE ABSTAIN FROM STASHING - PLEASE ABSTAIN FROM IGNORING + FORGETTING - PLEASE ABSTAIN FROM NEXTING - or PLEASE ABSTAIN FROM CALCULATING -.DE -Statements may also be automatically abstained from at the start of -execution via the NOT or N'T parameter (see section -.GETHN identifiers -). -.P -If, in the course of execution, a statement is encountered which is being -abstained from, it is ignored and control passes to the next statement in -the program (unless it, too, is being abstained from). -.P -The statement DO ABSTAIN FROM ABSTAINING is perfectly valid, as is DO ABSTAIN -FROM REINSTATING (although this latter is not usually recommended). However, -the statement DO ABSTAIN FROM GIVING UP is not accepted, even though DON'T -GIVE UP is. -.H 3 "REINSTATE" -.SETR reinstate -.P -The REINSTATE statement, like the ABSTAIN, takes as an argument either a -line label or a gerund list. No other form of argument is permitted. For -example, the following is an invalid argument: -.DS L - Given: x\(!=0, y\(!=0, Prove: x+y=0 - Since x\(!=0, then x+1\(!=1, x+a\(!=a, x+y\(!=y. - But what is y? y is anything but 0. - Thus x+y \(!= anything but 0. - Since x+y cannot equal anything but 0, x+y=0. - Q.E.D. -.DE -REINSTATEment nullifies the effects of an abstention. Either form of -REINSTATEment can be used to "free" a statement, regardless of whether the -statement was abstained from by gerund list, line label, or NOT. Thus, -PLEASE REINSTATE REINSTATING is not necessarily an irrelevant statement, -since it might free a DON'T REINSTATE command or a REINSTATE the line label -of which was abstained from. However, DO REINSTATE GIVING UP is invalid, -and attempting to REINSTATE a GIVE UP statement by line label will have no -effect. Note that this insures that DON'T GIVE UP will always be a -"do-nothing" statement. -.H 3 "GIVE UP" -.SETR give_up -.P -PLEASE GIVE UP is used to exit from a program. It has the effect of a PLEASE -RESUME #80. DON'T GIVE UP, as noted in section -.GETHN reinstate -\&, is effectively a null -statement. -.H 3 "Input" -.SETR input -.P -Input is accomplished with the statement DO WRITE IN list, where list -represents a string of variables and/or elements of arrays, separated by -intersections. Numbers are represented on cards, each number on a separate -card, by spelling out each digit (in English) and separating the digits -with one or more spaces. A zero (0) may be spelled as either ZERO or OH. -Thus the range of (32-bit) input values permissible extends from ZERO (or -OH) through FOUR TWO NINE FOUR NINE SIX SEVEN TWO NINE FIVE. -.if '\*c'y' \{\ -(For the convenience of aviators, C-INTERCAL accepts the spelling -NINER for NINE. In the service of internationalization, C-INTERCAL -also accepts input digits in Sanskrit, Basque, Tagalog, Classical -Nahuatl, Georgian, Kwakiutl, and Volapuk.) \} -.P -Attempting to write in a value greater than or equal to SIX FIVE FIVE THREE -SIX for a 16-bit variable will result in the error message, "DON'T BYTE OFF -MORE THAN YOU CAN CHEW." -.if '\*c'y' \{\ -.P -(See also section -.GETHN communication - for a description of C-INTERCAL's character I/O.) \} -.H 3 "Output" -.P -Values may be output to the printer, one value per line, via the statement -DO READ OUT list, where the list contains variables, array elements, and/or -constants. Output is in the form of "extended" Roman numerals (also called -"butchered" Roman numerals), with an overline -.if t (\(rn) -indicating the value below -is "times 1000", and lower-case letters indicating "times 1000000". Zero -is indicated by an overline with no character underneath. Thus, the range -of (32-bit) output values possible is from -.if t \(rn -.if n \{\ -.nf -_ - -.fi \} -through -.ie t \o"i\(rn"\o"v\(rn"ccxciv\o"C\(rn"\o"M\(rn"\o"L\(rn"\o"X\(rn"\o"V\(rn"\o"I\(rn"\o"I\(rn"CCXCV. -.el \{\ -.br -.nf -__ ____________ -ivccxcivCMLXVIICCXCV. -.fi \} -Note: For values whose residues modulo 1000000 are less than 4000, M is -used to represent 1000; for values whose residues are 4000 or greater, -.if t \o"I\(rn" -.if n \{\ -.nf -_ -I -.fi \} -.\" This is the one place we corrected the original manual. -is used. Thus #3999 would read out as MMMCMXCIX \*F while #4000 would -.FS -The original INTERCAL-72 manual claimed -that #3999 should render as MMMIM, but the C-INTERCAL developers have -been unable to find an algorithm that does this and is consistent -with the rest of the rules. -.FE -readout as -.if t \o"I\(rn"\o"V\(rn". -.if n \{\ -.nf -__ -IV -.fi \} -Similar rules apply to the use of -.if t \o"M\(rn" -.if n \{\ -.nf -_ -M -.fi \} -and i for 1000000, and to that of m and -.if t \o"i\(rn" -.if n \{\ -.nf -_ -i -.fi \} -for 1000000000. -.if '\*c'y' \{\ -.P -(See also section -.GETHN communication - for a description of C-INTERCAL's character I/O.) \} -.if '\*c'y' \{\ -.H 3 "COME FROM" -.P -In which we try to precisely define a statement that should never -have been born, but is nevertheless one of the more useful statements -in INTERCAL. -.H 4 "Background" -.P -The earliest known description of the COME FROM statement in the computing -literature is in [R. L. Clark, "A linguistic contribution to GOTO-less -programming," Commun. ACM 27 (1984), pp. 349-350], part of the famous April -Fools issue of CACM. The subsequent rush by language designers to include the -statement in their languages was underwhelming, one might even say nonexistent. -It was therefore decided that COME FROM would be an appropriate addition -to C-INTERCAL. -.H 4 "Description" -.P -There are two useful ways to visualize the action of the COME FROM -statement. The simpler is to see that it acts like a GOTO when the -program is traced backwards in time. More precisely, the statements -.DS L -(1) DO - . - . - . -(2) DO COME FROM (1) -.DE -should be thought of as being equivalent to -.DS L -(1) DO -(2) DO GOTO (3) - . - . - . -(3) DO NOTHING -.DE -if INTERCAL actually had a GOTO statement at all, which of course it -doesn't. -.P -What this boils down to is that the statement DO COME FROM (label), -anywhere in the program, places a kind of invisible trap door -immediately after statement (label). Execution or abstention of that -statement is immediately followed by an unconditional jump to the -COME FROM, unless the (label)ed statement is an executed NEXT, in which -case the jump occurs if the program attempts to RESUME back to that -NEXT statement. It is an error for more than one COME FROM to refer -to the same (label). -.P -Modification of the target statement by ABSTAIN or by the % qualifier -affects only that statement, not the subsequent jump. Such -modifications to the COME FROM itself, however, do affect the jump. -Encountering the COME FROM statement itself, rather than its target, -has no effect. \} -.SETR last_statement -.H 2 "Comments" -.SETR comments -.P -Unrecognizable statements, as noted in section -.GETHN error_messages -\&, are flagged with a splat -(*) during compilation, and are not considered fatal errors unless they -are encountered during execution, at which time the statement (as input at -compilation time) is printed and execution is terminated. This allows for -an interesting (and, by necessity, unique) means of including comments in -an INTERCAL listing. For example, the statement: -.sp 1 -* PLEASE NOTE THAT THIS LINE HAS NO EFFECT -.P -will be ignored during execution due to the inclusion of the NOT qualifier. -User-supplied error messages are also easy to implement: -.sp 1 -* DO SOMETHING ABOUT OVERFLOW IN ;3 -.P -as are certain simple conditional errors: -.DS L -.cs R 24 -* (123) DON'T YOU REALIZE THIS STATEMENT SHOULD ONLY BE ENCOUNTERED - ONCE? - PLEASE REINSTATE (123) -.cs R -.DE -This pair of statements will cause an error exit the second time they are -encountered. Caution!! The appearance of a statement identifier in an -intended comment will be taken as the beginning of a new -.\" CORRECTION: -.\" "comment example above" was originally "example on the preceding page" -.\" We can't rely on page boundaries any more. -statement. Thus, the first comment example above could not have been: -.sp 1 -* PLEASE NOTE THAT THIS LINE DOES NOTHING -.P -The third example, however, is valid, despite the appearance of two cases -of D-space-O, since INTERCAL does not ignore extraneous spaces in statement -identifiers. -.if '\*c'y' \{\ -.H 1 "OUTSIDE COMMUNICATION" -.if '\*c'y' \{\ -.DS I F -She puzzled over this for some time, but at last a bright thought -struck her. "Why, it's a Looking-glass book, of course! And, if I hold -it up to a glass, the words will all go the right way again." -.DE \} -.SETR communication -.P -In which we try to remedy the fact that, due to I/O limitations, INTERCAL -can not even in principle perform the same tasks as other languages. It -is hoped that this addition will permit INTERCAL users to waste vast -quantities of computer time well into the 21st century. -.H 2 "Motivation" -.P -One of the goals of INTERCAL was to provide a language which, though -different from all other languages, is nevertheless theoretically -capable of all the same tasks. INTERCAL-72 failed to -accomplish this because its I/O functions could not handle arbitrary -streams of bits, or even arbitrary sequences of characters. A -language which can't even send its input directly to its output -can hardly be considered as capable as other languages. -.H 2 "Turing Text Model" -.P -To remedy this problem, character I/O is now provided in a form based -on the "Turing Text" model, originally proposed by Jon Blow. The -C-INTERCAL programmer can access this capability by placing a -one-dimensional array in the list of items given to a WRITE IN or READ -OUT statement. On execution of the statement, the elements of the array -will, from first to last, be either loaded from the input or sent -to the output, as appropriate, in the manner described below. There -is currently no support for I/O involving higher-dimensional arrays, -but some form of graphics might be a possible 2-D interpretation. -.P -The heart of the Turing Text model is the idea of a continuous loop -of tape containing, in order, all the characters in the machine's -character set. When a character is received by the input routine, -the tape is advanced the appropriate number of spaces to bring -that character under the tape head, and the number of spaces the -tape was moved is the number that is actually seen by the INTERCAL -program. Another way to say this is that the number placed in an -INTERCAL array is the difference between the character just -received and the previous character, modulo the number of characters -in the machine character set. -.P -Output works in just the opposite fashion, except that the characters -being output come from the other side of the tape. From this position -the characters on the tape appear to be in reverse order, and are -individually backwards as well. (We would show you what it looks -like, but we don't have a font with backwards letters available. -Use your imagination.) The effect is that a number is taken out -of an INTERCAL array, subtracted from the last character output -- -i.e., the result of the last subtraction -- and then sent on down -the output channel. The only catch is that the character as seen -by the INTERCAL program is the mirror-image of the character as -seen by the machine and the user. The bits of the character are -therefore taken in reverse order as it is sent to the output. -Note that this bit reversal affects only the character seen by -the outside world; it does not affect the character stored internally -by the program, from which the next output number will be subtracted. -All subtractions are done modulo the number of characters in the -character set. -.P -Two different tapes are used for input and output to allow for -future expansion of the language to include multiple input and -output channels. Both tapes start at character 0 when a program -begins execution. On input, when an end-of-file marker is reached -the number placed in the array is one greater than the -highest-numbered character on the tape. -.H 2 "Example Program" -.P -If all this seems terribly complicated, it should be made perfectly -clear by the following example program, which simply maps its input -to its output (like a simplified UNIX "cat"). It assumes that -characters are 8 bits long, but that's fine since the current version -of C-INTERCAL does too. It uses the standard library routines for addition -and subtraction. -.DS L -.cs R 24 - 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 .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 - DO ,1SUB#1 <- .3 -(30) PLEASE READ OUT ,1 -.cs R -.DE -For each number received in the input array, the program first tests -the #256 bit to see if the end of file has been reached. If not, the -previous input character is subtracted off to obtain the current -input character. Then the order of the bits is reversed to find -out what character should be sent to the output, and the result -is subtracted from the last character sent. Finally, the difference -is placed in an array and given to a READ OUT statement. See? -We told you it was simple! \} -.if '\*c'y' \{\ -.H 1 "TriINTERCAL" -.if '\*c'y' \{\ -.DS I F -"-- oh dear, how puzzling it all is! I'll try if I know all the things -I used to know. Let me see: four times five is twelve, and four times -six is thirteen, and four times seven is -- oh dear! I shall never get -to twenty at that rate!" -.DE \} -.SETR tri_intercal -.P -In which it is revealed that bitwise operations are too ordinary for -hard-core INTERCAL programmers, and extensions to other bases are -discussed. These are not, strictly speaking, extensions to INTERCAL -itself, but rather new dialects sharing most of the features of the -parent language. -.H 2 "Motivation" -.P -INTERCAL is really a pretty sissy language. It tries hard to be -different, but when you get right down to its roots, what do you find? -You find bits, that's what. Plain old ones and zeroes, in groups of -16 and 32, just like every other language you've ever heard of. And -what operations can you perform on these bits? The INTERCAL operators -may arrange and permute them in weird and wonderful ways, but at the -bit level the operators are the same AND, OR and XOR you've seen -countless times before. -.P -Once the prospective INTERCAL programmer masters the unusual syntax, -she finds herself working with the familiar Boolean operators on -perfectly ordinary unsigned integer words. Even the constants she uses -are familiar. After all, who would not immediately recognize #65535 -and #32768? It may take a just a moment more to figure out #65280, -and #21845 and #43690 could be puzzles until she notices that they -sum to #65535, but basically she's still on her home turf. The 16-bit -limit on constants actually works in the programmer's favor by insuring -that very long anonymous constants cannot appear in INTERCAL programs. -And this is in a language that is supposed to be different from any -other! -.H 2 "Abandon All Hope..." -.P -Standard INTERCAL is based on variables consisting of ordinary bits -and familiar Boolean operations on those bits. In pursuit of uniqueness, -it seems appropriate to provide a new dialect, otherwise identical to -INTERCAL, which instead uses variables consisting of trits, i.e. ternary -digits, and operators based on tritwise logical operations. This is -intended to be a separate dialect, rather than an extension to INTERCAL -itself, for a number of reasons. Doing it this way avoids word-length -conflicts, does not spoil the elegance of the Spartan INTERCAL operator -set, and dodges the objections of those who might feel it too great an -alteration to the original language. Primarily, though, giving INTERCAL -programmers the ability to switch numeric base at will amounts to -excessive functionality. So much better that a programmer choose a base -at the outset and then be forced to stick with it for the remainder of -the program. -.H 2 "Compiler Operation" -.P -The same compiler, ick, supports both INTERCAL and TriINTERCAL. -This has the advantage that future bug fixes and additions to the -language not related to arithmetic immediately apply to both versions. -The compiler recognizes INTERCAL source files by the extension '.i', -and TriINTERCAL source files by the extension '.3i'. It's as simple -as that. There is no way to mix INTERCAL and TriINTERCAL source in -the same program, and it is not always possible to determine which -dialect a program is written in just by looking at the source code. -.H 2 "Data Types" -.P -The two TriINTERCAL data types are 10-trit unsigned integers and -20-trit unsigned integers. All INTERCAL syntax for distinguishing -data types is ported to these new types in the obvious way. Small -words may contain numbers from #0 to #59048; large words may contain -numbers from #0$#0 to #59048$#59048. Errors are signaled for constants -greater than #59048 and for attempts to WRITE IN numbers too large -for a given variable or array element to hold. -.P -Note that though TriINTERCAL considers all numbers to be unsigned, -nothing prevents the programmer from implementing arithmetic operations -that treat their operands as signed. Three's complement is one obvious -choice, but balanced ternary notation is also a possibility. This -latter is a very pretty and symmetrical system in which all 2 trits -are treated as if they had the value -1. -.H 2 "Operators" -.P -The TriINTERCAL operators are designed to inherit the relevant properties -of the standard INTERCAL operators, so that both can be considered as -merely different aspects of the same Platonic ideal. (Not that the word -"ideal" is ever particularly relevant when used in connection with -INTERCAL.) -.H 3 "Binary Operators I" -.P -The binary operators carry over from the original language with only -minor changes. The mingle operator ($) creates a 20-trit word by -alternating trits from its two 10-trit operands. The select operator (~) -is a little more complicated, since the ternary tritmask may contain 0, 1, -and 2 trits. If we observe that the select operation on binary operands -amounts to a bitwise AND and some rearrangement of bits, it seems -appropriate to base the select for ternary operands on a tritwise AND in -the analogous fashion. We therefore postpone the definition of select -until we know what a tritwise AND looks like. -.H 3 "Unary Operators" -.P -The unary operators in INTERCAL are all derived from the familiar -Boolean operations on single bits. To extend these operations to trits, -we first ask ourselves what the important properties of these operations -are that we wish to be preserved, then design the tritwise operators so -that they behave in a similar fashion. -.H 4 "Unary Logical Operators" -.P -Let's start with AND and OR. To begin with, these can be considered -"choice" or "preference" operators, as they always return one of their -operands. AND can be described as wanting to return 0, but returning 1 -if it is given no other choice, i.e., if both operands are 1. Similarly, -OR wants to return 1 but returns 0 if that is its only choice. From -this it is immediately apparent that each operator has an identity -element that "always loses", and a dominator element that "always wins". -.P -AND and OR are commutative and associative, and each distributes -over the other. They are also symmetric with each other, in the sense -that AND looks like OR and OR looks like AND when the roles of 0 and 1 -are interchanged (De Morgan's Laws). This symmetry property seems to be -a key element to the idea that these are logical, rather than arithmetic, -operators. In a three-valued logic we would similarly expect a -three-way symmetry among the three values 0, 1 and 2 and the three -operators AND, OR and (of course) BUT. -.P -The following tritwise operations have all the desired properties: -OR returns the greater of its two operands. That is, it returns 2 if -it can get it, else it tries to return 1, and it returns 0 only if both -operands are 0. AND wants to return 0, will return 2 if it can't get -0, and returns 1 only if forced. BUT wants 1, will take 0, and tries -to avoid 2. The equivalents to De Morgan's Laws apply to rotations -of the three elements, e.g., 0 -> 1, 1 -> 2, 2 -> 0. Each operator -distributes over exactly one other operator, so the property -"X distributes over Y" is not transitive. The question of which way -this distributivity ring goes around is left as an exercise for the -student. -.P -In TriINTERCAL programs the whirlpool (@) denotes the unary tritwise -BUT operation. You can think of the whirlpool as drawing values -preferentially towards the central value 1. Alternatively, you can -think of it as drawing your soul and your sanity inexorably down ... -.P -On the other hand, maybe it's best you \fInot\fR think of it that way. -.P -A few comments about how these operators can be used. OR acts like -a tritwise maximum operation. AND can be used with tritmasks. 0's -in a mask wipe out the corresponding elements in the other operand, -while 1's let the corresponding elements pass through unchanged. 2's -in a mask consolidate the values of nonzero elements, as both 1's and -2's in the other operand yield 2's in the output. BUT can be used to -create "partial tritmasks". 0's in a mask let BUT eliminate 2's from -the other operand while leaving other values unchanged. Of course, -the symmetry property guarantees that the operators don't really -behave differently from each other in any fundamental way; the apparent -differences come from the intuitive view that a 0 trit is "not set" -while a 1 or 2 trit is "set". -.H 4 "Binary Operators II" -.P -At this point we can define select, since we now know what the -tritwise AND looks like. Select takes the binary tritwise AND of -its two operands. It shifts all the trits of the result corresponding -to 2's in the right operand over to the right (low) end of the result, -then follows them with all the output trits corresponding to 1's in -the right operand. Trits corresponding to 0's in the right operand, -which are all 0 anyway, occupy the remaining space at the left end of -the output word. Both 10-trit and 20-trit operands are accepted, -and are padded with zeroes on the left if necessary. The output -type is determined the same way as in standard C-INTERCAL. -.H 4 "Unary Arithmetic Operators" -.P -Now that we've got all that settled, what about XOR? This is -easily the most-useful of the three unary INTERCAL operators, -because it combines in one package the operations ADD WITHOUT CARRY, -SUBTRACT WITHOUT BORROW, BITWISE NOT-EQUAL, and BITWISE NOT. In -TriINTERCAL we can't have all of these in the same operator, since -addition and subtraction are no longer the same thing. The solution -is to split the XOR concept into two operators. The ADD WITHOUT CARRY -operation is represented by the new sharkfin (^), while the old -what (?) represents SUBTRACT WITHOUT BORROW. The reason for this -choice is so that what (?) will also represent the TRITWISE NOT-EQUAL -operation. -.P -Note that what (?), unlike the other four unary operators, is not -symmetrical. It should be thought of as rotating its operand one trit -to the right (with wraparound) and then subtracting off the trits of -the original number. These subtractions are done without borrowing, -i.e., trit-by-trit modulo 3. -.H 3 "Examples" -.P -The TriINTERCAL operators really aren't all that bad once you get -used to them. Let's look at a few examples to show how they can -be used in practice. In all of these examples the input value is -contained in the 10-trit variable .3. -.P -In INTERCAL, single-bit values often have to be converted from -{0,1} to {1,2} for use in RESUME statements. Examples of how to do -this appear in the original manual. In TriINTERCAL the expression -"^.3$#1"~#1 sends 0 -> 1 and 1 -> 2. If the 1-trit input value can -take on any of its three possible states, however, we will also have -to deal with the 2 case. The expression "V.3$#1"~#1 sends {0,1} -> 1 -and 2 -> 2. To test if a trit is set, we can use "V'"&.3$#2"~#1'$#1"~#1, -sending 0 -> 1 and {1,2} -> 2. To reverse the test we use -"?'"&.3$#2"~#1'$#1"~#1, sending 0 -> 2 and {1,2} -> 1. Note that we -have not been taking full advantage of the new select operator. These -last two expressions can be simplified into "V!3~#2'$#1"~#1 and -"?!3~#2'$#1"~#1, which perform exactly the same mappings. Finally, if -we need a 3-way test, we can use "@'"^.3$#7"~#4'$#2"~#10, which -obviously sends 0 -> 1, 1 -> 2, and 2 -> 3. -.P -For an unrelated example, the expression "^.3$.3"~"#0$#29524" -converts all of the 1-trits of .3 into 2's and all of the 2-trits -into 1's. In balanced ternary, where 2-trits represent -1 values, -this is the negation operation. -.H 2 "Beyond Ternary..." -.P -While we're at it, we might as well extend this multiple bases -business a little farther. The ick compiler actually recognizes -filename suffixes of the form '.Ni', where N is any number from 2 -to 7. 2 of course gives standard INTERCAL, while 3 gives TriINTERCAL. -We cut off before 8 because octal notation is the smallest base used -to facilitate human-to-machine communication, and this seems quite -contrary to the basic principles behind INTERCAL. The small data -types hold 16 bits, 10 trits, 8 quarts, 6 quints, 6 sexts, or 5 septs, -and the large types are always twice this size. -.P -As for operators, ? is always SUBTRACT WITHOUT BORROW, and ^ -is always ADD WITHOUT CARRY. V is the OR operation and always -returns the max of its inputs. & is the AND operation, which chooses -0 if possible but otherwise returns the max of the inputs. @ is BUT, -which prefers 1, then 0, then the max of the remaining possibilities. -Rather than add more special symbols forever, a numeric modifier may -be placed directly before the @ to indicate the operation -that prefers one of the digits not already represented. Thus in files -ending in '.5i', the permitted unary operators are ?, ^, &, @, 2@, 3@, -and V. Use of such barbarisms as 0@ to represent & -are not permitted, nor is the use of @ or ^ in files with either -of the extensions '.i' or '.2i'. Why not? You just can't, that's why. -Don't ask so many questions. -.P -As a closing example, we note that in balanced quinary notation, -where 3 means -2 and 4 means -1, the negation operation can be written -as either -.DS L - DO .1 <- "^'"^.3$.3"~"#0$#3906"'$'"^.3$.3"~"#0$#3906"'"~"#0$#3906" -.DE -or as -.DS L - DO .1 <- "^.3$.3"~"#0$#3906" - DO .1 <- "^.1$.1"~"#0$#3906" -.DE -These work because multiplication by -1 is the same as multiplication -by 4, modulo 5. -.P -Now go beat your head against the wall for a while.\} -.H 1 "SUBROUTINE LIBRARY" -.if '\*c'y' \{\ -.DS I F -"You don't know what you're talking about!" cried Humpty Dumpty. "How -many days are there in a year?" -.P -"Three hundred and sixty-five," said Alice. -.P -"And how many birthdays have you?" -.P -"One." -.P -"And if you take one from three hundred and sixty-five, what remains?" -.P -"Three hundred and sixty-four, of course." -.P -Humpty Dumpty looked doubtful. "I'd rather see that done on paper," he -said. -.DE \} -.SETR sublib -.P -INTERCAL provides several built-in subroutines to which control can be -transferred to perform various operations. These operations include many -useful functions which are not easily representable in INTERCAL, such as -addition, subtraction, etc. -.H 2 "Usage" -.P -In general, the operands are .1, .2, etc., or :1, :2, etc., and the result(s) -are stored in what would have been the next operand(s). For instance, one -routine adds .1 to .2 and stores the sum in .3, with .4 being used to indicate -overflow. All variables not used for results are left unchanged. -.H 2 "Available Functions" -.SETR functions -.P -At the time of this writing, only the most fundamental operations are offered -in the library, as a more complete selection would require prohibitive time -and core to implement. These functions, along with their corresponding entry -points (entered via DO (entry) NEXT) are listed below. -.DS L -.cs R 24 - (1000) .3 <- .1 plus .2, error exit on overflow - (1009) .3 <- .1 plus .2 - .4 <- #1 if no overflow, else .4 <- #2 - (1010) .3 <- .1 minus .2, no action on overflow - (1020) .1 <- .1 plus #1, no action on overflow - (1030) .3 <- .1 times .2, error exit on overflow - (1039) .3 <- .1 times .2 - .4 <- #1 if no overflow, else .4 <- #2 - (1040) .3 <- .1 divided by .2 - .3 <- #0 if .2 is #0 - (1050) .2 <- :1 divided by .1, error exit on overflow - .2 <- #0 if .1 is #0 - - (1500) :3 <- :1 plus :2, error exit on overflow - (1509) :3 <- :1 plus :2 - :4 <- #1 if no overflow, else :4 <- #2 - (1510) :3 <- :1 minus :2, no action on overflow - (1520) :1 <- .1 concatenated with .2 - (1525) This subroutine is intended solely for internal - use within the subroutine library and is therefore - not described here. Its effect is to shift .3 - logically 8 bits to the left. - (1530) :1 <- .1 times .2 - (1540) :3 <- :1 times :2, error exit on overflow - (1549) :3 <- :1 times :2 - :4 <- #1 if no overflow, else :4 <- #2 - (1550) :3 <- :1 divided by :2 - :3 <- #0 if :2 is #0 - - (1900) .1 <- uniform random no. from #0 to #65535 - (1910) .2 <- normal random no. from #0 to .1, with - standard deviation .1 divided by #12 -.cs R -.DE -.if '\*c'y' \{\ -.H 2 "Automagical Inclusion Of The Subroutine Library" -.P -The C-INTERCAL compiler will automatically include the system library if a DO -(1xxx) NEXT statement is used, and if no (1xxx) labels are defined anywhere, -where (1xxx) is a label in the 1000-1999 range, inclusive. This was not -an INTERCAL-72 feature. \} -.H 1 "PROGRAMMING HINTS" -.if '\*c'y' \{\ -.DS I F -"If any one of them can explain it," said Alice, "I'll give him -sixpence. \fII\fR don't believe there's an atom of meaning in it." -The jury all wrote down, on their slates, "\fIShe\fR doesn't -believe there's an atom of meaning in it," but none of them attempted -to explain the paper. -.P -"If there's no meaning in it," said the King, "that saves a world of -trouble, you know, as we needn't try to find any. And yet, I don't -know," he went on, spreading out the verses on one knee, and looking -at them with one eye: "I seem to see some meaning in them, after -all...." -.DE \} -.SETR proghints -.P -For the user looking to become more familiar with the INTERCAL language, we -present in this section an analysis of a complex program, as well as some -suggested projects for the ambitious programmer. -.P -Considering the effort involved in writing an INTERCAL program, it was -decided in putting together this manual to use an already existing program -for instructive analysis. Since there was only one such program available, -we have proceeded to use it. It is known as the "INTERCAL System Library." -.H 2 "Description" -.P -.\" CORRECTION: -.\" "is in section {section}" was "on the second page following" -.\" We can't rely on the page breaks any more. -The program listing is in section -.GETHN syslib -\&. It is in the same -format as would be produced by the Princeton INTERCAL compiler in FORMAT -mode with WIDTH=62 (see section -.GETHN princeton -). For a description of the functions -performed by the Library, see section -.GETHN functions -\&. -.H 2 "Analysis" -.P -We shall not attempt to discuss here the algorithms used, but rather we -shall point out some of the general techniques applicable to a wide range -of problems. -.P -Statements 10, 14, 15, and 26 make up a virtual "computed GO TO". When -statement 10 is executed, control passes eventually to statement 16 or 11, -depending on whether .5 contains #1 or #2, respectively. The value of .5 -is determined in statement 9, which demonstrates another handy technique. -To turn an expression, exp, with value #0 or #1, into #1 or #2 (for use in -a "GO TO"), use "\*(vb'exp'\*(ct#1"~#3. -To reverse the condition (i.e., convert #0 -to #2 and leave #1 alone) use "\*(vb'exp'\*(ct#2"~#3. -.P -Certain conditions are easily checked. For example, to test for zero, -select the value from itself and select the bottom bit (see statement 54). -To test for all bits being 1's, select the value from itself and select the -top bit. -.\" CORRECTION: -.\" "statements 219 and 220" were "statement 192 and 193", but there -.\" is no such test there. -.\" Also, last sentence had parenthetical "(see statement 261)". Not -.\" only does 261 contain no such test, the library as a whole doesn't -.\" seem to either. -The test for greater than, performed in -statements 219 and 220 on 32-bit values, employs binary logical operations, -which are performed as follows: -.DS -\&'\*(vb.1\*(ct.2'~'#0\*(ct#65535' -.DE -for 16-bit values or, for 32-bit values: -.DS L - "'\*(vb":1~'#65535\*(ct30'"\*(ct":2~'#65535\*(ct#0'"'~'#0 - \*(ct#65535'"\*(ct"'\*(vb":1~'#0\*(ct#65535'"\*(ct":2~'#0 - \*(ct#65535'"'~'#0\*(ct#65535'" -.DE -(The proofs are left as an exercise to the reader.) -.P -Testing for greater-than with 16-bit values is somewhat simpler and is done -with the pair of statements: -.DS L - DO .C <- '\*(vb.A\*(ct.B'~'#0\*(ct#65535' - DO .C <- '&"'.A~.C'~'"\*(vb'\*(vb.C~.C'\*(ct#32768" - ~"#0\*(ct#65535"'"\*(ct".C~.C"'~#1 -.DE -This sets .C (a dummy variable) to #1 if .A > .B, and #0 otherwise. The -expression may be expanded as described above to instead set .C to #1 or -#2. -.P -Note also in statement 220 the occurrence of ~"#65535\*(ct#65535". Although -these operations select the entire value, they are not extraneous, as they -ensure that the forthcoming \*(vbs will be operating on 32-bit values. -.P -In several virtual computed GO TOs the DO FORGET #1 (statement 15 in the -earlier example) has been omitted, since the next transfer of control would -be a DO RESUME #1. By making this a DO RESUME #2 instead, the FORGET may -be forgotten. -.P -In statement 64, note that .2 is STASHed twice by a single statement. This -is perfectly legal. -.P -Lastly, note in statements 243 and 214 respectively, expressions for -shifting 16- and 32-bit variables logically one place to the left. -Statement 231 demonstrates right-shifting for 32-bit variables. -.bp -.H 2 "Program Listing" -.SETR syslib -.DS L -.cs R 24 -.\" CORRECTION: -.\" This is the corrected system library, not the rather buggy original. -.\" Can be semi-mechanically generated from the syslib.i file with -.\" sed syslib.i -e 1d -e '/\$/s//\\*(ct/g' -e '/?/s//\\*(vb/g' | nl | expand - \" but you have to -.\" (a) restore the splat on line 13 DOUBLE OR SINGLE PRECISION OVERFLOW -.\" (b) restore the splat on line 254 PLEASE NOTE .... -.\" (c) appropriately conditionalize lines 289-294 -.\" (d) manually break lines where they wrap - 1 (1000) PLEASE IGNORE .4 - 2 PLEASE ABSTAIN FROM (1005) - 3 (1009) DO STASH .1 + .2 + .5 + .6 - 4 DO .4 <- #1 - 5 DO (1004) NEXT - 6 (1004) PLEASE FORGET #1 - 7 DO .3 <- '\*(vb.1\*(ct.2'~'#0\*(ct#65535' - 8 DO .6 <- '&.1\*(ct.2'~'#0\*(ct#65535' - 9 PLEASE DO .5 <- "\*(vb!6~#32768'\*(ct#1"~#3 - 10 DO (1002) NEXT - 11 DO .4 <- #2 - 12 (1005) DO (1006) NEXT -* 13 (1999) DOUBLE OR SINGLE PRECISION OVERFLOW - 14 (1002) DO (1001) NEXT - 15 (1006) PLEASE FORGET #1 - 16 DO .5 <- '\*(vb"!6~.6'~#1"\*(ct#1'~#3 - 17 DO (1003) NEXT - 18 DO .1 <- .3 - 19 DO .2 <- !6\*(ct#0'~'#32767\*(ct#1' - 20 DO (1004) NEXT - 21 (1003) DO (1001) NEXT - 22 DO REINSTATE (1005) - 23 (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 - 24 DO REMEMBER .4 - 25 PLEASE RESUME #2 - 26 (1001) DO RESUME .5 - 27 (1010) DO STASH .1 + .2 + .4 - 28 DO .4 <- .1 - 29 DO .1 <- '\*(vb.2\*(ct#65535'~'#0\*(ct#65535' - 30 DO (1020) NEXT - 31 PLEASE DO .2 <- .4 - 32 PLEASE DO (1009) NEXT - 33 DO RETRIEVE .1 + .2 + .4 - 34 PLEASE RESUME #1 - 35 (1020) DO STASH .2 + .3 - 36 DO .2 <- #1 - 37 PLEASE DO (1021) NEXT - 38 (1021) DO FORGET #1 - 39 DO .3 <- "\*(vb!1~.2'\*(ct#1"~#3 - 40 PLEASE DO .1 <- '\*(vb.1\*(ct.2'~'#0\*(ct#65535' - 41 DO (1022) NEXT - 42 DO .2 <- !2\*(ct#0'~'#32767\*(ct#1' - 43 DO (1021) NEXT - 44 (1023) PLEASE RESUME .3 - 45 (1022) DO (1023) NEXT - 46 PLEASE RETRIEVE .2 + .3 - 47 PLEASE RESUME #2 - 48 (1030) DO ABSTAIN FROM (1033) - 49 PLEASE ABSTAIN FROM (1032) - 50 (1039) DO STASH :1 + .5 - 51 DO (1530) NEXT - 52 DO .3 <- :1~#65535 - 53 PLEASE DO .5 <- :1~'#65280\*(ct#65280' - 54 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 - 55 DO (1031) NEXT - 56 (1032) DO (1033) NEXT - 57 DO (1999) NEXT - 58 (1031) DO (1001) NEXT - 59 (1033) DO .4 <- .5 - 60 DO REINSTATE (1032) - 61 PLEASE REINSTATE (1033) - 62 DO RETRIEVE :1 + .5 - 63 PLEASE RESUME #2 - 64 (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 - 65 DO .2 <- #0 - 66 DO (1520) NEXT - 67 DO STASH :1 - 68 PLEASE RETRIEVE .2 - 69 DO .1 <- .2 - 70 DO .2 <- #0 - 71 PLEASE DO (1520) NEXT - 72 DO :2 <- :1 - 73 DO RETRIEVE .1 + .2 + :1 - 74 DO (1550) NEXT - 75 PLEASE DO .3 <- :3 - 76 DO RETRIEVE :1 + :2 + :3 - 77 DO RESUME #1 - 78 (1050) PLEASE STASH :2 + :3 + .5 - 79 DO :2 <- .1 - 80 PLEASE DO (1550) NEXT - 81 DO .5 <- :3~'#65280\*(ct#65280' - 82 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 - 83 DO (1051) NEXT - 84 DO (1999) NEXT - 85 (1051) DO (1001) NEXT - 86 DO .2 <- :3 - 87 PLEASE RETRIEVE :2 + :3 + .5 - 88 DO RESUME #2 - 89 (1500) PLEASE ABSTAIN FROM (1502) - 90 PLEASE ABSTAIN FROM (1506) - 91 (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - 92 DO .1 <- :1~#65535 - 93 PLEASE DO .2 <- :2~#65535 - 94 DO (1009) NEXT - 95 DO .5 <- .3 - 96 PLEASE DO .6 <- .4 - 97 DO .1 <- :1~'#65280\*(ct#65280' - 98 DO .2 <- :2~'#65280\*(ct#65280' - 99 DO (1009) NEXT - 100 DO .1 <- .3 - 101 PLEASE DO (1503) NEXT - 102 DO .6 <- .4 - 103 DO .2 <- #1 - 104 DO (1009) NEXT - 105 DO .1 <- .3 - 106 DO (1501) NEXT - 107 (1504) PLEASE RESUME .6 - 108 (1503) DO (1504) NEXT - 109 (1501) DO .2 <- .5 - 110 DO .5 <- '\*(vb"'&.6\*(ct.4'~#1"\*(ct#2'~#3 - 111 DO (1505) NEXT - 112 (1506) DO (1502) NEXT - 113 PLEASE DO (1999) NEXT - 114 (1505) DO (1001) NEXT - 115 (1502) DO :4 <- .5 - 116 DO (1520) NEXT - 117 DO :3 <- :1 - 118 PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 - 119 DO REINSTATE (1502) - 120 DO REINSTATE (1506) - 121 PLEASE RESUME #3 - 122 (1510) DO STASH :1 + :2 + :4 - 123 DO :1 <- "'\*(vb":2~'#65535\*(ct#0'"\*(ct#65535' - ~'#0\*(ct#65535'"\*(ct"'\*(vb":2~'#0\*(ct#65535' - "\*(ct#65535'~'#0\*(ct#65535'" - 124 DO :2 <- #1 - 125 DO (1509) NEXT - 126 PLEASE RETRIEVE :1 - 127 DO :2 <- :3 - 128 PLEASE DO (1509) NEXT - 129 DO RETRIEVE :2 + :4 - 130 PLEASE RESUME #1 - 131 (1520) PLEASE STASH .3 + .4 - 132 DO .3 <- .1~#43690 - 133 DO (1525) NEXT - 134 PLEASE DO .4 <- 'V.3\*(ct".2~#43690"'~'#0\*(ct#65535' - 135 DO .3 <- .1~#21845 - 136 PLEASE DO (1525) NEXT - 137 DO :1 <- .4\*(ct"'V.3\*(ct".2~#21845"'~'#0\*(ct#65535'" - 138 PLEASE RETRIEVE .3 + .4 - 139 DO RESUME #1 - 140 (1525) DO .3 <- '"'"'"!3\*(ct#0'~'#32767\*(ct#1'"\*(ct#0' - ~'#32767\*(ct#1'"\*(ct#0'~'#16383\*(ct#3'"\*(ct#0' - ~'#4095\*(ct#15' - 141 PLEASE RESUME #1 - 142 (1530) DO STASH :2 + :3 + .3 + .5 - 143 DO :1 <- #0 - 144 DO :2 <- .2 - 145 DO .3 <- #1 - 146 DO (1535) NEXT - 147 (1535) PLEASE FORGET #1 - 148 DO .5 <- "\*(vb!1~.3'\*(ct#1"~#3 - 149 DO (1531) NEXT - 150 DO (1500) NEXT - 151 DO :1 <- :3 - 152 PLEASE DO (1533) NEXT - 153 (1531) PLEASE DO (1001) NEXT - 154 (1533) DO FORGET #1 - 155 DO .3 <- !3\*(ct#0'~'#32767\*(ct#1' - 156 DO :2 <- ":2~'#0\*(ct#65535'"\*(ct"'":2~'#32767 - \*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" - 157 PLEASE DO .5 <- "\*(vb!3~.3'\*(ct#1"~#3 - 158 DO (1532) NEXT - 159 DO (1535) NEXT - 160 (1532) DO (1001) NEXT - 161 PLEASE RETRIEVE :2 + :3 + .3 + .5 - 162 DO RESUME #2 - 163 (1540) PLEASE ABSTAIN FROM (1541) - 164 DO ABSTAIN FROM (1542) - 165 (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 - 166 DO .1 <- :1~#65535 - 167 PLEASE DO .2 <- :2~'#65280\*(ct#65280' - 168 DO .5 <- :1~'#65280\*(ct#65280' - 169 DO (1530) NEXT - 170 DO :3 <- :1 - 171 DO .2 <- :2~#65535 - 172 PLEASE DO (1530) NEXT - 173 DO :5 <- :1 - 174 DO .1 <- .5 - 175 DO (1530) NEXT - 176 DO :4 <- :1 - 177 PLEASE DO :1 <- ":3~'#65280\*(ct#65280'" - \*(ct":4~'#65280\*(ct#65280'" - 178 DO .5 <- ':1~:1'~#1 - 179 DO .2 <- :2~'#65280\*(ct#65280' - 180 DO (1530) NEXT - 181 PLEASE DO .5 <- '"':1~:1'~#1"\*(ct.5'~#3 - 182 DO .1 <- :3~#65535 - 183 DO .2 <- #0 - 184 DO (1520) NEXT - 185 PLEASE DO :2 <- :1 - 186 PLEASE DO .1 <- :4~#65535 - 187 DO (1520) NEXT - 188 DO (1509) NEXT - 189 DO .5 <- !5\*(ct":4~#3"'~#15 - 190 DO :1 <- :3 - 191 DO :2 <- :5 - 192 DO (1509) NEXT - 193 PLEASE DO .5 <- !5\*(ct":4~#3"'~#172 - 194 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 - 195 PLEASE RETRIEVE :4 - 196 (1541) DO :4 <- .5 - 197 DO (1543) NEXT - 198 (1542) DO (1544) NEXT - 199 PLEASE DO (1999) NEXT - 200 (1543) DO (1001) NEXT - 201 (1544) DO REINSTATE (1541) - 202 PLEASE REINSTATE (1542) - 203 PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 - 204 DO RESUME #2 - 205 (1550) DO STASH :1 + :4 + :5 + .5 - 206 DO :3 <- #0 - 207 DO .5 <- '\*(vb"':2~:2'~#1"\*(ct#1'~#3 - 208 PLEASE DO (1551) NEXT - 209 DO :4 <- #1 - 210 PLEASE DO (1553) NEXT - 211 (1553) DO FORGET #1 - 212 DO .5 <- '\*(vb":2~'#32768\*(ct#0'"\*(ct#2'~#3 - 213 DO (1552) NEXT - 214 DO :2 <- ":2~'#0\*(ct#65535'"\*(ct"'":2~'#32767 - \*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" - 215 PLEASE DO :4 <- ":4~'#0\*(ct#65535'"\*(ct"'":4 - ~'#32767\*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" - 216 DO (1553) NEXT - 217 (1552) DO (1001) NEXT - 218 (1556) PLEASE FORGET #1 - 219 DO :5 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct":2 - ~'#65535\*(ct#0'"'~'#0\*(ct#65535'"\*(ct"' - \*(vb":1~'#0\*(ct#65535'"\*(ct":2~'#0\*(ct - #65535'"'~'#0\*(ct#65535'" - 220 DO .5 <- '\*(vb"'&"':2~:5'~'"'\*(vb"'\*(vb":5~:5 - "~"#65535\*(ct#65535"'~'#65535\*(ct#0'"\*(ct - #32768'~'#0\*(ct#65535'"\*(ct"'\*(vb":5~:5" - ~"#65535\*(ct#65535"'~'#0\*(ct#65535'"'"\*(ct"' - :5~:5'~#1"'~#1"\*(ct#2'~#3 - 221 DO (1554) NEXT - 222 DO :5 <- :3 - 223 DO (1510) NEXT - 224 PLEASE DO :1 <- :3 - 225 DO :3 <- "'V":4~'#65535\*(ct#0'"\*(ct":5~'#65535 - \*(ct#0'"'~'#0\*(ct#65535'"\*(ct"'V":4~'#0 - \*(ct#65535'"\*(ct":5~'#0\*(ct#65535'"'~'#0 - \*(ct#65535'" - 226 DO (1555) NEXT - 227 (1554) PLEASE DO (1001) NEXT - 228 (1555) DO FORGET #1 - 229 DO .5 <- "\*(vb':4~#1'\*(ct#2"~#3 - 230 DO (1551) NEXT - 231 DO :2 <- ":2~'#0\*(ct#65534'"\*(ct":2~'#65535\*(ct#0'" - 232 DO :4 <- ":4~'#0\*(ct#65534'"\*(ct":4~'#65535\*(ct#0'" - 233 PLEASE DO (1556) NEXT - 234 (1551) DO (1001) NEXT - 235 PLEASE RETRIEVE :1 + :4 + :5 + .5 - 236 PLEASE RESUME #2 - 237 (1900) DO STASH .2 + .3 + .5 - 238 DO .1 <- #0 - 239 DO .2 <- #1 - 240 PLEASE DO (1901) NEXT - 241 (1901) DO FORGET #1 - 242 DO %50 .1 <- 'V.1\*(ct.2'~'#0\*(ct#65535' - 243 DO .2 <- !2\*(ct#0'~'#32767\*(ct#1' - 244 PLEASE DO .5 <- "\*(vb!2~.2'\*(ct#1"~#3 - 245 DO (1902) NEXT - 246 DO (1901) NEXT - 247 (1902) DO (1001) NEXT - 248 DO RETRIEVE .2 + .3 + .5 - 249 PLEASE RESUME #2 - 250 (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - 251 DO .3 <- #65524 - 252 DO :1 <- #6 - 253 DO (1911) NEXT -* 254 PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE - 255 (1912) DO (1001) NEXT - 256 (1911) DO FORGET #1 - 257 PLEASE DO (1900) NEXT - 258 DO :2 <- .1 - 259 DO (1500) NEXT - 260 PLEASE DO :1 <- :3 - 261 DO .1 <- .3 - 262 DO (1020) NEXT - 263 PLEASE DO .3 <- .1 - 264 DO .5 <- '\*(vb"!3~.3'~#1"\*(ct#2'~#3 - 265 DO (1912) NEXT - 266 DO .1 <- #12 - 267 PLEASE DO (1050) NEXT - 268 DO RETRIEVE .1 - 269 DO (1530) NEXT - 270 DO :2 <- #32768 - 271 DO (1500) NEXT - 272 PLEASE DO .2 <- :3~'#65280\*(ct#65280' - 273 PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - 274 DO RESUME #1 -.cs R -.DE -.bp -.H 2 "Programming Suggestions" -.P -For the novice INTERCAL programmer, we provide here a list of suggested -INTERCAL programming projects: -.P -Write an integer exponentiation subroutine. :1 <- .1 raised to the .2 power. -.P -Write a double-precision sorting subroutine. Given 32-bit array ;1 of size -:1, sort the contents into numerically increasing order, leaving the results -in ;1. -.P -Generate a table of prime numbers. -.P -Put together a floating-point library, using 32-bit variables to represent -floating-point numbers (let the upper half be the mantissa and the lower -half be the characteristic). The library should be capable of performing -floating-point addition, subtraction, multiplication, and division, as well -as the natural logarithm function. -.P -Program a Fast Fourier Transform (FFT). This project would probably entail -the writing of the floating-point library as well as sine and cosine functions. -.P -Calculate, to :1 places, the value of pi. -.if '\*c'y' \{\ -.P -(Working programs for each of these projects are included in the -C-INTERCAL distribution's pit directory of sample code.) \} -.bp -.H 1 "ERROR MESSAGES" -.if '\*c'y' \{\ -.DS I F -Alice felt dreadfully puzzled. The Hatter's remark seemed to her to -have no sort of meaning in it, and yet it was certainly English. "I -don't quite understand you," she said, as politely as she could. -.DE \} -.SETR error_messages -.P -Due to INTERCAL's implementation of comment lines (see section 4.5), most -error messages are produced during execution instead of during compilation. -All errors except those not causing immediate termination of program execution -are treated as fatal. -.H 2 "Format" -.P -All error messages appear in the following form: -.DS L - ICLnnnI (error message) - ON THE WAY TO STATEMENT nnnn - CORRECT SOURCE AND RESUBMIT -.DE -The message varies depending upon the error involved. For undecodable -statements the message is the statement itself. The second line tells -which statement would have been executed next had the error not occurred. -Note that if the error is due to 80 attempted levels of NEXTing, the -statement which would have been executed next need not be anywhere near the -statement causing the error. -.H 2 "Messages" -.P -Brief descriptions of the different error types are listed below according -to message number. -.BL -.LI 000 -An undecodable statement has been encountered in the course of -execution. Note that keypunching errors can be slightly disastrous, -since if 'FORGET' were misspelled F-O-R-G-E-R, the results would -probably not be those desired. Extreme misspellings may have even -more surprising consequences. For example, misspelling 'FORGET' -R-E-S-U-M-E could have drastic results. -.LI 017 -An expression contains a syntax error. -.LI 079 -Improper use has been made of statement identifiers. -.LI 099 -Improper use has been made of statement identifiers. -.LI 123 -Program has attempted 80 levels of NEXTing. -.LI 129 -Program has attempted to transfer to a non-existent line label. -.LI 139 -An ABSTAIN or REINSTATE statement references a non-existent line label. -.LI 182 -A line label has been multiply defined. -.LI 197 -An invalid line label has been encountered. -.LI 200 -An expression involves an unidentified variable. -.LI 240 -An attempt has been made to give an array a dimension of zero. -.LI 241 -Invalid dimensioning information was supplied in defining or using -an array. -.LI 275 -A 32-bit value has been assigned to a 16-bit variable. -.LI 436 -A retrieval has been attempted for an unSTASHed value. -.LI 533 -A WRITE IN statement or interleave (\*(ct) operation has produced a -value requiring over 32 bits to represent. -.LI 562 -Insufficient data. -.LI 579 -Input data is invalid. -.LI 621 -The expression of a RESUME statement evaluated to #0. -.LI 632 -Program execution was terminated via a RESUME statement instead of -GIVE UP. -.LI 633 -Execution has passed beyond the last statement of the program. -.LI 774 -A compiler error has occurred (see section -.GETHN princeton -). -.LI 778 -.ie '\*c'n' \{\ -An unexplainable compiler error has occurred (see J. Lyon or D. Woods)\}. -.el An unexplainable compiler error has occurred. -.LE -.if '\*c'y' \{\ -.P -The following error codes are new in C-INTERCAL: -.BL -.LI 111 -You tried to use a C-INTERCAL extension with the `traditional' flag on. -.LI 127 -Can't find syslib.i file when it's needed for magical inclusion. -.LI 222 -Out of stash space, or attempt to stash an undeclared array. -.LI 333 -Too many variables. -.LI 444 -A COME FROM statement references a non-existent line label. -.LI 555 -More than one COME FROM references the same label. -.LI 666 -Too many source lines. -.LI 777 -No such source file. -.LI 888 -Can't open C output file. -.LI 999 -Can't open C skeleton file. -.LI 998 -Source file name with invalid extension (use .i or .[2-7]i). -.LI 997 -Illegal possession of a controlled unary operator. -.LE \} -.if '\*c'y' \{\ -.H 1 "The C-INTERCAL Compiler" -.if '\*c'y' \{\ -.DS I F -"And yet it was a very clever pudding to invent." -.P -"What did you mean it to be made of?" Alice asked, hoping to cheer him -up, for the poor Knight seemed quite low-spirited about it. -.P -"It began with blotting-paper," the Knight answered with a groan. -.P -"That wouldn't be very nice, I'm afraid --" -.P -"Not very nice \fIalone\fR," he interrupted, quite eagerly, "but -you've no idea what a difference it makes, mixing it with other -things -- such as gunpowder and sealing-wax." -.DE \} -.P -This section describes the use of ick, the C-INTERCAL -compiler. Information specific to the other known INTERCAL compilers -appears in the following sections. These sections are less useful, -since the other compilers are no longer available, but they are -retained to provide a sense of history, and because any information -regarding INTERCAL is really too scarce to discard. -.H 2 "Character Set" -.P -The C-INTERCAL compiler uses ASCII rather than EBCDIC. We follow the -Atari implementation (see section -.GETHN atari -) by (a) replacing the change sign (\*(ct) with -big money ($) as the mingle operator, and (b) replacing the -bookworm (\*(vb) symbol with what (?) as the XOR operator. -.P -Version 0.18 and later versions accept the Latin-1 (ISO 8859-1) -character set, which is a superset of ASCII. As a result, -0xA2 (\*(ct), 0xA3 (quid), and 0xA4 (zlotnik) are accepted as mingle -operators. -.P -Version 0.20 and later versions also accept UTF-8 as an alternative -to Latin-1. The above three currency operators will be accepted in -either Latin-1 or UTF-8 format. UTF-8 format is required if you -wish to use any of EURO-CURRENCY SIGN, COLON SIGN (that's Costa Rican dinero, -not the Intercal two-spot), -CRUZEIRO SIGN, FRENCH FRANC SIGN, LIRA SIGN, MILL SIGN, NAIRA SIGN, -PESETA SIGN, RUPEE SIGN, WON SIGN, NEW SHEQEL SIGN, DONG SIGN, EURO SIGN, -BENGALI RUPEE MARK, BENGALI RUPEE SIGN, or THAI CURRENCY SYMBOL BAHT. -(Isn't internationalization wonderful?) -Furthermore, you can use the Intercal character FOR ALL to represent -the what operator. -.H 2 "Usage and Compilation Options" -.P -To compile an INTERCAL program `foo.i' to executable code, just do - - ick foo.i - -There's a -c option that leaves the generated C code in place for -inspection (suppressing compilation to machine code), a -d option that -enables verbose parse reporting from the yacc/bison parser, a -t -option that requires strict INTERCAL-72 compliance (rejecting COME -FROM and the extensions for bases other than two), a -b option that -disables the INTERCAL-72 random-bug feature (error 774), and an -O option -that enables the (hah!) optimizer. Invoking ick -? prints a usage -message. -.P -Another compilation switch affects C-INTERCAL's runtime behavior. The `-C' -option forces output in "clockface" mode, for superstitious users who -believe writing "IV" upside-down offends IVPITER and would rather -see IIII. -.H 2 "Runtime Options" -.P -Every C-INTERCAL runtime also accepts certain options at runtime. -These include [+/-]help, [+/-]traditional, and [+/-]wimpmode. -The help option (with either + or -) triggers a 'usage' message. The -+traditional option is presently a no-op. -.P -Steve explains: "The wimpmode option is the most interesting. I found -myself always running my test programs with filters on both ends to -work around the \&'nifty' INTERCAL number representations. This was so -painful that I decided it would be \fIless\fR painful (and a lot less -code) if I added a 'wimp' option. With the +wimpmode option, the user -is subjected to a humiliating message about what a wimp he or she is -to use this mode, but after that is allowed to use conventional -numerical notation. While such a mode doubtless violates to some -extent the INTERCAL philosophy, the fact that an 'unbutcher' command -has been posted clearly indicates the need for it. Anyway ... if you -don't like it, don't use it ... the default is -wimpmode -(i.e. \fInot\fR wimp mode)." -.H 2 "PLEASE Politesse Checking" -.P -A feature of INTERCAL-72 not documented in the original manual was that it -required a certain level of politesse from the programmer. If fewer than -1/5th of the program statements included the PLEASE qualifier, the program -would be rejected as insufficiently polite. If more than 1/3rd of them -included PLEASE, the program would be rejected as excessively polite. -.P -This check has been implemented in C-INTERCAL. To assist programmers in -coping with it, the intercal.el mode included with the distribution randomly -expands "do " in entered source to "PLEASE DO" 1/4th of the time. -.H 2 "Localization: Ancient Roman" -Version 0.18 and later versions of C-Intercal have been -localized for Ancient Roman as well as English-speaking locales. -This means that Latin-language keywords are accepted as equivalents -for the English-based ones traditionally used. -See src/lexer.l for details, as we do not propose to break -Priscian's head (publicly expose our ignorance of Latin) here. \} -.if '\*c'y' \{\ -.\" This is the same text as the ATARI NOTES at the end of the manual. -.H 1 "The Atari Implementation" -.if '\*c'y' \{\ -.DS I F -"Perhaps it doesn't understand English," thought Alice. "I daresay -it's a French mouse, come over with William the Conqueror." (For, with -all her knowledge of history, Alice had no very clear notion how long -ago anything had happened.) -.DE \} -.SETR atari -.P -The Atari implementation of INTERCAL differs from the original Princeton -version primarily in the use of ASCII rather than EBCDIC. Since there is no -"change" sign (\*(ct) in ASCII, we have substituted the "big money" ($) as the -mingle operator. We feel that this correctly represents the increasing cost -of software in relation to hardware. (Consider that in 1970 one could get -RUNOFF for free, to run on a $20K machine, whereas today a not quite as -powerful formatter costs $99 and runs on a $75 machine.) We also feel that -there should be no defensible contention that INTERCAL has any sense. -Also, since overpunches are difficult to read on the average VDT, the -exclusive-or operator may be written ?. This correctly expresses the -average person's reaction on first encountering exclusive-or, especially on -a PDP-11. Note that in both of these cases, the over-punched symbol may -also be used if one is masochistic, or concerned with portability to the -Princeton compiler. The correct over-punch for "change" is "c/" -and the correct over-punch for \*(vb is "V-". These codes will be -properly printed if you have a proper printer, and the corresponding EBCDIC -code will be produced by the /IBM option on the LIST command. \} -.if '\*c'n' \{\ -.H 1 "JCL" -.SETR princeton -.P -The information contained in the following section applies -only to the Princeton compiler, run under OS/360. -.H 2 "The Princeton Compiler" \} -.if '\*c'y' \{\ -.H 1 "The Princeton Compiler" -.DS I F -"My name is Alice, so please your Majesty," said Alice very politely; -but she added, to herself, "Why, they're only a pack of cards, after -all. I needn't be afraid of them!" -.DE \} -.SETR princeton -.P -The Princeton compiler, written in SPITBOL (a variant of -SNOBOL), performs the compilation in two stages. First the -INTERCAL source is converted into SPITBOL source, then the -latter is compiled and executed. -.P -It should be noted that the Princeton compiler fails to -properly interpret certain multiply-subscripted expressions, -such as: -.DS - ",1SUB",2SUB#1"#2" -.DE -.P -This is not a "bug". Being documented, it is merely a -"restriction". Such cases may be resolved by alternating -sparks and ears in various levels of expression nesting: -.DS - ",1SUB',2SUB#1'#2" -.DE -which is advisable in any case, since INTERCAL expressions -are unreadable enough as is. -.P -Since there is currently no catalogued procedure for -invoking the compiler, the user must include the in-line -.\" CORRECTION: -.\" "in Figure 3" was "on the following page" -procedure shown in Figure 3 in his job before the -compilation step. Copies of this in-line procedure may be -obtained at any keypunch if the proper keys are struck. -.P -The compiler is then executed in the usual manner: -.DS L - - // EXEC INTERCAL[,PARM='parameters'] - //COMPILE.SYSIN DD * - {INTERCAL source deck} - /* - //EXECUTE.SYSWRITE DD * - {input data} - /* - -.DE -The various parameters are described following the in-line -procedure. At most one parameter from each set may apply to -a given compilation; if more than one are specified, the -results are undefined, and may vary depending upon the -particular set of options. The default parameters are -.if n \{\ -underlined.\} -.if t \{\ -italicized.\} -.\" CORRECTION: -.\" In the original, the footnote was on the wrong line (one above). -.DS L - //INTERCAL PROC - //COMPILE EXEC PGM=INTERCAL - //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR - // DD DSN=SYS1.FORTLIB,DISP=SHR - //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) - //SYSPUNCH DD DUMMY - //SCRATCH DD DSN=&COMPSET,UNIT=SYSDA,SPACE=(CYL,(3,1)),DISP=(,PASS) - //EXECUTE EXEC PGM=EXECUTE,COND=(4,LT) - //SOURCES DD DSN=U.INTERCAL.SOURCES,DISP=SHR \*F - //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR - // DD DSN=SYS5.SPITLIB,DISP=SHR - // DD DSN=SYS1.FORTLIB,DISP=SHR - //SYSIN DD DSN=&COMPSET,DISP=(OLD,DELETE) - //SYSOBJ DD SYSOUT=B,DCB=(BLKSIZE=80,LRECL=80,RECFM=F) - //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) - //SYSPUNCH DD DUMMY - // PEND -.DE -.FS -Pending acquisition of SPITBOL release 3.0, the SOURCES -DD card must be replaced by the five cards: -.DS L - //NOOPTPFX DD DSN=U.INTERCAL.SOURCES(NOOPTPFX),DISP=SHR - //NOOPTSUB DD DSN=U.INTERCAL.SOURCES(NOOPTSUB),DISP=SHR - //OPTPFX DD DSN=U.INTERCAL.SOURCES(OPTPFX),DISP=SHR - //OPTSUB DD DSN=U.INTERCAL.SOURCES(OPTSUB),DISP=SHR - //PRELIM DD DSN=U.INTERCAL.SOURCES(PRELIM),DISP=SHR -.DE -.FE -.ce 1 -Figure 3. Inline procedure for using INTERCAL. -.P -.LB 5 0 " " 0 * 0 0 -.LI "\fIOPT\fR" -.LI "NOOPT" -.LI " " -In the default mode, the compiler will print a -list of all options in effect, including the -defaults for unspecified parameter groups and the -effective option for those sets where one was -specified. If NOOPT is requested, it causes the -default mode to be assumed. - -.LI "\fIOPTSUB\fR" -.LI "NOOPTSUB" -.LI "NOSUB" -.LI " " -Unless 'NOOPTSUB' is requested, the System Library -is optimized, resulting in much more rapid -processing of function calls. Specifying NOOPTSUB -causes the non-optimized INTERCAL code shown in section -.GETHN syslib - to be used, whereas NOSUB requests -that the System Library be omitted altogether. - -.LI IAMBIC -.LI "\fIPROSE\fR" -.LI " " -The IAMBIC parameter permits the programmer to use -poetic license and thus write in verse. If the -reader does not believe it possible to write verse -in INTERCAL, he should send the authors a stamped, -self-addressed envelope, along with any INTERCAL -program, and they will provide one which is verse. - -.LI "\fIFORMAT\fR" -.LI NOFORMAT -.LI " " -In FORMAT mode, each statement printed is put on a -separate line (or lines). In NOFORMAT mode, the -free-format source is printed exactly as input. -In this latter case, statement numbers are -provided only for the first statement on a card, -and they may be only approximate. Also, -unrecognizable statements are not flagged. - -.LI SEQ -.LI "\fINOSEQ\fR" -.LI " " -If the source deck has sequence numbers in columns -73 through 80, specifying 'SEQ' will cause them to -be ignored. - -.LI "SOURCE" -.LI "\fINOSOURCE\fR" -.LI " " -If NOSOURCE is selected, all source listing is -suppressed. - -.LI LIST -.LI "\fINOLIST\fR" -.LI " " -If LIST is specified, the compiler will provide a -list of statement numbers catalogued according to -type of statement. The compiler uses this table -to perform abstentions by gerund. - -.LI "WIDTH=nn" -.LI " " -This sets the width (in number of characters) of -the output line for FORMAT mode output. The -default is -.B 132. - -.LI "CODE" -.LI "\fINOCODE\fR" -.LI " " -Include 'CODE' in the parameter list to obtain a -listing of the SPITBOL code produced for each -INTERCAL statement. - -.LI "LINES=nn" -.LI " " -This determines the number of lines per page, -during both compilation and execution. The -default is -.B 60. - -.LI DECK -.LI "\fINODECK\fR" -.LI " " -Selecting 'DECK' will cause the compiler to punch -out a SPITBOL object deck which may then be run -without reinvoking the INTERCAL (or SPITBOL) -compiler. - -.LI "\fIKIDDING\fR" -.LI NOKIDDING -.LI " " -Select NOKIDDING to eliminate the snide remarks -which ordinarily accompany INTERCAL error -messages. - -.LI "\fIGO\fR" -.LI NOGO -.LI " " -Specifying 'NOGO' will cause the program to be -compiled but not executed. EXECUTE/NOEXECUTE may -be substituted for GO/NOGO, but this will result -in an error, and GO will be assumed. - -.LI "\fIBUG\fR" -.LI NOBUG -.LI " " -Under the default, there is a fixed probability of -a fatal compiler bug being worked at random into -the program being compiled. Encountering this bug -during execution results in error message 774 (see -section -.GETHN error_messages -). This probability is reduced to zero -under 'NOBUG'. This does not affect the -probability (presumably negligible) of error -message 778. -.LE -.H 2 "Other INTERCAL Compilers" -.P -There are no other INTERCAL compilers. \*F -.FS -This assertion in the INTERCAL-72 manual was blatantly contradicted by -some notes on an Atari implementation included at the end of the manual. -So, you expect compiler manuals to be consistent? -.FE -.ds App TONSIL -.APP "A\*F" "" -.if '\*c'y' \{\ -.DS I F -"Of course they answer to their names?" the Gnat remarked carelessly. -.P -"I never knew them to do it." -.P -"What's the use of their having names," the Gnat said, "if they wo'n't -answer to them?" -.P -"No use to \fIthem\fR," said Alice; "but it's useful to the people -that name them, I suppose. If not, why do things have names at all?" -.P -"I ca'n't say," the Gnat replied. "Further on, in the wood down there, -they've got no names -- however, go on with your list...." -.DE \} -.P -The Official INTERCAL Character Set -.FS -Since all other reference manuals have Appendices, it was decided that -the INTERCAL manual should contain some other type of removable organ. -.FE -.ps \n[@ps] -.\".nr * \n*+1 -.nr PG \n%+1 -.P -Tabulated on page \n(PG are all the characters used in INTERCAL, excepting -letters and digits, along with their names and interpretations. Also -included are several characters not used in INTERCAL, which are presented -for completeness and to allow for future expansion. -.\" All we're doing here is evaluating \*F and throwing it away -.fi \*F -.FS -This footnote intentionally unreferenced. -.FE -.ds CH - % - -.bp -.\".nr * \n*-1 -.ps \n[@ps] -.ie '\*c'n' \{\ -.TS -box; -c c c -l l l. -Character Name Use (if any) -\&. spot identify 16-bit variable -: two-spot identify 32-bit variable -, tail identify 16-bit array -; hybrid identify 32-bit array -# mesh identify constant -\&= half-mesh -\' spark grouper -` backspark -! wow equivalent to spark-spot -? what \fIunary exlusive OR (ASCII)\fR -" rabbit-ears grouper -\o'".' rabbit equivalent to ears-spot -| spike -% double-oh-seven percentage qualifier -\- worm used with angles -< angle used with worms -> right angle -( wax precedes line label -) wane follows line label -[ U turn -] U turn back -{ embrace -} bracelet -* splat flags invalid statements -& ampersand \*F unary logical AND -V V (or book) unary logical OR -\*(vb bookworm (or universal qualifier) unary exclusive OR -$ big money \fIbinary mingle (ASCII)\fR -\*(ct change binary mingle -~ sqiggle binary select -\&_ flat worm -\*(ov overline indicates "times 1000" -+ intersection separates list items -/ slat -\e backslat -@ whirlpool -\*(no hookworm -^ shark (or simply sharkfin) -\o"#*\(sq" blotch -.if '\*c'y' \{\ -\*(de bunghole -\*(rg name grabber -\*(mu andrew cross -\*(di norwegian minus -\*(co text grabber -\*(sc swash -\*(*m microscope -\*(+- interworm -\*(no half turn -0xA3 quid binary mingle -0xA4 zlotnik binary mingle -\} -.TE \} -.el \{\ -.TS -box; -c c c -l l l. -Character Name Use (if any) -\&. spot identify 16-bit variable -: two-spot identify 32-bit variable -, tail identify 16-bit array -; hybrid identify 32-bit array -# mesh identify constant -\&= half-mesh -\' spark grouper -` backspark -! wow equivalent to spark-spot -? what unary logical XOR -" rabbit-ears grouper -\o'".' rabbit equivalent to ears-spot -| spike -% double-oh-seven percentage qualifier -\- worm used with angles -< angle used with worms -> right angle -( wax precedes line label -) wane follows line label -[ U turn -] U turn back -{ embrace -} bracelet -* splat flags invalid statements -& ampersand \*F unary logical AND -V V (or book) unary logical OR -\*(vb bookworm (universal qualifier) unary logical XOR (INTERCAL-72) -$ big money binary mingle -\*(ct change binary mingle (INTERCAL-72) -~ sqiggle binary select -\&_ flat worm -\*(ov overline indicates "times 1000" -+ intersection separates list items -/ slat -\e backslat -@ whirlpool unary logical BUT (TriINTERCAL) -\*(no hookworm -^ shark (or simply sharkfin) unary logical XOR (TriINTERCAL) -\o"#*\(sq" blotch -.if '\*c'y' \{\ -\*(de bunghole -\*(rg name grabber -\*(mu andrew cross -\*(di norwegian minus -\*(co text grabber -\*(sc swash -\*(*m microscope -\*(+- interworm -\*(no half turn -0xA3 quid binary mingle -0xA4 zlotnik binary mingle -\} -.TE \} -.ce 1 -Table 2 (top view). INTERCAL character set. -.FS -Got any better ideas? -.FE -.ps \n[@ps] -.if '\*c'n' \{\ -.APP "B" "NOTES ON THE ATARI IMPLEMENTATION" -.P -The Atari implementation of INTERCAL differs from the original Princeton -.ds CH INTERCAL -version primarily in the use of ASCII rather than EBCDIC. Since there is no -"change" sign (\*(ct) in ASCII, we have substituted the "big money" ($) as the -mingle operator. We feel that this correctly represents the increasing cost -of software in relation to hardware. (Consider that in 1970 one could get -RUNOFF for free, to run on a $20K machine, whereas today a not quite as -powerful formatter costs $99 and runs on a $75 machine.) We also feel that -there should be no defensible contention that INTERCAL has any sense. -Also, since overpunches are difficult to read on the average VDT, the -exclusive-or operator may be written ?. This correctly expresses the -average person's reaction on first encountering exclusive-or, especially on -a PDP-11. Note that in both of these cases, the over-punched symbol may -also be used if one is masochistic, or concerned with portability to the -Princeton compiler. The correct over-punch for "change" is "c/" -and the correct over-punch for \*(vb is "V-". These codes will be -properly printed if you have a proper printer, and the corresponding EBCDIC -code will be produced by the /IBM option on the LIST command. \} +.\" Note: This is both a current manual and an archeological exhibit. +.\" All revisions must be properly conditioned on the c string so that +.\" it's still possible to format the INTERCAL-72 manual. Only outright +.\" errors should be corrected -- each of these is marked with CORRECTION +.\" and an explanatory comment. +.\" +.\" This document is free; 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 document is distributed in the hope that it will be amusing, +.\" 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 document; if not, write to the Free Software +.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +.ND +.ds vb V\v'-0.2'\h'-0.6'\-\v'0.2' +.if n .ds es \o"O|" +.if t .ds es \(es +.if n .ds ct \o"c/" +.if t .ds ct \(ct +.if n .ds no \o"-'" +.if t .ds no \(no +.if n .ds ov - +.if t .ds ov \(rn +.INITR intercal.refs +.TL +THE INTERCAL PROGRAMMING LANGUAGE +.br +.if '\*c'y' REVISED REFERENCE MANUAL +.if '!\*c'n' REFERENCE MANUAL + +.AU "Donald R. Woods" +.AF "" +.AU "and" +.AF "" +.AU "James M. Lyon" +.AF "" +.if '\*c'y' \{\ +.AU "" +.AU "C-INTERCAL revisions:" +.AU "Louis Howell" +.AF "" +.AU "and" +.AF "" +.AU "Eric S. Raymond" \} +.AF "" +.AST "" +.AS 2 +.ce 2 +\fICopyright (C) 1973 by Donald R. Woods +and James M. Lyon\fR +.if '\*c'y' \{\ +.ce 2 +\fICopyright (C) 1996, 1997 by Eric S. Raymond +Redistribution encouraged under GPL\} +.sp +.ce 1 +(This version distributed with C-INTERCAL 0.18) +.AE +.MT 4 +.nr % 0 +.nr Hs 5 +.nr Ej 1 +.bp +.H 1 "INTRODUCTION" +.if '\*c'y' \{\ +.DS I F +"But I don't want to go among mad people," Alice remarked. +.P +"Oh, you ca'n't help that," said the Cat: "We're all mad here. I'm +mad. You're mad." +.P +"How do you know I'm mad?" said Alice. +.P +"You must be," said the Cat, "or you wouldn't have come here." +.DE \} +.P +The names you are about to ignore are true. However, the story has been changed +significantly. Any resemblance of the programming language portrayed here +to other programming languages, living or dead, is purely coincidental. +.H 2 "Origin and Purpose" +.P +The INTERCAL programming language was designed the morning of May 26, 1972 +by Donald R. Woods and James M. Lyon, at Princeton University. Exactly when +in the morning will become apparent in the course of this manual. +.ie '\*c'y' \{\ +.P +Eighteen years later (give or take a few months) Eric S. Raymond perpetrated +a UNIX-hosted INTERCAL compiler as a weekend hack. The C-INTERCAL +implementation has since been maintained and extended by an international +community of technomasochists, including Louis Howell, Steve Swales, +Michael Ernst, and Brian Raiter. +.P +(There was evidently an Atari implementation sometime between these +two; notes on it got appended to the INTERCAL-72 manual. The culprits +have sensibly declined to identify themselves.) +.P +INTERCAL \} +.el It +was inspired by one ambition: to have a compiler language which has nothing at +all in common with any other major language. By 'major' was meant anything +with which the authors were at all familiar, e.g., FORTRAN, BASIC, COBOL, +ALGOL, SNOBOL, SPITBOL, FOCAL, SOLVE, TEACH, APL, LISP, and PL/I. For the +most part, INTERCAL has remained true to this goal, sharing only the basic +elements such as variables, arrays, and the ability to do I/O, and eschewing +all conventional operations other than the assignment statement (FORTRAN +"="). +.H 2 "Acronym" +.P +The full name of the compiler is "Compiler Language With No Pronounceable +Acronym", which is, for obvious reasons, abbreviated "INTERCAL". +.H 2 "Acknowledgments" +.P +The authors are deeply indebted to Eric M. Van and Daniel J. Warmenhoven, +without whose unwitting assistance this manual would still have been +possible. +.H 1 "FUNDAMENTAL CONCEPTS" +.if '\*c'y' \{\ +.DS I F +"There's nothing like eating hay when you're faint," the White King +remarked to Alice, as he munched away. +.P +"I should think throwing cold water over you would be better," Alice +suggested: "-- or some sal-volatile." +.P +"I didn't say there was nothing \fIbetter\fR," the King replied. "I +said there was nothing \fIlike\fR it." Which Alice did not venture to +deny. +.DE \} +.P +In this section an attempt is made to describe how and why INTERCAL may be +used; i.e., what it is like and what it is good for. +.H 2 "Sample Program" +.SETR example1 +.P +Shown below is a relatively simple INTERCAL program which will read in 32-bit +unsigned integers, treat them as signed, 2's-complement numbers, and print out +their absolute values. The program exits if the absolute value is zero. Note +in particular the inversion routine (statements 6 through 14), which could +be greatly simplified if the subroutine library (see section +.GETHN sublib +) were used. +.P +A more detailed analysis of a program is made in section +.GETHN proghints + of this manual. +.\" Note: there was an error in line 15 in the original manual; +.\" the operands of the third \(ct were swapped. + +.DS L +.cs R 24 + DO (5) NEXT + (5) DO FORGET #1 + PLEASE WRITE IN :1 + DO .1 <- '\*(vb":1~'#32768\*(ct#0'"\*(ct#1'~#3 + DO (1) NEXT + DO :1 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct#65535' + ~'#0\*(ct#65535'"\*(ct"'\*(vb":1~'#0\*(ct#65535'" + \*(ct#65535'~'#0\*(ct#65535'" + DO :2 <- #1 + PLEASE DO (4) NEXT + (4) DO FORGET #1 + DO .1 <- "\*(vb':1~:2'\*(ct#1"~#3 + DO :1 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct":2~'#65535 + \*(ct#0'"'~'#0\*(ct#65535'"\*(ct"'\*(vb":1~'#0 + \*(ct#65535'"\*(ct":2~'#0\*(ct#65535'"'~'#0\*(ct#65535'" + DO (1) NEXT + DO :2 <- ":2~'#0\*(ct#65535'" + \*(ct"'":2~'#65535\*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" + DO (4) NEXT + (2) DO RESUME .1 + (1) PLEASE DO (2) NEXT + PLEASE FORGET #1 + DO READ OUT :1 + PLEASE DO .1 <- '\*(vb"':1~:1'~#1"\*(ct#1'~#3 + DO (3) NEXT + PLEASE DO (5) NEXT + (3) DO (2) NEXT + PLEASE GIVE UP +.cs R +.DE +.H 2 "Uses for INTERCAL" +.P +INTERCAL's main advantage over other programming languages is its strict +simplicity. It has few capabilities, and thus there are few restrictions to +be kept in mind. Since it is an exceedingly easy language to learn, one +might expect it would be a good language for initiating novice programmers. +Perhaps surprising, then, is the fact that it would be more likely to +initiate a novice into a search for another line of work. As it turns out, +INTERCAL is more useful (which isn't saying much) as a challenge to +professional programmers. Those who doubt this need only refer back to the +sample program in section +.GETHN example1 +.\" CORRECTION: +.\" The original manual counted 22 statements, incorrectly. +\&. This 23-statement program took somewhere +from 15 to 30 minutes to write, whereas the same objectives can be achieved +by single-statement programs in either SNOBOL; +.DS L + PLEASE INPUT POS(0) ('-' ! '') + + (SPAN('0123456789') $ OUTPUT) + + *NE(OUTPUT) :S(PLEASE)F(END) +.DE +or APL; +.DS L + [1] \(->0\(!=\(sq\(<-\(or\(sq +.DE +Admittedly, neither of these is likely to appear more intelligible to +anyone unfamiliar with the languages involved, but they took roughly 60 +seconds and 15 seconds, respectively, to write. Such is the overwhelming +power of INTERCAL! +.P +The other major importance of INTERCAL lies in its seemingly inexhaustible +capacity for amazing one's fellow programmers, confounding programming shop +managers, winning friends, and influencing people. It is a well-known and +oft-demonstrated fact that a person whose work is incomprehensible is held +in high esteem. For example, if one were to state that the simplest way to +store a value of 65536 in a 32-bit INTERCAL variable is: +.DS L + DO :1 <- #0\*(ct#256 +.DE +any sensible programmer would say that that was absurd. Since this is +indeed the simplest method, the programmer would be made to look foolish in +front of his boss, who would of course happened to turn up, as bosses are +wont to do. The effect would be no less devastating for the programmer +having been correct. +.H 1 "DESCRIPTION" +.if '\*c'y' \{\ +.DS I F +"I quite agree with you," said the Duchess; "and the moral of that +is -- 'Be what you would seem to be' -- or, if you'd like it put more +simply -- 'Never imagine yourself not to be otherwise than what it might +appear to others that what you were or might have been was not +otherwise than what you had been would have appeared to them to be +otherwise." +.P +"I think I should understand that better," Alice said very politely, +"if I had it written down: but I ca'n't quite follow it as you say +it." +.P +"That's nothing to what I could say if I chose," the Duchess replied, +in a pleased tone. +.DE \} +.P +The examples of INTERCAL programming which have appeared in the preceding +sections of this manual have probably seemed highly esoteric to the reader +unfamiliar with the language. With the aim of making them more so, we +present here a description of INTERCAL. +.H 2 "Variables" +.P +INTERCAL allows only 2 different types of variables, the +.B "16-bit integer" +and the +.B "32-bit integer." +These are represented by a spot (.) or two-spot +(:), respectively, followed by any number between 1 and 65535, inclusive. +These variables may contain only non-negative numbers; thus they have the +respective ranges of values: 0 to 65535 and 0 to 4294967295. Note: .123 and +:123 are two distinct variables. On the other hand, .1 and .0001 are +identical. Furthermore, the latter may \fInot\fR be written as 1E-3. +.H 2 "Constants" +.P +.B Constants +are 16-bit values only and may range from 0 to 65535. They are +prefixed by a mesh (#). Caution! Under no circumstances confuse the mesh +with the interleave operator, except under confusing circumstances! +.H 2 "Arrays" +.P +.B Arrays +are represented by a tail (,) for 16-bit values, or a hybrid (;) for +32-bit values, followed by a number between 1 and 65535, inclusive. The +number is suffixed by the word SUB, followed by the subscripts, separated +optionally by spaces. Subscripts may be any expressions, including those +involving subscripted variables. This occasionally leads to ambiguous +constructions, which are resolved as discussed in section +.GETHN precedence +\&. Definition +of array dimensions will be discussed later in greater detail, since +discussing it in less detail would be difficult. As before, ,123 and ;123 +are distinct. In summary, .123, :123, #123, ,123, and ;123 are all +distinct. +.H 2 "Operators" +.P +INTERCAL recognizes 5 operators -- 2 binary and 3 unary \*F. Please be kind to +our operators: they may not be very intelligent, but they're all we've got. +In a sense, all 5 operators are binary, as they are all bit-oriented, but +it is not our purpose here to quibble about bits of trivia. +.if '\*c'y' \{\ +.FS +Other operators are also available with C-INTERCAL's non-standard +dialects; see section +.GETHN tri_intercal +\&. +.FE \} +.H 3 "Binary Operators" +.P +The binary operators are \fBinterleave\fR (also called \fBmingle\fR) +and \fBselect\fR, which +are represented by a change (\*(ct) and a sqiggle [sic] (~), respectively. +.if '\*c'y' \{\ +(In C-INTERCAL's ASCII environment, EBCDIC \*(ct is replaced by a big +money ($), but \*(ct can be used if encoded in Latin-1 as \e0xA2 +or UTF-8 as 0xC2A2.) \} +.P +The interleave operator takes two 16-bit values and produces a 32-bit result +by alternating the bits of the operands. Thus, #65535\*(ct#0 has the 32-bit +binary form 101010....10 or 2863311530 decimal, while #0\*(ct#65535 = +0101....01 binary = 1431655765 decimal, and #255\*(ct#255 is equivalent to +#65535. +.P +The select operator takes from the first operand whichever bits correspond +to 1's in the second operand, and packs these bits to the right in the result. +Both operands are automatically padded on the left with zeros to 32 bits +before the selection takes place, so the variable types are unrestricted. +If more than 16 bits are selected, the result is a 32-bit value, otherwise +it is a 16-bit value. For example, #179~#201 (binary value 10110011~11001001) +selects from the first argument the 8th, 7th, 4th, and 1st from last bits, +namely, 1001, which = 9. But #201~#179 selects from binary 11001001 the 8th, +6th, 5th, 2nd, and 1st from last bits, giving 10001 = 17. #179~#179 has the +value 31, while #201~#201 has the value 15. +.P +Perhaps a simpler way of understanding the operation of the select operator +.\" CORRECTION: +.\" "in Figure 1" was originally "on the following page (Figure 1)" +.\" We can't rely on the page boundaries any more. +would be to examine the logic diagram in Figure 1, which +performs the select operation upon two 8-bit values, A and B. The gates used +are Warmenhovian logic gates, which means the outputs have four possible +values: low, high, undefined (value of an uninitialized flip-flop), and +oscillating (output of a NOR gate with one input low and the other input +connected to the output). These values are represented symbolically +by '0', '1', '?', and '\*(es'. +Note in particular that, while NOT-0 is 1 and NOT-1 +is 0 as in two-valued logic, NOT-? is ? and NOT-\*(es is \*(es. The functions +of the various gates are listed in Table 1. +.if n \{\ +.P +[Warning: The following picture will be garbled or missing. +Get a better output device.] +.sp 1 \} +.PS +# The CIRCUITOUS DIAGRAM, Figure 1 of the INTERCAL manual. +# +# Transcribed to PIC by Eric S. Raymond from the paper original. +# The transcription is topologically correct but not geometrically perfect. +# +# I discovered late in the process that the gate spacing to gate width +# ratio should be 6/5, not 5/5. The only place the difference shows is +# in the zigzag part of the adventitious lead below gate 37, which is +# a bit narrower in this version than in the paper original. +# +# Minor liberties have been taken with the sizes of some features at the +# left and right sides to fit the diagram on a letter-sized page. The +# A/B input leads should really be a whole boxwidth wide, and the bus line +# rectangle was slightly wider and further right in the paper original. +# Also, there are only 15 "New York" terminals rather than 16, and in the +# original the bus terminal label texts were rotated 90 degrees clockwise. +# +# The whole diagram can be scaled horizontally or vertically by changing +# the boxwid and boxht variables. At default scale the values boxwid = +# 0.60 boxht = 0.525 reproduce the paper version most exactly; they get +# the gate grid and leads nearly perfect. +# +scale=6/5 # This is how we scale the whole thing to fit on 8.5x11 +boxwid = 0.60 +boxht = 0.525 +linewid = boxwid +lineht = boxht +movewid = boxwid +moveht = boxht + +# Offset of top and bottom pins from gate midline +define pinoffset {(2/3)} + +define warmengate { +# Draw a Warmenhovian gate box + [ + box invis; + line from last box .sw \ + to last box .nw \ + to 1/2 \ + to 1/2 \ + to 1/2 \ + to 1/2 \ + to last box .sw; + IN: last box .w; + UP: pinoffset + DN: pinoffset + OUT: last box .e; + "$1" at last box .center; + ] +} + +[ # Beginning of diagram object + +# Draw the gate array +copy thru % move to (($1-1) * movewid * 2, ($2-1) * moveht * 2); warmengate($3) % until "END" +0 1 6 +0 2 6 +0 3 1 +0 4 1 +0 5 1 +0 6 1 +0 7 1 +0 8 1 +0 9 1 +0 10 1 +END +copy thru % move to ((boxwid + movewid * 7 / 5) + ($1-2) * movewid * 2, ($2-1) * moveht * 2); warmengate($3) % until "END" +1 1 1 +1 2 2 +1 3 2 +1 4 2 +1 5 2 +1 6 2 +1 7 2 +1 8 2 +1 9 2 +1 10 2 +2 1 1 +2 2 7 +2 3 4 +2 4 3 +2 5 3 +2 6 3 +2 7 7 +2 8 3 +2 9 7 +2 10 3 +3 1 1 +3 2 3 +3 3 3 +3 4 4 +3 5 4 +3 6 3 +3 7 3 +3 8 3 +3 9 3 +3 10 3 +4 1 1 +4 2 4 +4 3 5 +4 4 5 +4 5 4 +4 6 5 +4 7 4 +4 8 3 +4 9 2 +4 10 1 +END + +# Draw bus line: +BUSLINE: box with .sw at 41st [].se + (boxwid/2, 0) \ + wid (boxwid / 2) \ + ht (50th [].n.y - 41st [] .s.y) +copy thru % move to $1 / 40 ; "$2" % until "END" +9 B +11 U +13 S +17 L +19 I +21 N +23 E +30 8 +END +define newyork { + line right boxwid/3 + box invis "" "TO" "NEW" "YORK" "" +} +define philly { + line right boxwid/3 + box invis "" "TO" "PHILA-" "DELPHIA" "" +} +for i = 0 to 14 do { + move to (i+1)/18 + newyork +} +move to (i+1)/18 +philly + +define dot {circle rad 0.03 filled 1} + +# Place a junction dot wherever we are +define junction % {dot at Here}; % + +# Draw inputs +define inwidth {boxwid*3/4} +define drawinputs { + line left inwidth from $1.UP; + "A" at last line .end - (0.1, 0) rjust; + "$2" at last line .end - (0.05, 0.1) rjust; + move to last line .center; A$2: junction + line left inwidth from $1.DN; + "B" at last line .end - (0.1, 0) rjust; + "$2" at last line .end - (0.05, 0.1) rjust; + move to last line .center; B$2: junction +} +drawinputs(3rd [],8) +drawinputs(4th [],7) +drawinputs(5th [],6) +drawinputs(6th [],5) +drawinputs(7th [],4) +drawinputs(8th [],3) +drawinputs(9rd [],2) +# Gate 10 inputs have to be done by hand + +define go {move to $1;} + +# Define `gate' to *refer* to nth gate +define gate {`$1'th []} + +# Go to specified pin of given gate +define pin {gate($1).$2} + +# We exploit the quantization of lead placements here +# Draw from left edge of box $1 quanta of inter-box horizontal distance +define left_mv {line left boxwid * $1 / 5;} +# Draw from right edge of box $1 quanta of inter-box horizontal distance +define right_mv {line right boxwid * $1 / 5;} +# Draw from top pin of box $1 quanta of inter-box vertical distance up +define up_mv {line up (boxht * (2 - pinoffset)) * $1 / 4;} +# Draw from bottom pin of box $1 quanta of inter-box vertical distance down +define dn_mv {line down (boxht * (2 - pinoffset)) * $1 / 4;} + +# Draw from here to given object, with directional constraint +define vert {line up ($1.y - Here.y);} +define horz {line right ($1.x - Here.x);} +define zig {vert($1) horz($1)} +define to_bus {line to (BUSLINE.w, Here)} + +define ground { + dn_mv(1) + [ + boxwid = boxwid * (3/4) + boxht = boxht / 3 + box invis + line from last box .ne to last box .nw + line from 1/3 to 1/3 + line from 2/3 to 2/3 + ] +} + +# Now all those connections +# Gate 1: +go(pin(1,OUT)) right_mv(3) CORNER:Here; zig(pin(12,DN)) +go(CORNER) vert(pin(1,UP)) \ + {junction horz(pin(11,UP))} \ + up_mv(2) junction + horz(gate(32).e) right_mv(3) junction + {zig(pin(43,IN))} + horz(gate(42).e) right_mv(1) junction + {to_bus} + vert(pin(43,UP)) up_mv(2) to_bus + +# Gate 2 +go(pin(2,OUT)) right_mv(2) zig(pin(12,UP)) +# Gate 3 +go(A8) up_mv(1) horz(gate(13).e) right_mv(3) zig(pin(23,IN)) +go(B8) dn_mv(1) horz(gate(13)) + right_mv(1) dn_mv(1) + horz(gate(23).e) right_mv(2) dn_mv(2) horz(pin(32,UP)) +go(pin(3,OUT)) right_mv(2) + vert(gate(3).UP) up_mv(3) + horz(gate(13).e) right_mv(2) + vert(gate(15,UP)) up_mv(4) #??? don't know why 4 is necessary + horz(gate(16).w) left_mv(1) + vert(gate(6).w) up_mv(4) + left_mv(2) zig(pin(7,OUT)) +# Gate 4 +go(A7) up_mv(1) horz(gate(14).e) right_mv(1) zig(pin(24,UP)) +go(B7) dn_mv(1) horz(gate(4)) + right_mv(1) dn_mv(1) + horz(gate(14).e) right_mv(3) + vert(pin(26,UP)) up_mv(1) + horz(gate(25)) up_mv(2) + horz(gate(25).e) right_mv(4) + vert(pin(38,UP)) up_mv(1) + horz(gate(48).e) right_mv(1) + vert(pin(47,DN)) dn_mv(1) + horz(gate(47).w) left_mv(3) + vert(gate(46).DN) dn_mv(2) right_mv(2) + vert(gate(45).DN) dn_mv(2) left_mv(3) + vert(gate(44).DN) right_mv(3) dn_mv(2) + horz(gate(33).w) left_mv(1) + vert(gate(33).DN) dn_mv(3) + horz(gate(32).e) up_mv(2) + horz(gate(42).e) dn_mv(2) line down boxwid/5 + to_bus +go(pin(4,OUT)) right_mv(3) junction + {zig(pin(13,UP))} + vert(pin(4,UP)) up_mv(3) junction + {right_mv(3) zig(pin(15,IN))} + left_mv(2) vert(pin(7,UP)) up_mv(3) + right_mv(3) zig(pin(19,DN)) +# Gate 5 +go(A6) up_mv(1) horz(gate(15).e) right_mv(1) vert(pin(15,UP)) junction + {horz(pin(25,UP))} + vert(pin(15,DN)) dn_mv(1) + horz(gate(25).e) right_mv(1) + zig(pin(34,UP)) +go(B6) dn_mv(2) horz(gate(25).e) dn_mv(1) right_mv(4) + vert(pin(24,DN)) dn_mv(1) + horz(gate(34).e) right_mv(1) + vert(pin(32,DN)) dn_mv(1) + right_mv(3) zig(pin(42,IN)) +go(pin(5,OUT)) right_mv(5) junction + {vert(pin(14,IN)) junction {horz(pin(14,IN))} zig(pin(13,IN)) } + vert(pin(17,DN)) junction {horz(pin(17,DN))} zig(pin(18,DN)) +# Gate 6 +go(A5) up_mv(1) horz(gate(16).e) right_mv(1) zig(pin(26,UP)) +go(B5) dn_mv(2) horz(gate(26).e) right_mv(3) zig(pin(34,IN)) +go(pin(6,OUT)) right_mv(4) junction + {horz(pin(16,IN))} + vert(pin(15,DN)) junction + {horz(pin(15,DN))} + vert(pin(14,DN)) junction + {horz(pin(14,DN))} + zig(pin(13,DN)) +# Gate 7 +go(A4) up_mv(1) horz(gate(27).e) right_mv(3) vert(pin(37,IN)) junction + {horz(pin(37,IN))} + vert(pin(37,DN)) dn_mv(2) right_mv(1) junction + {zig(pin(36,IN))} + horz(gate(37).e) right_mv(3) + zig(pin(45,IN)) +go(B4) dn_mv(2) horz(gate(17).e) right_mv(4) + vert(pin(26,DN)) dn_mv(1) + horz(gate(26).e) dn_mv(2) + right_mv(4) vert(pin(35,DN)) dn_mv(1) + horz(gate(35).e) right_mv(2) junction + {zig(pin(45,UP))} {zig(pin(44,UP))} +# Gate 8 +go(A3) up_mv(1) horz(gate(28).e) right_mv(1) zig(pin(38,UP)) +go(B3) dn_mv(2) horz(gate(28).e) right_mv(2) zig(pin(37,UP)) +go(pin(8,OUT)) right_mv(6) junction + {zig(pin(17,IN))} + up_mv(4) left_mv(1) vert(pin(19,UP)) junction + {horz(pin(19,UP))} + zig(pin(20,UP)) +# Gate 9 +go(A2) up_mv(1) horz(gate(19).e) right_mv(1) zig(pin(28,UP)) +go(B2) dn_mv(2) horz(gate(39).e) right_mv(1) + vert(pin(38,DN)) dn_mv(2) right_mv(2) zig(pin(47,IN)) +go(pin(9,OUT)) right_mv(3) junction + {zig(pin(20,DN))} + {horz(pin(19,IN))} + vert(pin(16,DN)) junction + {horz(pin(16,DN))} + zig(pin(15,UP)) +# Gate 10 +line left inwidth from 10th[].UP; +"A" at last line .end - (0.1, 0) rjust; +"1" at last line .end - (0.05, 0.1) rjust; +move to last line .center; A1: junction +line left inwidth from 10th [].DN; +"B" at last line .end - (0.1, 0) rjust; +"1" at last line .end - (0.05, 0.1) rjust; +move to 1/2 ; B1: junction +go(A1) vert(pin(10,DN)) dn_mv(1) horz(gate(20).e) right_mv(2) zig(pin(30,UP)) +go(B1) dn_mv(2) horz(gate(30).e) right_mv(1) junction + {zig(pin(39,UP))} + right_mv(3) zig(pin(40,DN)) +go(pin(10,OUT)) right_mv(2) junction + {horz(pin(20,IN))} + vert(pin(18,UP)) junction + {horz(pin(18,UP))} + vert(pin(16,UP)) junction + {horz(pin(16,UP))} + zig(pin(14,UP)) +# Gate 11 +go(pin(11, DN)) left_mv(3) vert(pin(11,UP)) up_mv(1) \ + horz(gate(31).e) right_mv(1) zig(pin(41,DN)) +go(pin(11,OUT)) right_mv(2) zig(pin(21,DN)) +# Gate 12 +go(pin(12,OUT)) right_mv(3) junction + {horz(pin(22,IN))} + vert(pin(12,UP)) up_mv(1) + horz(gate(12).w) left_mv(3) + zig(pin(12,IN)) +# Gate 13 +go(pin(13,OUT)) right_mv(1) zig(pin(23,UP)) +# Gate 14 +go(pin(14,OUT)) horz(pin(24,IN)) +# Gate 15 +go(pin(15,OUT)) horz(pin(25,IN)) +# Gate 16 +go(pin(16,OUT)) right_mv(2) junction + {horz(pin(26,IN))} + vert(pin(27,UP)) junction + {horz(pin(27,UP))} + zig(pin(29,DN)) +# Gate 17 +go(pin(17,OUT)) horz(pin(27,IN)) +# Gate 18 +go(pin(18,OUT)) right_mv(3) junction + {horz(pin(28,IN))} + zig(pin(27,DN)) +# Gate 19 +go(pin(19,OUT)) horz(pin(29,IN)) +# Gate 20 +go(pin(20,OUT)) right_mv(3) junction + {horz(pin(30,IN))} + zig(pin(29,UP)) +# Gate 21 +go(pin(21,UP)) left_mv(2) vert(pin(21,DN)) ground +go(pin(21,OUT)) right_mv(2) junction + {zig(pin(31,DN))} + up_mv(2) junction +# Gate 22 +go(pin(22,UP)) left_mv(3) up_mv(2) junction +go(pin(22,DN)) left_mv(4) + vert(pin(22,UP)) up_mv(3) right_mv(3) + vert(pin(23,UP)) up_mv(3) + horz(gate(23).e) right_mv(2) + vert(pin(25,UP)) left_mv(1) + vert(pin(28,DN)) right_mv(1) + zig(pin(40,IN)) +go(pin(22,OUT)) right_mv(3) junction + {horz(pin(32,IN))} + {zig(pin(33,IN))} + zig(pin(31,UP)) +# Gate 23 +go(pin(23,OUT)) right_mv(1) + vert(gate(23).DN) dn_mv(1) + horz(gate(33)) right_mv(1) + dn_mv(1) to_bus +# Gate 24 +go(pin(24,OUT)) right_mv(1) zig(pin(33,UP)) +# Gate 25 +go(pin(25,OUT)) horz(pin(35,IN)) +# Gate 26 +go(pin(26,OUT)) right_mv(2) vert(pin(26,DN)) dn_mv(1) junction + {to_bus} + zig(pin(35,UP)) +# Gate 27 +go(pin(27,OUT)) right_mv(2) zig(pin(36,UP)) +# Gate 28 +go(pin(28,OUT)) right_mv(3) junction + {horz(pin(38,IN))} + vert(pin(38, DN)) dn_mv(1) to_bus +# Gate 29 +go(pin(29,OUT)) right_mv(3) junction + {horz(pin(39,IN))} + {vert(pin(39, DN)) dn_mv(1) to_bus} + zig(pin(40,UP)) +# Gate 30 +go(pin(30,OUT)) right_mv(1) + vert(pin(30,DN)) dn_mv(1) + horz(gate(40).e) right_mv(2) + zig(pin(50,UP)) +# Gate 31 +go(pin(31,OUT)) right_mv(2) zig(pin(41,UP)) +# Gate 32 +go(pin(32,OUT)) right_mv(2) vert(pin(32,UP)) junction + {horz(pin(42,UP))} + up_mv(1) to_bus +# Gate 33 +go(pin(33,OUT)) right_mv(2) zig(pin(43,UP)) +# Gate 34 +go(pin(34,OUT)) right_mv(3) junction + {horz(pin(44,IN))} + vert(pin(44, DN)) dn_mv(1) to_bus +# Gate 35 +go(pin(35,OUT)) right_mv(1) dn_mv(1) right_mv(2) dn_mv(1) to_bus +# Gate 36 +go(pin(36,OUT)) horz(pin(46,IN)) +# Gate 37 +go(pin(37,OUT)) right_mv(2) vert(pin(48,UP)) junction + {horz(pin(48,UP))} + zig(pin(49,DN)) +# Gate 38 +go(pin(38,OUT)) right_mv(3) junction + {horz(pin(48,IN))} + vert(pin(48,DN)) right_mv(1) dn_mv(3) left_mv(3) + vert(pin(47,UP)) junction + {horz(pin(47,UP))} + zig(pin(46,UP)) +# Gate 39 +go(pin(39,OUT)) right_mv(3) junction + {horz(pin(49,IN))} + {vert(pin(49, DN)) dn_mv(2) to_bus} + zig(pin(50,IN)) +# Gate 40 +go(pin(40,OUT)) right_mv(1) + vert(pin(40,DN)) + dn_mv(2) junction + {horz(gate(40).w); dn_mv(1); horz(gate(40).e); right_mv(1)} + dn_mv(1) junction + zig(pin(49,UP)) +# Gate 41 +# (should be right_mv(2) but we've squeezed the bus line a bit left) +go(pin(41,OUT)) right_mv(1) vert(pin(41,DN)) ground +# Gate 42 +go(pin(42,OUT)) to_bus +# Gate 43 +go(pin(43,OUT)) to_bus +# Gate 44 +go(pin(44,OUT)) to_bus +# Gate 45 +go(pin(45,OUT)) to_bus +# Gate 46 +go(pin(46,OUT)) to_bus +# Gate 47 +go(pin(47,OUT)) to_bus +# Gate 48 +go(pin(48,OUT)) to_bus +# Gate 49 +go(pin(49,OUT)) to_bus +# Gate 50 +go(pin(50,OUT)) to_bus +# The adventitious lead +go(pin(17,OUT)) right_mv(1) + {vert(pin(17,UP)) up_mv(3) horz(gate(17))} + vert(pin(17,DN)) dn_mv(1) + horz(gate(27).w) dn_mv(1) horz(gate(27).e) + dn_mv(1) horz(gate(36).w) + up_mv(2) right_mv(1) dn_mv(2) + right_mv(1) up_mv(2) right_mv(1) dn_mv(2) + right_mv(1) up_mv(2) right_mv(1) + vert(pin(37,DN)) right_mv(4) dn_mv(2) + right_mv(3) dn_mv(1) left_mv(3) + vert(pin(46,DN)) left_mv(3) dn_mv(3) + horz(gate(36).w) up_mv(1) horz(gate(36)) right_mv(1) + +] # End of diagram object +.PE +.ce 1 +FIGURE 1. CIRCUITOUS DIAGRAM +.bp +.sp 10 +.ps 8 +.vs 10 +.nf +.cs R 24 +.ec % +.ds EO %(ci%v'-0.08'%h'-0.67'+%v'0.08' +.%" This is dodgy, but it's the last place es is used +.if n .ds es %o"O|" +.if t .ds es %(es + __________________________________________________________ + |\ \ + | \ 1. Logic gate. Inputs A, B. Output O = AB. \ + | \ \ + | \ \ 2. Logic gate. Inputs A, B, C. Output O = A+BC. \ + | |\ \ \ + | | \ \ 3. Logic gate. Inputs A, B. Output O = A+AB. \ + | | \ \ \ + | | |\ \ 4. Logic gate. Inputs A, B. Output O = AB %*(EO -(A+-B) \ + | | | \ \ \ + | | | \ \ 5. Logic gate. Inputs A, B. Output O = A%*(EOA + AA \ + | | | \ \ \ + | | | \ \ 6. Uninitialized flip-flop. Inputs none. Output O = ? \ + | | | \ \ \ + | | | \ \ 7. Flip-flop-flap. Inputs A, B, C. Output O = 1 if \ + | | | \ \ A=0 or B+C=0 and A=1. O = 0 if AC=1, B=0. O = %*(es if \ + | | | \ \ AB=1, C=0. O = ? if ABC=1. O as yet undetermined \ + | | | \ \ for other Warmenhovian inputs. See Figure 2. \ + | | | \ \ \ + | | | \ \ 8. Bus line. \ + | | | \ \_________________________________________________________\ + | | | \ | | + | | | | | _____________________________________________________ | + | | | | | | | | | | | | + | | | | | | | | | | | | + | | | | | | | | | | | | + | | | | | | | | | | | | + | | | | | | | | | | | | + \|__| | | | \|__| | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + | | | | | | + \|__| \|__| +.ec \ +.cs R +.fi +.ps 10 +.vs 12 +.sp +.ce 1 +Table 1. Logical (and other) functions. +.bp +.if n \{\ +.P +[Warning: The following picture will be garbled or missing. +Get a better output device.] \} +.sp 10 +.PS +# The FLIP FLAP FLOP, Figure 2 of the INTERCAL manual +down; +A: warmengate(); +move; move; +B: warmengate(); +move; move; +C: warmengate(); +move; move; +D: warmengate(); +dot at 1st []; +dot at 2nd []; +dot at 3rd []; +circle rad 0.06 at last []; +line from last circle.w to last circle.e; +line from last circle.n to last circle.s; +line left 3 from A.UP; "A" rjust +line left 3 from B.IN; "B" rjust +line left 3 from C.UP; "C" rjust +line left 2 from C.IN then down 2 then left; "1" rjust +right; circle rad 0.06 with .w at A.OUT; +line right 0.5; junction {line right 1.5; "D" ljust} +line down 0.25; X1: Here +line left 0.5 from A.IN; line down 0.25; X2: Here +line left 0.5 from B.UP; line up 0.25; line to X1; +line right 1.0 from D.OUT; vert(B.UP) line up 0.25; line to X2; +right; circle rad 0.06 with .w at B.OUT; +line right 0.5; vert(C.DN) line down 0.25; X3: Here; +line left 0.25 from D.UP then up 0.25 then to X3; +right; circle rad 0.06 with .w at C.OUT; +line right 0.3; vert(C.DN) line down 0.25; X4: Here +line left 0.5 from D.IN; vert(D.UP) line up 0.25 then to X4; +.PE +.sp 10 +.ce 1 +FIGURE 2. FLIP FLAP FLOP +.bp +.if n \{\ +.P +[Warning: The following picture will be garbled or missing. +Get a better output device.] \} +.PS +[ + NYC: box ht 4 wid 0.5 "9"; + for i = 0 to 16 do { + move to (i+1)/18 + line left 0.5 + } + for i = 0 to 8 do { + move to (i+1)/10 + line right 0.5 + } +] +move right from last [].w; +box invis wid 6 \ + "GATE TYPE 9. BLACK BOX" ljust \ + "INPUTS A1-8, B1-8. " ljust \ + "OUTPUT O1-8 = A1-8~B1-8" ljust +.PE +.sp 10 +.ce 1 +FIGURE 1 (CONTINUED). NEW YORK +.bp +.if '\*c'y' \{\ +.H 4 "Return type of SELECT" +.P +INTERCAL-72 defined the return type of a select operation +to depend on the number of bits selected. The C-INTERCAL compiler +takes the easier route of defining the return type to be that of +the right operand, independent of its actual value. This form has +the advantage that all types can be determined at compile time. +Putting in run-time type-checking would add significant overhead and +complication, to effect a very minor change in language semantics. +.P +The only time this distinction makes any difference is when a unary +operator is applied to the select result. This happens extremely +rarely in practice, the only known instance being the 32-bit +greater-than test in the standard library, where an XOR operator is +applied to the result of selecting a number against itself. The +INTERCAL-72 authors first select the result against #65535\*(ct#65535 to +insure that XOR sees a 32-bit value. With the current compiler this +extra step is unnecessary, but harmless. +.P +The cautious programmer should write code that does not depend on +the compiler version being used. We therefore suggest the following +guideline for determining the select return type: +.P +A select operation with a 16-bit right operand returns a 16-bit +value. The return type of a select operation with a 32-bit right +operand is undefined, but is guaranteed to be an acceptable input +to a mingle operation so long as 16 or fewer bits are actually +selected. Correct code should not depend on whether the return +type is 16 or 32 bits.\} +.H 3 "Unary Operators" +.P +The unary operators are & (logical \fBAND\fR), V (logical \fBOR\fR), +and \*(vb (logical +\fBXOR\fR). This last character is obtained by overpunching a worm (\-) on a V +(V). +.if '\*c'y' \{\ +(In C-INTERCAL, \*(vb is replaced by what (?). The compiler recognizes +V- as a valid equivalent, in case you are concerned about +compatibility with the Princeton compiler. +In version 0.20 and later, the Unicode character U+2200 FOR ALL, +which looks exactly like V- or an upside-down `A' +is also accepted in UTF-8 form.) \} +The operator is inserted between the spot, two-spot, mesh, or +what-have-you, and the integer, thus: .&123, #\*(vb123. Multiple unary +operators may not be concatenated, thus the form #\*(vb&123 is invalid. This +will be covered later when precedence is discussed. These operators perform +their respective logical operations on all pairs of adjacent bits, the +result from the first and last bits going into the first bit of the result. +The effect is that of rotating the operand one place to the right and +ANDing, ORing, or XORing with its initial value. Thus, #&77 (binary = +1001101) is binary 0000000000000100 = 4, #V77 is binary 1000000001101111 = +32879, and #\*(vb77 is binary 1000000001101011 = 32875. +.H 3 "Precedence" +.SETR precedence +.P +Precedence of operators is as follows: +.sp 10 +(The remainder of this page intentionally left blank)\*F +.FS +Keep in mind that the aim in designing INTERCAL was to have no +precedents. +.FE +.bp +.P +This precedence (or lack thereof) may be overruled by grouping expressions +between pairs of sparks (') or rabbit-ears ("). Thus '#165\*(ct#203'~#358 +(binary value '10100101\*(ct11001011'~101100110) has the value 15, but +#165\*(ct'#203~#358' has the value 34915, and #165\*(ct#203~#358 is invalid +syntax and is completely valueless (except perhaps as an educational tool +to the programmer). A unary operator is applied to a sparked or rabbit-eared +expression by inserting the operator immediately following the opening spark +or ears. Thus, the invalid expression #\*(vb&123, +which was described earlier, +could be coded as '\*(vb#&123' or '\*(vb"{"'. +Note: In the interests of +simplifying the sometimes overly-complex form of expressions, INTERCAL allows +a spark-spot combination ('.) to be replaced with a wow (!). Thus '.1~.2' +is equivalent to !1~.2', and 'V.1\*(ct.2' is equivalent to "V!1\*(ct.2'". +.P +Combining a rabbit-ears with a spot to form a rabbit (\o'".') is not permitted, +although the programmer is free to use it should he find an EBCDIC reader +which will properly translate a 12-3-7-8 punch. +.P +Sparks and/or rabbit-ears must also be used to distinguish among such +otherwise ambiguous subscripted and multiply-subscripted expressions as: +.DS L + ,1 SUB #1 ~ #2 + ,1 SUB ,2 SUB #1 #2 #3 + ,1 SUB " ,2 SUB " ,3 SUB #1 " #2 " " #3 " +.DE +The third case may be isolated into either of its possible interpretations +by simply changing some pairs of rabbit-ears to sparks, instead of adding +more ears (which would only confuse the issue further). Ambiguous cases are +defined as those for which the compiler being used finds a legitimate +interpretation which is different from that which the user had in mind. See +also section +.GETHN princeton +\&. +.H 1 "STATEMENTS" +.if '\*c'y' \{\ +.DS I F +"There's glory for you!" +.P +"I don't know what you mean by 'glory,'" Alice said. +.P +Humpty Dumpty smiled contemptuously. "Of course you don't -- till I tell +you. I meant 'there's a nice knock-down argument for you!'" +.P +"But 'glory' doesn't mean 'a nice knock-down argument.'" Alice +objected. +.P +"When \fII\fR use a word," Humpty Dumpty said, in a rather scornful +tone, "it means just what I choose it to mean -- neither more nor less." +.DE \} +.P +In this section is described the format of INTERCAL statements. +.H 2 "General Format" +.P +Statements may be entered in 'free format'. That is, more than one statement +may occur on a single card, and a statement may begin on one card and end +on a later one. Note that if this is done, all intervening cards and portions +thereof must be part of the same statement. That this restriction is necessary +is immediately apparent from the following example of what might occur if +statements could be interlaced. +.DS L + DO .1 <- ".1\*(ct'&:51~"#\*(vb1c!12~;&75SUB"\*(vb'V.1~ + DO .2 <- '"!1\*(ct"&';\*(vb79SUB",&7SUB:173"'~!\*(vb9\*(ct + .2'\*(ct,&1SUB:5~#33578"'"'"~'#65535\*(ct"\*(vb'V#&85'"' + #8196'"'~.1"\*(ct.2'~'#&5\*(ct"'#1279\*(ct#4351'~#65535"' +.DE +The above statements are obviously meaningless. (For that matter, so are +the statements +.DS L + DO .1 <- ".1\*(ct"&:51~"#\*(vb1\*(ct!12~;&75SUB"\*(vb'V.1~ + .2'\*(ct,&1SUB:5~#333578"'"'"~#65535\*(ct"\*(vb'V#&85'"' + DO .2 <- '"!1\*(ct"&';\*(vb79SUB",&7SUB:173"'~!\*(vb9\*(ct + #8196'"'~.1"\*(ct.2'~'#&5\*(ct"'#1279\*(ct#4351'~#65535"' +.DE +but this is not of interest here.) +.P +Spaces may be used freely to enhance program legibility (or at least reduce +program illegibility), with the restriction that no word of a statement +identifier (see section +.GETHN identifiers +) may contain any spaces. +.H 2 "Labels" +.P +A statement may begin with a +.B "logical line label" +enclosed in wax-wane pairs +(()). A statement may not have more than one label, although it is possible +to omit the label entirely. A line label is any integer from 1 to 65535, +which must be unique within each program. The user is cautioned, however, +that many line labels between 1000 and 1999 are used in the INTERCAL System +Library functions. +.H 2 "Identifiers and Qualifiers" +.SETR identifiers +.P +After the line label (if any), must follow one of the following statement +identifiers: DO, PLEASE, or PLEASE DO. These may be used interchangeably to +improve the aesthetics of the program. The identifier is then followed by +either, neither, or both of the following optional parameters (qualifiers): +(1) either of the character strings NOT or N'T, which causes the statement +to be automatically abstained from (see section +.GETHN abstain +) when execution +begins, and (2) a number between 0 and 100, preceded by a double-oh-seven +(%), which causes the statement to have only the specified percent chance +of being executed each time it is encountered in the course of execution. +.H 2 "Statements" +.P +Following the qualifiers (or, if none are used, the identifier) must occur +one of the +.ie '\*c'y' \{\ +14 \} +.el \{\ +13 \} +valid operations. (Exception: see section +.GETHN comments +\&.) These are +described individually in sections +.GETHN calculate + through +.GETHN last_statement +\&. +.H 3 "Calculate" +.SETR calculate +.P +The INTERCAL equivalent of the half-mesh (=) in FORTRAN, BASIC, PL/I, and +others, is represented by an angle (<) followed by a worm (-). This +combination is read 'gets'. 32-bit variables may be assigned 16-bit values, +which are padded on the left with 16 zero bits. 16-bit variables may be +assigned 32-bit values only if the value is less than 65535. Thus, to +invert the least significant bit of the first element of 16-bit +2-dimensional array number 1, one could write: +.DS +,1SUB#1#1 <- '\*(vb",1SUB#1#1"\*(ct#1'~'#0\*(ct#65535' +.DE +Similarly to SNOBOL and SPITBOL, INTERCAL uses the angle-worm to define the +dimensions of arrays. An example will probably best describe the format. +To define 32-bit array number 7 as 3-dimensional, the first dimension being +seven, the second being the current value of 16-bit variable number seven, +and the third being the current value of the seventh element of 16-bit array +number seven (which is one-dimensional) mingled with the last three bits of +32-bit variable number seven, one would write (just before they came to take +him away): +.DS +;7 <- #7 BY .7 BY ",7SUB#7"\*(ct':7~#7' +.DE +This is, of course, different from the statement: +.DS +;7 <- #7 BY .7 BY ,7SUB"#7\*(ct':7~#7'" +.DE +INTERCAL also permits the redefining of array dimensioning, which is done +the same way as is the initial dimensioning. All values of items in an array +are lost upon redimensioning, unless they have been STASHed (see section +.GETHN stash +), in which case restoring them also restores the old dimensions. +.H 3 "NEXT" +.SETR next +.P +The NEXT statement is used both for subroutine calls and for unconditional +transfers. This statement takes the form: +.DS +DO (label) NEXT +.DE +(or, of course, +.DS +PLEASE DO (label) NEXT +.DE +etc.), where (label) represents any logical line label which appears in the +program. The effect of such a statement is to transfer control to the +statement specified, and to store in a push down list (which is initially +empty) the location from which the transfer takes place. Items may be +removed from this list and may be discarded or used to return to the +statement immediately following the NEXT statement. These operations are +described in sections +.GETHN forget + and +.GETHN resume + respectively. The programmer is +generally advised to discard any stack entries which he does not intend to +utilize, since the stack has a maximum depth of 79 entries. A program's +attempting to initiate an 80th level of NEXTing will result in the fatal +error message, "PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON." +.H 3 "FORGET" +.SETR forget +.P +The statement PLEASE FORGET exp, where exp represents any expression +(except colloquial and facial expressions), causes the expression to be +evaluated, and the specified number of entries to be removed from the +NEXTing stack and discarded. An attempt to FORGET more levels of NEXTing +than are currently stacked will cause the stack to be emptied, and no error +condition is indicated. This is because the condition is not considered to +be an error. As described in section +.GETHN next +\&, it is good programming practice +to execute a DO FORGET #1 after using a NEXT statement as an unconditional +transfer, so that the stack does not get cluttered up with unused entries: +.DS L +.cs R 24 + DO (123) NEXT + . + . + (123) DO FORGET #1 +.cs R +.DE +.H 3 "RESUME" +.SETR resume +.P +The statement PLEASE RESUME exp has the same effect as FORGET, except that +program control is returned to the statement immediately following the NEXT +statement which stored in the stack the last entry to be removed. Note that +a rough equivalent of the FORTRAN computed GO TO and BASIC ON exp GO TO is +performed by a sequence of the form: +.DS L +.cs R 24 + DO (1) NEXT + . + . + (1) DO (2) NEXT + PLEASE FORGET #1 + . + . + (2) DO RESUME .1 +.cs R +.DE +Unlike the FORGET statement, an attempt to RESUME more levels of NEXTing than +has been stacked will cause program termination. See also section +.GETHN give_up +\&. +.H 3 "STASH" +.SETR stash +.P +Since subroutines are not explicitly implemented in INTERCAL, the NEXT and +RESUME statements must be used to execute common routines. However, as +these routines might use the same variables as the main program, it is +necessary for them to save the values of any variables whose values they +alter, and later restore them. This process is simplified by the STASH +statement, which has the form DO STASH list, where list represents a +string of one or more variable or array names, separated by intersections +(+). Thus +.DS +PLEASE STASH .123+:123+,123 +.DE +stashes the values of two variables and one entire array. The values are +left intact, and copies thereof are saved for later retrieval by (what else?) +the RETRIEVE statement (see section +.GETHN retrieve +). It is not possible to STASH +single array items. +.H 3 "RETRIEVE" +.SETR retrieve +.P +PLEASE RETRIEVE list restores the previously STASHed values of the variables +and arrays named in the list. If a value has been stashed more than once, +the most recently STASHed values are RETRIEVEd, and a second RETRIEVE will +restore the second most recent values STASHed. Attempting to RETRIEVE a +value which has not been STASHed will result in the error message, "THROW +STICK BEFORE RETRIEVING." +.H 3 "IGNORE" +.SETR ignore +.P +The statement DO IGNORE list causes all subsequent statements to have no +effect upon variables and/or arrays named in the list. Thus, for example, +after the sequence +.DS L + DO .1 <- #1 + PLEASE IGNORE .1 + DO .1 <- #0 +.DE +16-bit variable number 1 would have the value 1, not 0. Inputting (see +section +.GETHN input +) into an IGNOREd variable also has no effect. The condition +is annulled via the REMEMBER statement (see section +.GETHN remember +). Note that, when +a variable is being IGNOREd, its value, though immutable, is still +available for use in expressions and the like. +.if '\*c'y' \{\ +.P +Though the INTERCAL-72 manual laid down that the value of an IGNOREd +variable cannot change, it was unclear about whether or not a +statement which appears to change an IGNOREd variable is executed or +not. This may appear to be a "If a tree falls in the forest ..." type +of question, but if the statement in question has other side effects +it is not. +.P +Since another mechanism already exists for ABSTAINing from a +statement, C-INTERCAL's IGNORE only prevents the changing of the +specific variable in question, not the execution of the entire +statement. In the present version of the language this only makes +a difference for the WRITE IN (see +.GETHN input +) and RETRIEVE (see +.GETHN retrieve +) statements. Attempting to WRITE IN +to an IGNOREd variable will cause a number to be read from the input, +which will be discarded since it cannot be stored in the variable. +Using RETRIEVE on an IGNOREd variable will pop the variable's stash +stack without actually changing its value. \} +.H 3 "REMEMBER" +.SETR remember +.P +PLEASE REMEMBER list terminates the effect of the IGNORE statement for all +variables and/or arrays named in the list. It does not matter if a variable +has been IGNOREd more than once, nor is it an error if the variable has not +been IGNOREd at all. +.H 3 "ABSTAIN" +.SETR abstain +.P +INTERCAL contains no simple equivalent to an IF statement or computed GO +TO, making it difficult to combine similar sections of code into a single +routine which occasionally skips around certain statements. The IGNORE +statement (see section +.GETHN ignore +) is helpful in some cases, but a more viable +method is often required. In keeping with the goal of INTERCAL having +nothing in common with any other language, this is made possible via the +ABSTAIN statement. +.P +This statement takes on one of two forms. It may not take on both at any one +time. DO ABSTAIN FROM (label) causes the statement whose logical line label +is (label) to be abstained from. PLEASE ABSTAIN FROM gerund list causes all +statements of the specified type(s) to be abstained from, as in +.DS L +.ta .3i .6i T .6i + PLEASE ABSTAIN FROM STASHING + PLEASE ABSTAIN FROM IGNORING + FORGETTING + PLEASE ABSTAIN FROM NEXTING + or PLEASE ABSTAIN FROM CALCULATING +.DE +Statements may also be automatically abstained from at the start of +execution via the NOT or N'T parameter (see section +.GETHN identifiers +). +.P +If, in the course of execution, a statement is encountered which is being +abstained from, it is ignored and control passes to the next statement in +the program (unless it, too, is being abstained from). +.P +The statement DO ABSTAIN FROM ABSTAINING is perfectly valid, as is DO ABSTAIN +FROM REINSTATING (although this latter is not usually recommended). However, +the statement DO ABSTAIN FROM GIVING UP is not accepted, even though DON'T +GIVE UP is. +.H 3 "REINSTATE" +.SETR reinstate +.P +The REINSTATE statement, like the ABSTAIN, takes as an argument either a +line label or a gerund list. No other form of argument is permitted. For +example, the following is an invalid argument: +.DS L + Given: x\(!=0, y\(!=0, Prove: x+y=0 + Since x\(!=0, then x+1\(!=1, x+a\(!=a, x+y\(!=y. + But what is y? y is anything but 0. + Thus x+y \(!= anything but 0. + Since x+y cannot equal anything but 0, x+y=0. + Q.E.D. +.DE +REINSTATEment nullifies the effects of an abstention. Either form of +REINSTATEment can be used to "free" a statement, regardless of whether the +statement was abstained from by gerund list, line label, or NOT. Thus, +PLEASE REINSTATE REINSTATING is not necessarily an irrelevant statement, +since it might free a DON'T REINSTATE command or a REINSTATE the line label +of which was abstained from. However, DO REINSTATE GIVING UP is invalid, +and attempting to REINSTATE a GIVE UP statement by line label will have no +effect. Note that this insures that DON'T GIVE UP will always be a +"do-nothing" statement. +.H 3 "GIVE UP" +.SETR give_up +.P +PLEASE GIVE UP is used to exit from a program. It has the effect of a PLEASE +RESUME #80. DON'T GIVE UP, as noted in section +.GETHN reinstate +\&, is effectively a null +statement. +.H 3 "Input" +.SETR input +.P +Input is accomplished with the statement DO WRITE IN list, where list +represents a string of variables and/or elements of arrays, separated by +intersections. Numbers are represented on cards, each number on a separate +card, by spelling out each digit (in English) and separating the digits +with one or more spaces. A zero (0) may be spelled as either ZERO or OH. +Thus the range of (32-bit) input values permissible extends from ZERO (or +OH) through FOUR TWO NINE FOUR NINE SIX SEVEN TWO NINE FIVE. +.if '\*c'y' \{\ +(For the convenience of aviators, C-INTERCAL accepts the spelling +NINER for NINE. In the service of internationalization, C-INTERCAL +also accepts input digits in Sanskrit, Basque, Tagalog, Classical +Nahuatl, Georgian, Kwakiutl, and Volapuk.) \} +.P +Attempting to write in a value greater than or equal to SIX FIVE FIVE THREE +SIX for a 16-bit variable will result in the error message, "DON'T BYTE OFF +MORE THAN YOU CAN CHEW." +.if '\*c'y' \{\ +.P +(See also section +.GETHN communication + for a description of C-INTERCAL's character I/O.) \} +.H 3 "Output" +.P +Values may be output to the printer, one value per line, via the statement +DO READ OUT list, where the list contains variables, array elements, and/or +constants. Output is in the form of "extended" Roman numerals (also called +"butchered" Roman numerals), with an overline +.if t (\(rn) +indicating the value below +is "times 1000", and lower-case letters indicating "times 1000000". Zero +is indicated by an overline with no character underneath. Thus, the range +of (32-bit) output values possible is from +.if t \(rn +.if n \{\ +.nf +_ + +.fi \} +through +.ie t \o"i\(rn"\o"v\(rn"ccxciv\o"C\(rn"\o"M\(rn"\o"L\(rn"\o"X\(rn"\o"V\(rn"\o"I\(rn"\o"I\(rn"CCXCV. +.el \{\ +.br +.nf +__ ____________ +ivccxcivCMLXVIICCXCV. +.fi \} +Note: For values whose residues modulo 1000000 are less than 4000, M is +used to represent 1000; for values whose residues are 4000 or greater, +.if t \o"I\(rn" +.if n \{\ +.nf +_ +I +.fi \} +.\" This is the one place we corrected the original manual. +is used. Thus #3999 would read out as MMMCMXCIX \*F while #4000 would +.FS +The original INTERCAL-72 manual claimed +that #3999 should render as MMMIM, but the C-INTERCAL developers have +been unable to find an algorithm that does this and is consistent +with the rest of the rules. +.FE +readout as +.if t \o"I\(rn"\o"V\(rn". +.if n \{\ +.nf +__ +IV +.fi \} +Similar rules apply to the use of +.if t \o"M\(rn" +.if n \{\ +.nf +_ +M +.fi \} +and i for 1000000, and to that of m and +.if t \o"i\(rn" +.if n \{\ +.nf +_ +i +.fi \} +for 1000000000. +.if '\*c'y' \{\ +.P +(See also section +.GETHN communication + for a description of C-INTERCAL's character I/O.) \} +.if '\*c'y' \{\ +.H 3 "COME FROM" +.P +In which we try to precisely define a statement that should never +have been born, but is nevertheless one of the more useful statements +in INTERCAL. +.H 4 "Background" +.P +The earliest known description of the COME FROM statement in the computing +literature is in [R. L. Clark, "A linguistic contribution to GOTO-less +programming," Commun. ACM 27 (1984), pp. 349-350], part of the famous April +Fools issue of CACM. The subsequent rush by language designers to include the +statement in their languages was underwhelming, one might even say nonexistent. +It was therefore decided that COME FROM would be an appropriate addition +to C-INTERCAL. +.H 4 "Description" +.P +There are two useful ways to visualize the action of the COME FROM +statement. The simpler is to see that it acts like a GOTO when the +program is traced backwards in time. More precisely, the statements +.DS L +(1) DO + . + . + . +(2) DO COME FROM (1) +.DE +should be thought of as being equivalent to +.DS L +(1) DO +(2) DO GOTO (3) + . + . + . +(3) DO NOTHING +.DE +if INTERCAL actually had a GOTO statement at all, which of course it +doesn't. +.P +What this boils down to is that the statement DO COME FROM (label), +anywhere in the program, places a kind of invisible trap door +immediately after statement (label). Execution or abstention of that +statement is immediately followed by an unconditional jump to the +COME FROM, unless the (label)ed statement is an executed NEXT, in which +case the jump occurs if the program attempts to RESUME back to that +NEXT statement. It is an error for more than one COME FROM to refer +to the same (label). +.P +Modification of the target statement by ABSTAIN or by the % qualifier +affects only that statement, not the subsequent jump. Such +modifications to the COME FROM itself, however, do affect the jump. +Encountering the COME FROM statement itself, rather than its target, +has no effect. \} +.SETR last_statement +.H 2 "Comments" +.SETR comments +.P +Unrecognizable statements, as noted in section +.GETHN error_messages +\&, are flagged with a splat +(*) during compilation, and are not considered fatal errors unless they +are encountered during execution, at which time the statement (as input at +compilation time) is printed and execution is terminated. This allows for +an interesting (and, by necessity, unique) means of including comments in +an INTERCAL listing. For example, the statement: +.sp 1 +* PLEASE NOTE THAT THIS LINE HAS NO EFFECT +.P +will be ignored during execution due to the inclusion of the NOT qualifier. +User-supplied error messages are also easy to implement: +.sp 1 +* DO SOMETHING ABOUT OVERFLOW IN ;3 +.P +as are certain simple conditional errors: +.DS L +.cs R 24 +* (123) DON'T YOU REALIZE THIS STATEMENT SHOULD ONLY BE ENCOUNTERED + ONCE? + PLEASE REINSTATE (123) +.cs R +.DE +This pair of statements will cause an error exit the second time they are +encountered. Caution!! The appearance of a statement identifier in an +intended comment will be taken as the beginning of a new +.\" CORRECTION: +.\" "comment example above" was originally "example on the preceding page" +.\" We can't rely on page boundaries any more. +statement. Thus, the first comment example above could not have been: +.sp 1 +* PLEASE NOTE THAT THIS LINE DOES NOTHING +.P +The third example, however, is valid, despite the appearance of two cases +of D-space-O, since INTERCAL does not ignore extraneous spaces in statement +identifiers. +.if '\*c'y' \{\ +.H 1 "OUTSIDE COMMUNICATION" +.if '\*c'y' \{\ +.DS I F +She puzzled over this for some time, but at last a bright thought +struck her. "Why, it's a Looking-glass book, of course! And, if I hold +it up to a glass, the words will all go the right way again." +.DE \} +.SETR communication +.P +In which we try to remedy the fact that, due to I/O limitations, INTERCAL +can not even in principle perform the same tasks as other languages. It +is hoped that this addition will permit INTERCAL users to waste vast +quantities of computer time well into the 21st century. +.H 2 "Motivation" +.P +One of the goals of INTERCAL was to provide a language which, though +different from all other languages, is nevertheless theoretically +capable of all the same tasks. INTERCAL-72 failed to +accomplish this because its I/O functions could not handle arbitrary +streams of bits, or even arbitrary sequences of characters. A +language which can't even send its input directly to its output +can hardly be considered as capable as other languages. +.H 2 "Turing Text Model" +.P +To remedy this problem, character I/O is now provided in a form based +on the "Turing Text" model, originally proposed by Jon Blow. The +C-INTERCAL programmer can access this capability by placing a +one-dimensional array in the list of items given to a WRITE IN or READ +OUT statement. On execution of the statement, the elements of the array +will, from first to last, be either loaded from the input or sent +to the output, as appropriate, in the manner described below. There +is currently no support for I/O involving higher-dimensional arrays, +but some form of graphics might be a possible 2-D interpretation. +.P +The heart of the Turing Text model is the idea of a continuous loop +of tape containing, in order, all the characters in the machine's +character set. When a character is received by the input routine, +the tape is advanced the appropriate number of spaces to bring +that character under the tape head, and the number of spaces the +tape was moved is the number that is actually seen by the INTERCAL +program. Another way to say this is that the number placed in an +INTERCAL array is the difference between the character just +received and the previous character, modulo the number of characters +in the machine character set. +.P +Output works in just the opposite fashion, except that the characters +being output come from the other side of the tape. From this position +the characters on the tape appear to be in reverse order, and are +individually backwards as well. (We would show you what it looks +like, but we don't have a font with backwards letters available. +Use your imagination.) The effect is that a number is taken out +of an INTERCAL array, subtracted from the last character output -- +i.e., the result of the last subtraction -- and then sent on down +the output channel. The only catch is that the character as seen +by the INTERCAL program is the mirror-image of the character as +seen by the machine and the user. The bits of the character are +therefore taken in reverse order as it is sent to the output. +Note that this bit reversal affects only the character seen by +the outside world; it does not affect the character stored internally +by the program, from which the next output number will be subtracted. +All subtractions are done modulo the number of characters in the +character set. +.P +Two different tapes are used for input and output to allow for +future expansion of the language to include multiple input and +output channels. Both tapes start at character 0 when a program +begins execution. On input, when an end-of-file marker is reached +the number placed in the array is one greater than the +highest-numbered character on the tape. +.H 2 "Example Program" +.P +If all this seems terribly complicated, it should be made perfectly +clear by the following example program, which simply maps its input +to its output (like a simplified UNIX "cat"). It assumes that +characters are 8 bits long, but that's fine since the current version +of C-INTERCAL does too. It uses the standard library routines for addition +and subtraction. +.DS L +.cs R 24 + 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 .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 + DO ,1SUB#1 <- .3 +(30) PLEASE READ OUT ,1 +.cs R +.DE +For each number received in the input array, the program first tests +the #256 bit to see if the end of file has been reached. If not, the +previous input character is subtracted off to obtain the current +input character. Then the order of the bits is reversed to find +out what character should be sent to the output, and the result +is subtracted from the last character sent. Finally, the difference +is placed in an array and given to a READ OUT statement. See? +We told you it was simple! \} +.if '\*c'y' \{\ +.H 1 "TriINTERCAL" +.if '\*c'y' \{\ +.DS I F +"-- oh dear, how puzzling it all is! I'll try if I know all the things +I used to know. Let me see: four times five is twelve, and four times +six is thirteen, and four times seven is -- oh dear! I shall never get +to twenty at that rate!" +.DE \} +.SETR tri_intercal +.P +In which it is revealed that bitwise operations are too ordinary for +hard-core INTERCAL programmers, and extensions to other bases are +discussed. These are not, strictly speaking, extensions to INTERCAL +itself, but rather new dialects sharing most of the features of the +parent language. +.H 2 "Motivation" +.P +INTERCAL is really a pretty sissy language. It tries hard to be +different, but when you get right down to its roots, what do you find? +You find bits, that's what. Plain old ones and zeroes, in groups of +16 and 32, just like every other language you've ever heard of. And +what operations can you perform on these bits? The INTERCAL operators +may arrange and permute them in weird and wonderful ways, but at the +bit level the operators are the same AND, OR and XOR you've seen +countless times before. +.P +Once the prospective INTERCAL programmer masters the unusual syntax, +she finds herself working with the familiar Boolean operators on +perfectly ordinary unsigned integer words. Even the constants she uses +are familiar. After all, who would not immediately recognize #65535 +and #32768? It may take a just a moment more to figure out #65280, +and #21845 and #43690 could be puzzles until she notices that they +sum to #65535, but basically she's still on her home turf. The 16-bit +limit on constants actually works in the programmer's favor by insuring +that very long anonymous constants cannot appear in INTERCAL programs. +And this is in a language that is supposed to be different from any +other! +.H 2 "Abandon All Hope..." +.P +Standard INTERCAL is based on variables consisting of ordinary bits +and familiar Boolean operations on those bits. In pursuit of uniqueness, +it seems appropriate to provide a new dialect, otherwise identical to +INTERCAL, which instead uses variables consisting of trits, i.e. ternary +digits, and operators based on tritwise logical operations. This is +intended to be a separate dialect, rather than an extension to INTERCAL +itself, for a number of reasons. Doing it this way avoids word-length +conflicts, does not spoil the elegance of the Spartan INTERCAL operator +set, and dodges the objections of those who might feel it too great an +alteration to the original language. Primarily, though, giving INTERCAL +programmers the ability to switch numeric base at will amounts to +excessive functionality. So much better that a programmer choose a base +at the outset and then be forced to stick with it for the remainder of +the program. +.H 2 "Compiler Operation" +.P +The same compiler, ick, supports both INTERCAL and TriINTERCAL. +This has the advantage that future bug fixes and additions to the +language not related to arithmetic immediately apply to both versions. +The compiler recognizes INTERCAL source files by the extension '.i', +and TriINTERCAL source files by the extension '.3i'. It's as simple +as that. There is no way to mix INTERCAL and TriINTERCAL source in +the same program, and it is not always possible to determine which +dialect a program is written in just by looking at the source code. +.H 2 "Data Types" +.P +The two TriINTERCAL data types are 10-trit unsigned integers and +20-trit unsigned integers. All INTERCAL syntax for distinguishing +data types is ported to these new types in the obvious way. Small +words may contain numbers from #0 to #59048; large words may contain +numbers from #0$#0 to #59048$#59048. Errors are signaled for constants +greater than #59048 and for attempts to WRITE IN numbers too large +for a given variable or array element to hold. +.P +Note that though TriINTERCAL considers all numbers to be unsigned, +nothing prevents the programmer from implementing arithmetic operations +that treat their operands as signed. Three's complement is one obvious +choice, but balanced ternary notation is also a possibility. This +latter is a very pretty and symmetrical system in which all 2 trits +are treated as if they had the value -1. +.H 2 "Operators" +.P +The TriINTERCAL operators are designed to inherit the relevant properties +of the standard INTERCAL operators, so that both can be considered as +merely different aspects of the same Platonic ideal. (Not that the word +"ideal" is ever particularly relevant when used in connection with +INTERCAL.) +.H 3 "Binary Operators I" +.P +The binary operators carry over from the original language with only +minor changes. The mingle operator ($) creates a 20-trit word by +alternating trits from its two 10-trit operands. The select operator (~) +is a little more complicated, since the ternary tritmask may contain 0, 1, +and 2 trits. If we observe that the select operation on binary operands +amounts to a bitwise AND and some rearrangement of bits, it seems +appropriate to base the select for ternary operands on a tritwise AND in +the analogous fashion. We therefore postpone the definition of select +until we know what a tritwise AND looks like. +.H 3 "Unary Operators" +.P +The unary operators in INTERCAL are all derived from the familiar +Boolean operations on single bits. To extend these operations to trits, +we first ask ourselves what the important properties of these operations +are that we wish to be preserved, then design the tritwise operators so +that they behave in a similar fashion. +.H 4 "Unary Logical Operators" +.P +Let's start with AND and OR. To begin with, these can be considered +"choice" or "preference" operators, as they always return one of their +operands. AND can be described as wanting to return 0, but returning 1 +if it is given no other choice, i.e., if both operands are 1. Similarly, +OR wants to return 1 but returns 0 if that is its only choice. From +this it is immediately apparent that each operator has an identity +element that "always loses", and a dominator element that "always wins". +.P +AND and OR are commutative and associative, and each distributes +over the other. They are also symmetric with each other, in the sense +that AND looks like OR and OR looks like AND when the roles of 0 and 1 +are interchanged (De Morgan's Laws). This symmetry property seems to be +a key element to the idea that these are logical, rather than arithmetic, +operators. In a three-valued logic we would similarly expect a +three-way symmetry among the three values 0, 1 and 2 and the three +operators AND, OR and (of course) BUT. +.P +The following tritwise operations have all the desired properties: +OR returns the greater of its two operands. That is, it returns 2 if +it can get it, else it tries to return 1, and it returns 0 only if both +operands are 0. AND wants to return 0, will return 2 if it can't get +0, and returns 1 only if forced. BUT wants 1, will take 0, and tries +to avoid 2. The equivalents to De Morgan's Laws apply to rotations +of the three elements, e.g., 0 -> 1, 1 -> 2, 2 -> 0. Each operator +distributes over exactly one other operator, so the property +"X distributes over Y" is not transitive. The question of which way +this distributivity ring goes around is left as an exercise for the +student. +.P +In TriINTERCAL programs the whirlpool (@) denotes the unary tritwise +BUT operation. You can think of the whirlpool as drawing values +preferentially towards the central value 1. Alternatively, you can +think of it as drawing your soul and your sanity inexorably down ... +.P +On the other hand, maybe it's best you \fInot\fR think of it that way. +.P +A few comments about how these operators can be used. OR acts like +a tritwise maximum operation. AND can be used with tritmasks. 0's +in a mask wipe out the corresponding elements in the other operand, +while 1's let the corresponding elements pass through unchanged. 2's +in a mask consolidate the values of nonzero elements, as both 1's and +2's in the other operand yield 2's in the output. BUT can be used to +create "partial tritmasks". 0's in a mask let BUT eliminate 2's from +the other operand while leaving other values unchanged. Of course, +the symmetry property guarantees that the operators don't really +behave differently from each other in any fundamental way; the apparent +differences come from the intuitive view that a 0 trit is "not set" +while a 1 or 2 trit is "set". +.H 4 "Binary Operators II" +.P +At this point we can define select, since we now know what the +tritwise AND looks like. Select takes the binary tritwise AND of +its two operands. It shifts all the trits of the result corresponding +to 2's in the right operand over to the right (low) end of the result, +then follows them with all the output trits corresponding to 1's in +the right operand. Trits corresponding to 0's in the right operand, +which are all 0 anyway, occupy the remaining space at the left end of +the output word. Both 10-trit and 20-trit operands are accepted, +and are padded with zeroes on the left if necessary. The output +type is determined the same way as in standard C-INTERCAL. +.H 4 "Unary Arithmetic Operators" +.P +Now that we've got all that settled, what about XOR? This is +easily the most-useful of the three unary INTERCAL operators, +because it combines in one package the operations ADD WITHOUT CARRY, +SUBTRACT WITHOUT BORROW, BITWISE NOT-EQUAL, and BITWISE NOT. In +TriINTERCAL we can't have all of these in the same operator, since +addition and subtraction are no longer the same thing. The solution +is to split the XOR concept into two operators. The ADD WITHOUT CARRY +operation is represented by the new sharkfin (^), while the old +what (?) represents SUBTRACT WITHOUT BORROW. The reason for this +choice is so that what (?) will also represent the TRITWISE NOT-EQUAL +operation. +.P +Note that what (?), unlike the other four unary operators, is not +symmetrical. It should be thought of as rotating its operand one trit +to the right (with wraparound) and then subtracting off the trits of +the original number. These subtractions are done without borrowing, +i.e., trit-by-trit modulo 3. +.H 3 "Examples" +.P +The TriINTERCAL operators really aren't all that bad once you get +used to them. Let's look at a few examples to show how they can +be used in practice. In all of these examples the input value is +contained in the 10-trit variable .3. +.P +In INTERCAL, single-bit values often have to be converted from +{0,1} to {1,2} for use in RESUME statements. Examples of how to do +this appear in the original manual. In TriINTERCAL the expression +"^.3$#1"~#1 sends 0 -> 1 and 1 -> 2. If the 1-trit input value can +take on any of its three possible states, however, we will also have +to deal with the 2 case. The expression "V.3$#1"~#1 sends {0,1} -> 1 +and 2 -> 2. To test if a trit is set, we can use "V'"&.3$#2"~#1'$#1"~#1, +sending 0 -> 1 and {1,2} -> 2. To reverse the test we use +"?'"&.3$#2"~#1'$#1"~#1, sending 0 -> 2 and {1,2} -> 1. Note that we +have not been taking full advantage of the new select operator. These +last two expressions can be simplified into "V!3~#2'$#1"~#1 and +"?!3~#2'$#1"~#1, which perform exactly the same mappings. Finally, if +we need a 3-way test, we can use "@'"^.3$#7"~#4'$#2"~#10, which +obviously sends 0 -> 1, 1 -> 2, and 2 -> 3. +.P +For an unrelated example, the expression "^.3$.3"~"#0$#29524" +converts all of the 1-trits of .3 into 2's and all of the 2-trits +into 1's. In balanced ternary, where 2-trits represent -1 values, +this is the negation operation. +.H 2 "Beyond Ternary..." +.P +While we're at it, we might as well extend this multiple bases +business a little farther. The ick compiler actually recognizes +filename suffixes of the form '.Ni', where N is any number from 2 +to 7. 2 of course gives standard INTERCAL, while 3 gives TriINTERCAL. +We cut off before 8 because octal notation is the smallest base used +to facilitate human-to-machine communication, and this seems quite +contrary to the basic principles behind INTERCAL. The small data +types hold 16 bits, 10 trits, 8 quarts, 6 quints, 6 sexts, or 5 septs, +and the large types are always twice this size. +.P +As for operators, ? is always SUBTRACT WITHOUT BORROW, and ^ +is always ADD WITHOUT CARRY. V is the OR operation and always +returns the max of its inputs. & is the AND operation, which chooses +0 if possible but otherwise returns the max of the inputs. @ is BUT, +which prefers 1, then 0, then the max of the remaining possibilities. +Rather than add more special symbols forever, a numeric modifier may +be placed directly before the @ to indicate the operation +that prefers one of the digits not already represented. Thus in files +ending in '.5i', the permitted unary operators are ?, ^, &, @, 2@, 3@, +and V. Use of such barbarisms as 0@ to represent & +are not permitted, nor is the use of @ or ^ in files with either +of the extensions '.i' or '.2i'. Why not? You just can't, that's why. +Don't ask so many questions. +.P +As a closing example, we note that in balanced quinary notation, +where 3 means -2 and 4 means -1, the negation operation can be written +as either +.DS L + DO .1 <- "^'"^.3$.3"~"#0$#3906"'$'"^.3$.3"~"#0$#3906"'"~"#0$#3906" +.DE +or as +.DS L + DO .1 <- "^.3$.3"~"#0$#3906" + DO .1 <- "^.1$.1"~"#0$#3906" +.DE +These work because multiplication by -1 is the same as multiplication +by 4, modulo 5. +.P +Now go beat your head against the wall for a while.\} +.H 1 "SUBROUTINE LIBRARY" +.if '\*c'y' \{\ +.DS I F +"You don't know what you're talking about!" cried Humpty Dumpty. "How +many days are there in a year?" +.P +"Three hundred and sixty-five," said Alice. +.P +"And how many birthdays have you?" +.P +"One." +.P +"And if you take one from three hundred and sixty-five, what remains?" +.P +"Three hundred and sixty-four, of course." +.P +Humpty Dumpty looked doubtful. "I'd rather see that done on paper," he +said. +.DE \} +.SETR sublib +.P +INTERCAL provides several built-in subroutines to which control can be +transferred to perform various operations. These operations include many +useful functions which are not easily representable in INTERCAL, such as +addition, subtraction, etc. +.H 2 "Usage" +.P +In general, the operands are .1, .2, etc., or :1, :2, etc., and the result(s) +are stored in what would have been the next operand(s). For instance, one +routine adds .1 to .2 and stores the sum in .3, with .4 being used to indicate +overflow. All variables not used for results are left unchanged. +.H 2 "Available Functions" +.SETR functions +.P +At the time of this writing, only the most fundamental operations are offered +in the library, as a more complete selection would require prohibitive time +and core to implement. These functions, along with their corresponding entry +points (entered via DO (entry) NEXT) are listed below. +.DS L +.cs R 24 + (1000) .3 <- .1 plus .2, error exit on overflow + (1009) .3 <- .1 plus .2 + .4 <- #1 if no overflow, else .4 <- #2 + (1010) .3 <- .1 minus .2, no action on overflow + (1020) .1 <- .1 plus #1, no action on overflow + (1030) .3 <- .1 times .2, error exit on overflow + (1039) .3 <- .1 times .2 + .4 <- #1 if no overflow, else .4 <- #2 + (1040) .3 <- .1 divided by .2 + .3 <- #0 if .2 is #0 + (1050) .2 <- :1 divided by .1, error exit on overflow + .2 <- #0 if .1 is #0 + + (1500) :3 <- :1 plus :2, error exit on overflow + (1509) :3 <- :1 plus :2 + :4 <- #1 if no overflow, else :4 <- #2 + (1510) :3 <- :1 minus :2, no action on overflow + (1520) :1 <- .1 concatenated with .2 + (1525) This subroutine is intended solely for internal + use within the subroutine library and is therefore + not described here. Its effect is to shift .3 + logically 8 bits to the left. + (1530) :1 <- .1 times .2 + (1540) :3 <- :1 times :2, error exit on overflow + (1549) :3 <- :1 times :2 + :4 <- #1 if no overflow, else :4 <- #2 + (1550) :3 <- :1 divided by :2 + :3 <- #0 if :2 is #0 + + (1900) .1 <- uniform random no. from #0 to #65535 + (1910) .2 <- normal random no. from #0 to .1, with + standard deviation .1 divided by #12 +.cs R +.DE +.if '\*c'y' \{\ +.H 2 "Automagical Inclusion Of The Subroutine Library" +.P +The C-INTERCAL compiler will automatically include the system library if a DO +(1xxx) NEXT statement is used, and if no (1xxx) labels are defined anywhere, +where (1xxx) is a label in the 1000-1999 range, inclusive. This was not +an INTERCAL-72 feature. \} +.H 1 "PROGRAMMING HINTS" +.if '\*c'y' \{\ +.DS I F +"If any one of them can explain it," said Alice, "I'll give him +sixpence. \fII\fR don't believe there's an atom of meaning in it." +The jury all wrote down, on their slates, "\fIShe\fR doesn't +believe there's an atom of meaning in it," but none of them attempted +to explain the paper. +.P +"If there's no meaning in it," said the King, "that saves a world of +trouble, you know, as we needn't try to find any. And yet, I don't +know," he went on, spreading out the verses on one knee, and looking +at them with one eye: "I seem to see some meaning in them, after +all...." +.DE \} +.SETR proghints +.P +For the user looking to become more familiar with the INTERCAL language, we +present in this section an analysis of a complex program, as well as some +suggested projects for the ambitious programmer. +.P +Considering the effort involved in writing an INTERCAL program, it was +decided in putting together this manual to use an already existing program +for instructive analysis. Since there was only one such program available, +we have proceeded to use it. It is known as the "INTERCAL System Library." +.H 2 "Description" +.P +.\" CORRECTION: +.\" "is in section {section}" was "on the second page following" +.\" We can't rely on the page breaks any more. +The program listing is in section +.GETHN syslib +\&. It is in the same +format as would be produced by the Princeton INTERCAL compiler in FORMAT +mode with WIDTH=62 (see section +.GETHN princeton +). For a description of the functions +performed by the Library, see section +.GETHN functions +\&. +.H 2 "Analysis" +.P +We shall not attempt to discuss here the algorithms used, but rather we +shall point out some of the general techniques applicable to a wide range +of problems. +.P +Statements 10, 14, 15, and 26 make up a virtual "computed GO TO". When +statement 10 is executed, control passes eventually to statement 16 or 11, +depending on whether .5 contains #1 or #2, respectively. The value of .5 +is determined in statement 9, which demonstrates another handy technique. +To turn an expression, exp, with value #0 or #1, into #1 or #2 (for use in +a "GO TO"), use "\*(vb'exp'\*(ct#1"~#3. +To reverse the condition (i.e., convert #0 +to #2 and leave #1 alone) use "\*(vb'exp'\*(ct#2"~#3. +.P +Certain conditions are easily checked. For example, to test for zero, +select the value from itself and select the bottom bit (see statement 54). +To test for all bits being 1's, select the value from itself and select the +top bit. +.\" CORRECTION: +.\" "statements 219 and 220" were "statement 192 and 193", but there +.\" is no such test there. +.\" Also, last sentence had parenthetical "(see statement 261)". Not +.\" only does 261 contain no such test, the library as a whole doesn't +.\" seem to either. +The test for greater than, performed in +statements 219 and 220 on 32-bit values, employs binary logical operations, +which are performed as follows: +.DS +\&'\*(vb.1\*(ct.2'~'#0\*(ct#65535' +.DE +for 16-bit values or, for 32-bit values: +.DS L + "'\*(vb":1~'#65535\*(ct30'"\*(ct":2~'#65535\*(ct#0'"'~'#0 + \*(ct#65535'"\*(ct"'\*(vb":1~'#0\*(ct#65535'"\*(ct":2~'#0 + \*(ct#65535'"'~'#0\*(ct#65535'" +.DE +(The proofs are left as an exercise to the reader.) +.P +Testing for greater-than with 16-bit values is somewhat simpler and is done +with the pair of statements: +.DS L + DO .C <- '\*(vb.A\*(ct.B'~'#0\*(ct#65535' + DO .C <- '&"'.A~.C'~'"\*(vb'\*(vb.C~.C'\*(ct#32768" + ~"#0\*(ct#65535"'"\*(ct".C~.C"'~#1 +.DE +This sets .C (a dummy variable) to #1 if .A > .B, and #0 otherwise. The +expression may be expanded as described above to instead set .C to #1 or +#2. +.P +Note also in statement 220 the occurrence of ~"#65535\*(ct#65535". Although +these operations select the entire value, they are not extraneous, as they +ensure that the forthcoming \*(vbs will be operating on 32-bit values. +.P +In several virtual computed GO TOs the DO FORGET #1 (statement 15 in the +earlier example) has been omitted, since the next transfer of control would +be a DO RESUME #1. By making this a DO RESUME #2 instead, the FORGET may +be forgotten. +.P +In statement 64, note that .2 is STASHed twice by a single statement. This +is perfectly legal. +.P +Lastly, note in statements 243 and 214 respectively, expressions for +shifting 16- and 32-bit variables logically one place to the left. +Statement 231 demonstrates right-shifting for 32-bit variables. +.bp +.H 2 "Program Listing" +.SETR syslib +.DS L +.cs R 24 +.\" CORRECTION: +.\" This is the corrected system library, not the rather buggy original. +.\" Can be semi-mechanically generated from the syslib.i file with +.\" sed syslib.i -e 1d -e '/\$/s//\\*(ct/g' -e '/?/s//\\*(vb/g' | nl | expand + \" but you have to +.\" (a) restore the splat on line 13 DOUBLE OR SINGLE PRECISION OVERFLOW +.\" (b) restore the splat on line 254 PLEASE NOTE .... +.\" (c) appropriately conditionalize lines 289-294 +.\" (d) manually break lines where they wrap + 1 (1000) PLEASE IGNORE .4 + 2 PLEASE ABSTAIN FROM (1005) + 3 (1009) DO STASH .1 + .2 + .5 + .6 + 4 DO .4 <- #1 + 5 DO (1004) NEXT + 6 (1004) PLEASE FORGET #1 + 7 DO .3 <- '\*(vb.1\*(ct.2'~'#0\*(ct#65535' + 8 DO .6 <- '&.1\*(ct.2'~'#0\*(ct#65535' + 9 PLEASE DO .5 <- "\*(vb!6~#32768'\*(ct#1"~#3 + 10 DO (1002) NEXT + 11 DO .4 <- #2 + 12 (1005) DO (1006) NEXT +* 13 (1999) DOUBLE OR SINGLE PRECISION OVERFLOW + 14 (1002) DO (1001) NEXT + 15 (1006) PLEASE FORGET #1 + 16 DO .5 <- '\*(vb"!6~.6'~#1"\*(ct#1'~#3 + 17 DO (1003) NEXT + 18 DO .1 <- .3 + 19 DO .2 <- !6\*(ct#0'~'#32767\*(ct#1' + 20 DO (1004) NEXT + 21 (1003) DO (1001) NEXT + 22 DO REINSTATE (1005) + 23 (1007) PLEASE RETRIEVE .1 + .2 + .5 + .6 + 24 DO REMEMBER .4 + 25 PLEASE RESUME #2 + 26 (1001) DO RESUME .5 + 27 (1010) DO STASH .1 + .2 + .4 + 28 DO .4 <- .1 + 29 DO .1 <- '\*(vb.2\*(ct#65535'~'#0\*(ct#65535' + 30 DO (1020) NEXT + 31 PLEASE DO .2 <- .4 + 32 PLEASE DO (1009) NEXT + 33 DO RETRIEVE .1 + .2 + .4 + 34 PLEASE RESUME #1 + 35 (1020) DO STASH .2 + .3 + 36 DO .2 <- #1 + 37 PLEASE DO (1021) NEXT + 38 (1021) DO FORGET #1 + 39 DO .3 <- "\*(vb!1~.2'\*(ct#1"~#3 + 40 PLEASE DO .1 <- '\*(vb.1\*(ct.2'~'#0\*(ct#65535' + 41 DO (1022) NEXT + 42 DO .2 <- !2\*(ct#0'~'#32767\*(ct#1' + 43 DO (1021) NEXT + 44 (1023) PLEASE RESUME .3 + 45 (1022) DO (1023) NEXT + 46 PLEASE RETRIEVE .2 + .3 + 47 PLEASE RESUME #2 + 48 (1030) DO ABSTAIN FROM (1033) + 49 PLEASE ABSTAIN FROM (1032) + 50 (1039) DO STASH :1 + .5 + 51 DO (1530) NEXT + 52 DO .3 <- :1~#65535 + 53 PLEASE DO .5 <- :1~'#65280\*(ct#65280' + 54 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 + 55 DO (1031) NEXT + 56 (1032) DO (1033) NEXT + 57 DO (1999) NEXT + 58 (1031) DO (1001) NEXT + 59 (1033) DO .4 <- .5 + 60 DO REINSTATE (1032) + 61 PLEASE REINSTATE (1033) + 62 DO RETRIEVE :1 + .5 + 63 PLEASE RESUME #2 + 64 (1040) PLEASE STASH .1 + .2 + .2 + :1 + :2 + :3 + 65 DO .2 <- #0 + 66 DO (1520) NEXT + 67 DO STASH :1 + 68 PLEASE RETRIEVE .2 + 69 DO .1 <- .2 + 70 DO .2 <- #0 + 71 PLEASE DO (1520) NEXT + 72 DO :2 <- :1 + 73 DO RETRIEVE .1 + .2 + :1 + 74 DO (1550) NEXT + 75 PLEASE DO .3 <- :3 + 76 DO RETRIEVE :1 + :2 + :3 + 77 DO RESUME #1 + 78 (1050) PLEASE STASH :2 + :3 + .5 + 79 DO :2 <- .1 + 80 PLEASE DO (1550) NEXT + 81 DO .5 <- :3~'#65280\*(ct#65280' + 82 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 + 83 DO (1051) NEXT + 84 DO (1999) NEXT + 85 (1051) DO (1001) NEXT + 86 DO .2 <- :3 + 87 PLEASE RETRIEVE :2 + :3 + .5 + 88 DO RESUME #2 + 89 (1500) PLEASE ABSTAIN FROM (1502) + 90 PLEASE ABSTAIN FROM (1506) + 91 (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 + 92 DO .1 <- :1~#65535 + 93 PLEASE DO .2 <- :2~#65535 + 94 DO (1009) NEXT + 95 DO .5 <- .3 + 96 PLEASE DO .6 <- .4 + 97 DO .1 <- :1~'#65280\*(ct#65280' + 98 DO .2 <- :2~'#65280\*(ct#65280' + 99 DO (1009) NEXT + 100 DO .1 <- .3 + 101 PLEASE DO (1503) NEXT + 102 DO .6 <- .4 + 103 DO .2 <- #1 + 104 DO (1009) NEXT + 105 DO .1 <- .3 + 106 DO (1501) NEXT + 107 (1504) PLEASE RESUME .6 + 108 (1503) DO (1504) NEXT + 109 (1501) DO .2 <- .5 + 110 DO .5 <- '\*(vb"'&.6\*(ct.4'~#1"\*(ct#2'~#3 + 111 DO (1505) NEXT + 112 (1506) DO (1502) NEXT + 113 PLEASE DO (1999) NEXT + 114 (1505) DO (1001) NEXT + 115 (1502) DO :4 <- .5 + 116 DO (1520) NEXT + 117 DO :3 <- :1 + 118 PLEASE RETRIEVE :1 + .1 + .2 + .3 + .4 + .5 + .6 + 119 DO REINSTATE (1502) + 120 DO REINSTATE (1506) + 121 PLEASE RESUME #3 + 122 (1510) DO STASH :1 + :2 + :4 + 123 DO :1 <- "'\*(vb":2~'#65535\*(ct#0'"\*(ct#65535' + ~'#0\*(ct#65535'"\*(ct"'\*(vb":2~'#0\*(ct#65535' + "\*(ct#65535'~'#0\*(ct#65535'" + 124 DO :2 <- #1 + 125 DO (1509) NEXT + 126 PLEASE RETRIEVE :1 + 127 DO :2 <- :3 + 128 PLEASE DO (1509) NEXT + 129 DO RETRIEVE :2 + :4 + 130 PLEASE RESUME #1 + 131 (1520) PLEASE STASH .3 + .4 + 132 DO .3 <- .1~#43690 + 133 DO (1525) NEXT + 134 PLEASE DO .4 <- 'V.3\*(ct".2~#43690"'~'#0\*(ct#65535' + 135 DO .3 <- .1~#21845 + 136 PLEASE DO (1525) NEXT + 137 DO :1 <- .4\*(ct"'V.3\*(ct".2~#21845"'~'#0\*(ct#65535'" + 138 PLEASE RETRIEVE .3 + .4 + 139 DO RESUME #1 + 140 (1525) DO .3 <- '"'"'"!3\*(ct#0'~'#32767\*(ct#1'"\*(ct#0' + ~'#32767\*(ct#1'"\*(ct#0'~'#16383\*(ct#3'"\*(ct#0' + ~'#4095\*(ct#15' + 141 PLEASE RESUME #1 + 142 (1530) DO STASH :2 + :3 + .3 + .5 + 143 DO :1 <- #0 + 144 DO :2 <- .2 + 145 DO .3 <- #1 + 146 DO (1535) NEXT + 147 (1535) PLEASE FORGET #1 + 148 DO .5 <- "\*(vb!1~.3'\*(ct#1"~#3 + 149 DO (1531) NEXT + 150 DO (1500) NEXT + 151 DO :1 <- :3 + 152 PLEASE DO (1533) NEXT + 153 (1531) PLEASE DO (1001) NEXT + 154 (1533) DO FORGET #1 + 155 DO .3 <- !3\*(ct#0'~'#32767\*(ct#1' + 156 DO :2 <- ":2~'#0\*(ct#65535'"\*(ct"'":2~'#32767 + \*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" + 157 PLEASE DO .5 <- "\*(vb!3~.3'\*(ct#1"~#3 + 158 DO (1532) NEXT + 159 DO (1535) NEXT + 160 (1532) DO (1001) NEXT + 161 PLEASE RETRIEVE :2 + :3 + .3 + .5 + 162 DO RESUME #2 + 163 (1540) PLEASE ABSTAIN FROM (1541) + 164 DO ABSTAIN FROM (1542) + 165 (1549) PLEASE STASH :1 + :2 + :4 + :5 + .1 + .2 + .5 + 166 DO .1 <- :1~#65535 + 167 PLEASE DO .2 <- :2~'#65280\*(ct#65280' + 168 DO .5 <- :1~'#65280\*(ct#65280' + 169 DO (1530) NEXT + 170 DO :3 <- :1 + 171 DO .2 <- :2~#65535 + 172 PLEASE DO (1530) NEXT + 173 DO :5 <- :1 + 174 DO .1 <- .5 + 175 DO (1530) NEXT + 176 DO :4 <- :1 + 177 PLEASE DO :1 <- ":3~'#65280\*(ct#65280'" + \*(ct":4~'#65280\*(ct#65280'" + 178 DO .5 <- ':1~:1'~#1 + 179 DO .2 <- :2~'#65280\*(ct#65280' + 180 DO (1530) NEXT + 181 PLEASE DO .5 <- '"':1~:1'~#1"\*(ct.5'~#3 + 182 DO .1 <- :3~#65535 + 183 DO .2 <- #0 + 184 DO (1520) NEXT + 185 PLEASE DO :2 <- :1 + 186 PLEASE DO .1 <- :4~#65535 + 187 DO (1520) NEXT + 188 DO (1509) NEXT + 189 DO .5 <- !5\*(ct":4~#3"'~#15 + 190 DO :1 <- :3 + 191 DO :2 <- :5 + 192 DO (1509) NEXT + 193 PLEASE DO .5 <- !5\*(ct":4~#3"'~#172 + 194 DO .5 <- '\*(vb"!5~.5'~#1"\*(ct#1'~#3 + 195 PLEASE RETRIEVE :4 + 196 (1541) DO :4 <- .5 + 197 DO (1543) NEXT + 198 (1542) DO (1544) NEXT + 199 PLEASE DO (1999) NEXT + 200 (1543) DO (1001) NEXT + 201 (1544) DO REINSTATE (1541) + 202 PLEASE REINSTATE (1542) + 203 PLEASE RETRIEVE :1 + :2 + :5 + .1 + .2 + .5 + 204 DO RESUME #2 + 205 (1550) DO STASH :1 + :4 + :5 + .5 + 206 DO :3 <- #0 + 207 DO .5 <- '\*(vb"':2~:2'~#1"\*(ct#1'~#3 + 208 PLEASE DO (1551) NEXT + 209 DO :4 <- #1 + 210 PLEASE DO (1553) NEXT + 211 (1553) DO FORGET #1 + 212 DO .5 <- '\*(vb":2~'#32768\*(ct#0'"\*(ct#2'~#3 + 213 DO (1552) NEXT + 214 DO :2 <- ":2~'#0\*(ct#65535'"\*(ct"'":2~'#32767 + \*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" + 215 PLEASE DO :4 <- ":4~'#0\*(ct#65535'"\*(ct"'":4 + ~'#32767\*(ct#0'"\*(ct#0'~'#32767\*(ct#1'" + 216 DO (1553) NEXT + 217 (1552) DO (1001) NEXT + 218 (1556) PLEASE FORGET #1 + 219 DO :5 <- "'\*(vb":1~'#65535\*(ct#0'"\*(ct":2 + ~'#65535\*(ct#0'"'~'#0\*(ct#65535'"\*(ct"' + \*(vb":1~'#0\*(ct#65535'"\*(ct":2~'#0\*(ct + #65535'"'~'#0\*(ct#65535'" + 220 DO .5 <- '\*(vb"'&"':2~:5'~'"'\*(vb"'\*(vb":5~:5 + "~"#65535\*(ct#65535"'~'#65535\*(ct#0'"\*(ct + #32768'~'#0\*(ct#65535'"\*(ct"'\*(vb":5~:5" + ~"#65535\*(ct#65535"'~'#0\*(ct#65535'"'"\*(ct"' + :5~:5'~#1"'~#1"\*(ct#2'~#3 + 221 DO (1554) NEXT + 222 DO :5 <- :3 + 223 DO (1510) NEXT + 224 PLEASE DO :1 <- :3 + 225 DO :3 <- "'V":4~'#65535\*(ct#0'"\*(ct":5~'#65535 + \*(ct#0'"'~'#0\*(ct#65535'"\*(ct"'V":4~'#0 + \*(ct#65535'"\*(ct":5~'#0\*(ct#65535'"'~'#0 + \*(ct#65535'" + 226 DO (1555) NEXT + 227 (1554) PLEASE DO (1001) NEXT + 228 (1555) DO FORGET #1 + 229 DO .5 <- "\*(vb':4~#1'\*(ct#2"~#3 + 230 DO (1551) NEXT + 231 DO :2 <- ":2~'#0\*(ct#65534'"\*(ct":2~'#65535\*(ct#0'" + 232 DO :4 <- ":4~'#0\*(ct#65534'"\*(ct":4~'#65535\*(ct#0'" + 233 PLEASE DO (1556) NEXT + 234 (1551) DO (1001) NEXT + 235 PLEASE RETRIEVE :1 + :4 + :5 + .5 + 236 PLEASE RESUME #2 + 237 (1900) DO STASH .2 + .3 + .5 + 238 DO .1 <- #0 + 239 DO .2 <- #1 + 240 PLEASE DO (1901) NEXT + 241 (1901) DO FORGET #1 + 242 DO %50 .1 <- 'V.1\*(ct.2'~'#0\*(ct#65535' + 243 DO .2 <- !2\*(ct#0'~'#32767\*(ct#1' + 244 PLEASE DO .5 <- "\*(vb!2~.2'\*(ct#1"~#3 + 245 DO (1902) NEXT + 246 DO (1901) NEXT + 247 (1902) DO (1001) NEXT + 248 DO RETRIEVE .2 + .3 + .5 + 249 PLEASE RESUME #2 + 250 (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 + 251 DO .3 <- #65524 + 252 DO :1 <- #6 + 253 DO (1911) NEXT +* 254 PLEASE NOTE THAT YOU CAN'T GET THERE FROM HERE + 255 (1912) DO (1001) NEXT + 256 (1911) DO FORGET #1 + 257 PLEASE DO (1900) NEXT + 258 DO :2 <- .1 + 259 DO (1500) NEXT + 260 PLEASE DO :1 <- :3 + 261 DO .1 <- .3 + 262 DO (1020) NEXT + 263 PLEASE DO .3 <- .1 + 264 DO .5 <- '\*(vb"!3~.3'~#1"\*(ct#2'~#3 + 265 DO (1912) NEXT + 266 DO .1 <- #12 + 267 PLEASE DO (1050) NEXT + 268 DO RETRIEVE .1 + 269 DO (1530) NEXT + 270 DO :2 <- #32768 + 271 DO (1500) NEXT + 272 PLEASE DO .2 <- :3~'#65280\*(ct#65280' + 273 PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + 274 DO RESUME #1 +.cs R +.DE +.bp +.H 2 "Programming Suggestions" +.P +For the novice INTERCAL programmer, we provide here a list of suggested +INTERCAL programming projects: +.P +Write an integer exponentiation subroutine. :1 <- .1 raised to the .2 power. +.P +Write a double-precision sorting subroutine. Given 32-bit array ;1 of size +:1, sort the contents into numerically increasing order, leaving the results +in ;1. +.P +Generate a table of prime numbers. +.P +Put together a floating-point library, using 32-bit variables to represent +floating-point numbers (let the upper half be the mantissa and the lower +half be the characteristic). The library should be capable of performing +floating-point addition, subtraction, multiplication, and division, as well +as the natural logarithm function. +.P +Program a Fast Fourier Transform (FFT). This project would probably entail +the writing of the floating-point library as well as sine and cosine functions. +.P +Calculate, to :1 places, the value of pi. +.if '\*c'y' \{\ +.P +(Working programs for each of these projects are included in the +C-INTERCAL distribution's pit directory of sample code.) \} +.bp +.H 1 "ERROR MESSAGES" +.if '\*c'y' \{\ +.DS I F +Alice felt dreadfully puzzled. The Hatter's remark seemed to her to +have no sort of meaning in it, and yet it was certainly English. "I +don't quite understand you," she said, as politely as she could. +.DE \} +.SETR error_messages +.P +Due to INTERCAL's implementation of comment lines (see section 4.5), most +error messages are produced during execution instead of during compilation. +All errors except those not causing immediate termination of program execution +are treated as fatal. +.H 2 "Format" +.P +All error messages appear in the following form: +.DS L + ICLnnnI (error message) + ON THE WAY TO STATEMENT nnnn + CORRECT SOURCE AND RESUBMIT +.DE +The message varies depending upon the error involved. For undecodable +statements the message is the statement itself. The second line tells +which statement would have been executed next had the error not occurred. +Note that if the error is due to 80 attempted levels of NEXTing, the +statement which would have been executed next need not be anywhere near the +statement causing the error. +.H 2 "Messages" +.P +Brief descriptions of the different error types are listed below according +to message number. +.BL +.LI 000 +An undecodable statement has been encountered in the course of +execution. Note that keypunching errors can be slightly disastrous, +since if 'FORGET' were misspelled F-O-R-G-E-R, the results would +probably not be those desired. Extreme misspellings may have even +more surprising consequences. For example, misspelling 'FORGET' +R-E-S-U-M-E could have drastic results. +.LI 017 +An expression contains a syntax error. +.LI 079 +Improper use has been made of statement identifiers. +.LI 099 +Improper use has been made of statement identifiers. +.LI 123 +Program has attempted 80 levels of NEXTing. +.LI 129 +Program has attempted to transfer to a non-existent line label. +.LI 139 +An ABSTAIN or REINSTATE statement references a non-existent line label. +.LI 182 +A line label has been multiply defined. +.LI 197 +An invalid line label has been encountered. +.LI 200 +An expression involves an unidentified variable. +.LI 240 +An attempt has been made to give an array a dimension of zero. +.LI 241 +Invalid dimensioning information was supplied in defining or using +an array. +.LI 275 +A 32-bit value has been assigned to a 16-bit variable. +.LI 436 +A retrieval has been attempted for an unSTASHed value. +.LI 533 +A WRITE IN statement or interleave (\*(ct) operation has produced a +value requiring over 32 bits to represent. +.LI 562 +Insufficient data. +.LI 579 +Input data is invalid. +.LI 621 +The expression of a RESUME statement evaluated to #0. +.LI 632 +Program execution was terminated via a RESUME statement instead of +GIVE UP. +.LI 633 +Execution has passed beyond the last statement of the program. +.LI 774 +A compiler error has occurred (see section +.GETHN princeton +). +.LI 778 +.ie '\*c'n' \{\ +An unexplainable compiler error has occurred (see J. Lyon or D. Woods)\}. +.el An unexplainable compiler error has occurred. +.LE +.if '\*c'y' \{\ +.P +The following error codes are new in C-INTERCAL: +.BL +.LI 111 +You tried to use a C-INTERCAL extension with the `traditional' flag on. +.LI 127 +Can't find syslib.i file when it's needed for magical inclusion. +.LI 222 +Out of stash space, or attempt to stash an undeclared array. +.LI 333 +Too many variables. +.LI 444 +A COME FROM statement references a non-existent line label. +.LI 555 +More than one COME FROM references the same label. +.LI 666 +Too many source lines. +.LI 777 +No such source file. +.LI 888 +Can't open C output file. +.LI 999 +Can't open C skeleton file. +.LI 998 +Source file name with invalid extension (use .i or .[2-7]i). +.LI 997 +Illegal possession of a controlled unary operator. +.LE \} +.if '\*c'y' \{\ +.H 1 "The C-INTERCAL Compiler" +.if '\*c'y' \{\ +.DS I F +"And yet it was a very clever pudding to invent." +.P +"What did you mean it to be made of?" Alice asked, hoping to cheer him +up, for the poor Knight seemed quite low-spirited about it. +.P +"It began with blotting-paper," the Knight answered with a groan. +.P +"That wouldn't be very nice, I'm afraid --" +.P +"Not very nice \fIalone\fR," he interrupted, quite eagerly, "but +you've no idea what a difference it makes, mixing it with other +things -- such as gunpowder and sealing-wax." +.DE \} +.P +This section describes the use of ick, the C-INTERCAL +compiler. Information specific to the other known INTERCAL compilers +appears in the following sections. These sections are less useful, +since the other compilers are no longer available, but they are +retained to provide a sense of history, and because any information +regarding INTERCAL is really too scarce to discard. +.H 2 "Character Set" +.P +The C-INTERCAL compiler uses ASCII rather than EBCDIC. We follow the +Atari implementation (see section +.GETHN atari +) by (a) replacing the change sign (\*(ct) with +big money ($) as the mingle operator, and (b) replacing the +bookworm (\*(vb) symbol with what (?) as the XOR operator. +.P +Version 0.18 and later versions accept the Latin-1 (ISO 8859-1) +character set, which is a superset of ASCII. As a result, +0xA2 (\*(ct), 0xA3 (quid), and 0xA4 (zlotnik) are accepted as mingle +operators. +.P +Version 0.20 and later versions also accept UTF-8 as an alternative +to Latin-1. The above three currency operators will be accepted in +either Latin-1 or UTF-8 format. UTF-8 format is required if you +wish to use any of EURO-CURRENCY SIGN, COLON SIGN (that's Costa Rican dinero, +not the Intercal two-spot), +CRUZEIRO SIGN, FRENCH FRANC SIGN, LIRA SIGN, MILL SIGN, NAIRA SIGN, +PESETA SIGN, RUPEE SIGN, WON SIGN, NEW SHEQEL SIGN, DONG SIGN, EURO SIGN, +BENGALI RUPEE MARK, BENGALI RUPEE SIGN, or THAI CURRENCY SYMBOL BAHT. +(Isn't internationalization wonderful?) +Furthermore, you can use the Intercal character FOR ALL to represent +the what operator. +.H 2 "Usage and Compilation Options" +.P +To compile an INTERCAL program `foo.i' to executable code, just do + + ick foo.i + +There's a -c option that leaves the generated C code in place for +inspection (suppressing compilation to machine code), a -d option that +enables verbose parse reporting from the yacc/bison parser, a -t +option that requires strict INTERCAL-72 compliance (rejecting COME +FROM and the extensions for bases other than two), a -b option that +disables the INTERCAL-72 random-bug feature (error 774), and an -O option +that enables the (hah!) optimizer. Invoking ick -? prints a usage +message. +.P +Another compilation switch affects C-INTERCAL's runtime behavior. The `-C' +option forces output in "clockface" mode, for superstitious users who +believe writing "IV" upside-down offends IVPITER and would rather +see IIII. +.H 2 "Runtime Options" +.P +Every C-INTERCAL runtime also accepts certain options at runtime. +These include [+/-]help, [+/-]traditional, and [+/-]wimpmode. +The help option (with either + or -) triggers a 'usage' message. The ++traditional option is presently a no-op. +.P +Steve explains: "The wimpmode option is the most interesting. I found +myself always running my test programs with filters on both ends to +work around the \&'nifty' INTERCAL number representations. This was so +painful that I decided it would be \fIless\fR painful (and a lot less +code) if I added a 'wimp' option. With the +wimpmode option, the user +is subjected to a humiliating message about what a wimp he or she is +to use this mode, but after that is allowed to use conventional +numerical notation. While such a mode doubtless violates to some +extent the INTERCAL philosophy, the fact that an 'unbutcher' command +has been posted clearly indicates the need for it. Anyway ... if you +don't like it, don't use it ... the default is -wimpmode +(i.e. \fInot\fR wimp mode)." +.H 2 "PLEASE Politesse Checking" +.P +A feature of INTERCAL-72 not documented in the original manual was that it +required a certain level of politesse from the programmer. If fewer than +1/5th of the program statements included the PLEASE qualifier, the program +would be rejected as insufficiently polite. If more than 1/3rd of them +included PLEASE, the program would be rejected as excessively polite. +.P +This check has been implemented in C-INTERCAL. To assist programmers in +coping with it, the intercal.el mode included with the distribution randomly +expands "do " in entered source to "PLEASE DO" 1/4th of the time. +.H 2 "Localization: Ancient Roman" +Version 0.18 and later versions of C-Intercal have been +localized for Ancient Roman as well as English-speaking locales. +This means that Latin-language keywords are accepted as equivalents +for the English-based ones traditionally used. +See src/lexer.l for details, as we do not propose to break +Priscian's head (publicly expose our ignorance of Latin) here. \} +.if '\*c'y' \{\ +.\" This is the same text as the ATARI NOTES at the end of the manual. +.H 1 "The Atari Implementation" +.if '\*c'y' \{\ +.DS I F +"Perhaps it doesn't understand English," thought Alice. "I daresay +it's a French mouse, come over with William the Conqueror." (For, with +all her knowledge of history, Alice had no very clear notion how long +ago anything had happened.) +.DE \} +.SETR atari +.P +The Atari implementation of INTERCAL differs from the original Princeton +version primarily in the use of ASCII rather than EBCDIC. Since there is no +"change" sign (\*(ct) in ASCII, we have substituted the "big money" ($) as the +mingle operator. We feel that this correctly represents the increasing cost +of software in relation to hardware. (Consider that in 1970 one could get +RUNOFF for free, to run on a $20K machine, whereas today a not quite as +powerful formatter costs $99 and runs on a $75 machine.) We also feel that +there should be no defensible contention that INTERCAL has any sense. +Also, since overpunches are difficult to read on the average VDT, the +exclusive-or operator may be written ?. This correctly expresses the +average person's reaction on first encountering exclusive-or, especially on +a PDP-11. Note that in both of these cases, the over-punched symbol may +also be used if one is masochistic, or concerned with portability to the +Princeton compiler. The correct over-punch for "change" is "c/" +and the correct over-punch for \*(vb is "V-". These codes will be +properly printed if you have a proper printer, and the corresponding EBCDIC +code will be produced by the /IBM option on the LIST command. \} +.if '\*c'n' \{\ +.H 1 "JCL" +.SETR princeton +.P +The information contained in the following section applies +only to the Princeton compiler, run under OS/360. +.H 2 "The Princeton Compiler" \} +.if '\*c'y' \{\ +.H 1 "The Princeton Compiler" +.DS I F +"My name is Alice, so please your Majesty," said Alice very politely; +but she added, to herself, "Why, they're only a pack of cards, after +all. I needn't be afraid of them!" +.DE \} +.SETR princeton +.P +The Princeton compiler, written in SPITBOL (a variant of +SNOBOL), performs the compilation in two stages. First the +INTERCAL source is converted into SPITBOL source, then the +latter is compiled and executed. +.P +It should be noted that the Princeton compiler fails to +properly interpret certain multiply-subscripted expressions, +such as: +.DS + ",1SUB",2SUB#1"#2" +.DE +.P +This is not a "bug". Being documented, it is merely a +"restriction". Such cases may be resolved by alternating +sparks and ears in various levels of expression nesting: +.DS + ",1SUB',2SUB#1'#2" +.DE +which is advisable in any case, since INTERCAL expressions +are unreadable enough as is. +.P +Since there is currently no catalogued procedure for +invoking the compiler, the user must include the in-line +.\" CORRECTION: +.\" "in Figure 3" was "on the following page" +procedure shown in Figure 3 in his job before the +compilation step. Copies of this in-line procedure may be +obtained at any keypunch if the proper keys are struck. +.P +The compiler is then executed in the usual manner: +.DS L + + // EXEC INTERCAL[,PARM='parameters'] + //COMPILE.SYSIN DD * + {INTERCAL source deck} + /* + //EXECUTE.SYSWRITE DD * + {input data} + /* + +.DE +The various parameters are described following the in-line +procedure. At most one parameter from each set may apply to +a given compilation; if more than one are specified, the +results are undefined, and may vary depending upon the +particular set of options. The default parameters are +.if n \{\ +underlined.\} +.if t \{\ +italicized.\} +.\" CORRECTION: +.\" In the original, the footnote was on the wrong line (one above). +.DS L + //INTERCAL PROC + //COMPILE EXEC PGM=INTERCAL + //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR + // DD DSN=SYS1.FORTLIB,DISP=SHR + //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) + //SYSPUNCH DD DUMMY + //SCRATCH DD DSN=&COMPSET,UNIT=SYSDA,SPACE=(CYL,(3,1)),DISP=(,PASS) + //EXECUTE EXEC PGM=EXECUTE,COND=(4,LT) + //SOURCES DD DSN=U.INTERCAL.SOURCES,DISP=SHR \*F + //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR + // DD DSN=SYS5.SPITLIB,DISP=SHR + // DD DSN=SYS1.FORTLIB,DISP=SHR + //SYSIN DD DSN=&COMPSET,DISP=(OLD,DELETE) + //SYSOBJ DD SYSOUT=B,DCB=(BLKSIZE=80,LRECL=80,RECFM=F) + //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) + //SYSPUNCH DD DUMMY + // PEND +.DE +.FS +Pending acquisition of SPITBOL release 3.0, the SOURCES +DD card must be replaced by the five cards: +.DS L + //NOOPTPFX DD DSN=U.INTERCAL.SOURCES(NOOPTPFX),DISP=SHR + //NOOPTSUB DD DSN=U.INTERCAL.SOURCES(NOOPTSUB),DISP=SHR + //OPTPFX DD DSN=U.INTERCAL.SOURCES(OPTPFX),DISP=SHR + //OPTSUB DD DSN=U.INTERCAL.SOURCES(OPTSUB),DISP=SHR + //PRELIM DD DSN=U.INTERCAL.SOURCES(PRELIM),DISP=SHR +.DE +.FE +.ce 1 +Figure 3. Inline procedure for using INTERCAL. +.P +.LB 5 0 " " 0 * 0 0 +.LI "\fIOPT\fR" +.LI "NOOPT" +.LI " " +In the default mode, the compiler will print a +list of all options in effect, including the +defaults for unspecified parameter groups and the +effective option for those sets where one was +specified. If NOOPT is requested, it causes the +default mode to be assumed. + +.LI "\fIOPTSUB\fR" +.LI "NOOPTSUB" +.LI "NOSUB" +.LI " " +Unless 'NOOPTSUB' is requested, the System Library +is optimized, resulting in much more rapid +processing of function calls. Specifying NOOPTSUB +causes the non-optimized INTERCAL code shown in section +.GETHN syslib + to be used, whereas NOSUB requests +that the System Library be omitted altogether. + +.LI IAMBIC +.LI "\fIPROSE\fR" +.LI " " +The IAMBIC parameter permits the programmer to use +poetic license and thus write in verse. If the +reader does not believe it possible to write verse +in INTERCAL, he should send the authors a stamped, +self-addressed envelope, along with any INTERCAL +program, and they will provide one which is verse. + +.LI "\fIFORMAT\fR" +.LI NOFORMAT +.LI " " +In FORMAT mode, each statement printed is put on a +separate line (or lines). In NOFORMAT mode, the +free-format source is printed exactly as input. +In this latter case, statement numbers are +provided only for the first statement on a card, +and they may be only approximate. Also, +unrecognizable statements are not flagged. + +.LI SEQ +.LI "\fINOSEQ\fR" +.LI " " +If the source deck has sequence numbers in columns +73 through 80, specifying 'SEQ' will cause them to +be ignored. + +.LI "SOURCE" +.LI "\fINOSOURCE\fR" +.LI " " +If NOSOURCE is selected, all source listing is +suppressed. + +.LI LIST +.LI "\fINOLIST\fR" +.LI " " +If LIST is specified, the compiler will provide a +list of statement numbers catalogued according to +type of statement. The compiler uses this table +to perform abstentions by gerund. + +.LI "WIDTH=nn" +.LI " " +This sets the width (in number of characters) of +the output line for FORMAT mode output. The +default is +.B 132. + +.LI "CODE" +.LI "\fINOCODE\fR" +.LI " " +Include 'CODE' in the parameter list to obtain a +listing of the SPITBOL code produced for each +INTERCAL statement. + +.LI "LINES=nn" +.LI " " +This determines the number of lines per page, +during both compilation and execution. The +default is +.B 60. + +.LI DECK +.LI "\fINODECK\fR" +.LI " " +Selecting 'DECK' will cause the compiler to punch +out a SPITBOL object deck which may then be run +without reinvoking the INTERCAL (or SPITBOL) +compiler. + +.LI "\fIKIDDING\fR" +.LI NOKIDDING +.LI " " +Select NOKIDDING to eliminate the snide remarks +which ordinarily accompany INTERCAL error +messages. + +.LI "\fIGO\fR" +.LI NOGO +.LI " " +Specifying 'NOGO' will cause the program to be +compiled but not executed. EXECUTE/NOEXECUTE may +be substituted for GO/NOGO, but this will result +in an error, and GO will be assumed. + +.LI "\fIBUG\fR" +.LI NOBUG +.LI " " +Under the default, there is a fixed probability of +a fatal compiler bug being worked at random into +the program being compiled. Encountering this bug +during execution results in error message 774 (see +section +.GETHN error_messages +). This probability is reduced to zero +under 'NOBUG'. This does not affect the +probability (presumably negligible) of error +message 778. +.LE +.H 2 "Other INTERCAL Compilers" +.P +There are no other INTERCAL compilers. \*F +.FS +This assertion in the INTERCAL-72 manual was blatantly contradicted by +some notes on an Atari implementation included at the end of the manual. +So, you expect compiler manuals to be consistent? +.FE +.ds App TONSIL +.APP "A\*F" "" +.if '\*c'y' \{\ +.DS I F +"Of course they answer to their names?" the Gnat remarked carelessly. +.P +"I never knew them to do it." +.P +"What's the use of their having names," the Gnat said, "if they wo'n't +answer to them?" +.P +"No use to \fIthem\fR," said Alice; "but it's useful to the people +that name them, I suppose. If not, why do things have names at all?" +.P +"I ca'n't say," the Gnat replied. "Further on, in the wood down there, +they've got no names -- however, go on with your list...." +.DE \} +.P +The Official INTERCAL Character Set +.FS +Since all other reference manuals have Appendices, it was decided that +the INTERCAL manual should contain some other type of removable organ. +.FE +.ps \n[@ps] +.\".nr * \n*+1 +.nr PG \n%+1 +.P +Tabulated on page \n(PG are all the characters used in INTERCAL, excepting +letters and digits, along with their names and interpretations. Also +included are several characters not used in INTERCAL, which are presented +for completeness and to allow for future expansion. +.\" All we're doing here is evaluating \*F and throwing it away +.fi \*F +.FS +This footnote intentionally unreferenced. +.FE +.ds CH - % - +.bp +.\".nr * \n*-1 +.ps \n[@ps] +.ie '\*c'n' \{\ +.TS +box; +c c c +l l l. +Character Name Use (if any) +\&. spot identify 16-bit variable +: two-spot identify 32-bit variable +, tail identify 16-bit array +; hybrid identify 32-bit array +# mesh identify constant +\&= half-mesh +\' spark grouper +` backspark +! wow equivalent to spark-spot +? what \fIunary exlusive OR (ASCII)\fR +" rabbit-ears grouper +\o'".' rabbit equivalent to ears-spot +| spike +% double-oh-seven percentage qualifier +\- worm used with angles +< angle used with worms +> right angle +( wax precedes line label +) wane follows line label +[ U turn +] U turn back +{ embrace +} bracelet +* splat flags invalid statements +& ampersand \*F unary logical AND +V V (or book) unary logical OR +\*(vb bookworm (or universal qualifier) unary exclusive OR +$ big money \fIbinary mingle (ASCII)\fR +\*(ct change binary mingle +~ sqiggle binary select +\&_ flat worm +\*(ov overline indicates "times 1000" ++ intersection separates list items +/ slat +\e backslat +@ whirlpool +\*(no hookworm +^ shark (or simply sharkfin) +\o"#*\(sq" blotch +.if '\*c'y' \{\ +\*(de bunghole +\*(rg name grabber +\*(mu andrew cross +\*(di norwegian minus +\*(co text grabber +\*(sc swash +\*(*m microscope +\*(+- interworm +\*(no half turn +0xA3 quid binary mingle +0xA4 zlotnik binary mingle +\} +.TE \} +.el \{\ +.TS +box; +c c c +l l l. +Character Name Use (if any) +\&. spot identify 16-bit variable +: two-spot identify 32-bit variable +, tail identify 16-bit array +; hybrid identify 32-bit array +# mesh identify constant +\&= half-mesh +\' spark grouper +` backspark +! wow equivalent to spark-spot +? what unary logical XOR +" rabbit-ears grouper +\o'".' rabbit equivalent to ears-spot +| spike +% double-oh-seven percentage qualifier +\- worm used with angles +< angle used with worms +> right angle +( wax precedes line label +) wane follows line label +[ U turn +] U turn back +{ embrace +} bracelet +* splat flags invalid statements +& ampersand \*F unary logical AND +V V (or book) unary logical OR +\*(vb bookworm (universal qualifier) unary logical XOR (INTERCAL-72) +$ big money binary mingle +\*(ct change binary mingle (INTERCAL-72) +~ sqiggle binary select +\&_ flat worm +\*(ov overline indicates "times 1000" ++ intersection separates list items +/ slat +\e backslat +@ whirlpool unary logical BUT (TriINTERCAL) +\*(no hookworm +^ shark (or simply sharkfin) unary logical XOR (TriINTERCAL) +\o"#*\(sq" blotch +.if '\*c'y' \{\ +\*(de bunghole +\*(rg name grabber +\*(mu andrew cross +\*(di norwegian minus +\*(co text grabber +\*(sc swash +\*(*m microscope +\*(+- interworm +\*(no half turn +0xA3 quid binary mingle +0xA4 zlotnik binary mingle +\} +.TE \} +.ce 1 +Table 2 (top view). INTERCAL character set. +.FS +Got any better ideas? +.FE +.ps \n[@ps] +.if '\*c'n' \{\ +.APP "B" "NOTES ON THE ATARI IMPLEMENTATION" +.P +The Atari implementation of INTERCAL differs from the original Princeton +.ds CH INTERCAL +version primarily in the use of ASCII rather than EBCDIC. Since there is no +"change" sign (\*(ct) in ASCII, we have substituted the "big money" ($) as the +mingle operator. We feel that this correctly represents the increasing cost +of software in relation to hardware. (Consider that in 1970 one could get +RUNOFF for free, to run on a $20K machine, whereas today a not quite as +powerful formatter costs $99 and runs on a $75 machine.) We also feel that +there should be no defensible contention that INTERCAL has any sense. +Also, since overpunches are difficult to read on the average VDT, the +exclusive-or operator may be written ?. This correctly expresses the +average person's reaction on first encountering exclusive-or, especially on +a PDP-11. Note that in both of these cases, the over-punched symbol may +also be used if one is masochistic, or concerned with portability to the +Princeton compiler. The correct over-punch for "change" is "c/" +and the correct over-punch for \*(vb is "V-". These codes will be +properly printed if you have a proper printer, and the corresponding EBCDIC +code will be produced by the /IBM option on the LIST command. \} diff --git a/djfix.bat b/etc/ctrlmfix.bat similarity index 74% rename from djfix.bat rename to etc/ctrlmfix.bat index c05cd75..5483fb3 100755 --- a/djfix.bat +++ b/etc/ctrlmfix.bat @@ -1,8 +1,10 @@ @echo off rem This is a script to remove trailing ^Ms that might otherwise get into files rem when running under DJGPP, to prevent the files being unusable on Unix. +rem Likewise, it adds trailing ^Ms to .bat files so they run under DOS shells. -dtou *.txt + +dtou *.* dtou etc\intercal.el dtou src\*.c dtou src\*.h @@ -15,3 +17,4 @@ dtou pit\tests\*.doc dtou pit\tests\*.i dtou pit\lib\*.doc dtou pit\lib\*.i +utod *.bat diff --git a/djfix.sh b/etc/ctrlmfix.sh similarity index 78% rename from djfix.sh rename to etc/ctrlmfix.sh index cc8e946..f04222d 100755 --- a/djfix.sh +++ b/etc/ctrlmfix.sh @@ -1,17 +1,20 @@ -#!/bin/sh -# This is a script to remove trailing ^Ms that might otherwise get into files -# when running under DJGPP, to prevent the files being unusable on Unix. - -dtou *.txt -dtou etc/intercal.el -dtou src/*.c -dtou src/*.h -dtou src/*.l -dtou src/*.y -dtou src/*.sh -dtou pit/*.doc -dtou pit/*.i -dtou pit/tests/*.doc -dtou pit/tests/*.i -dtou pit/lib/*.doc -dtou pit/lib/*.i +#!/bin/sh +# This is a script to remove trailing ^Ms that might otherwise get into files +# when running under DJGPP, to prevent the files being unusable on Unix. +# Likewise, it adds trailing ^Ms to .bat files so they run under DOS shells. + + +dtou *.* +dtou etc/intercal.el +dtou src/*.c +dtou src/*.h +dtou src/*.l +dtou src/*.y +dtou src/*.sh +dtou pit/*.doc +dtou pit/*.i +dtou pit/tests/*.doc +dtou pit/tests/*.i +dtou pit/lib/*.doc +dtou pit/lib/*.i +utod *.bat diff --git a/ickspec b/ickspec index 704c76f..f2b4d59 100644 --- a/ickspec +++ b/ickspec @@ -1,60 +1,60 @@ -Name: intercal -Version: 0.26 -Release: 1 -URL: http://www.catb.org/~esr/intercal/ -Source: intercal-0.26.tar.gz -License: GPL -Group: Development/Languages -Summary: the language that kills the weak and drives mad the strong -BuildRoot: %{_tmppath}/%{name}-root - -%description -An implementation of the language INTERCAL, legendary for -its perversity and horribleness (this version adds COME FROM -for extra flavor). Comes with language manual and examples -including possibly the entire extant body of INTERCAL code. -Now supports i18n and l14n (to Ancient Roman locale only) -Now with fix patch by Donald Knuth. - -%prep -%setup -q - -%build -configure --prefix=/usr -make - -%clean -[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" - -%install -[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" -mkdir -p "$RPM_BUILD_ROOT"%{_bindir} -cp ick coopt.sh "$RPM_BUILD_ROOT"%{_bindir} -mkdir -p "$RPM_BUILD_ROOT"%{_libdir} -cp libick.a "$RPM_BUILD_ROOT"%{_libdir} -cp libickmt.a "$RPM_BUILD_ROOT"%{_libdir} -cp libyuk.a "$RPM_BUILD_ROOT"%{_libdir} -mkdir -p "$RPM_BUILD_ROOT"%{_includedir}/intercal-0.26 -cp lose.h abcess.h fiddle.h yuk.h "$RPM_BUILD_ROOT"%{_includedir}/intercal-0.26 - -%files -%doc README BUGS NEWS -%{_bindir}/ick -%{_libdir}/libick.a -%{_libdir}/libickmt.a -%{_libdir}/libyuk.a -%{_includedir}/intercal-0.26/lose.h -%{_includedir}/intercal-0.26/abcess.h -%{_includedir}/intercal-0.26/fiddle.h -%{_includedir}/intercal-0.26/yuk.h - -%changelog -* Wed Dec 31 2003 Eric S. Raymond 0.24-1 -- Non-root users can now build RPMs. - -# The following sets edit modes for GNU EMACS -# Local Variables: -# mode:rpm-spec -# End: - - +Name: intercal +Version: 1.26 +Release: 1 +URL: http://www.catb.org/~esr/intercal/ +Source: ick-1.26.tgz +License: GPL +Group: Development/Languages +Summary: the language that kills the weak and drives mad the strong +BuildRoot: %{_tmppath}/%{name}-root + +%description +An implementation of the language INTERCAL, legendary for +its perversity and horribleness (this version adds COME FROM +for extra flavor). Comes with language manual and examples +including possibly the entire extant body of INTERCAL code. +Now supports i18n and l14n (to Ancient Roman locale only) +Now with fix patch by Donald Knuth. + +%prep +%setup -q + +%build +configure --prefix=/usr +make + +%clean +[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" + +%install +[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" +mkdir -p "$RPM_BUILD_ROOT"%{_bindir} +cp ick coopt.sh "$RPM_BUILD_ROOT"%{_bindir} +mkdir -p "$RPM_BUILD_ROOT"%{_libdir} +cp libick.a "$RPM_BUILD_ROOT"%{_libdir} +cp libickmt.a "$RPM_BUILD_ROOT"%{_libdir} +cp libyuk.a "$RPM_BUILD_ROOT"%{_libdir} +mkdir -p "$RPM_BUILD_ROOT"%{_includedir}/intercal-1.26 +cp lose.h abcess.h fiddle.h yuk.h "$RPM_BUILD_ROOT"%{_includedir}/intercal-1.26 + +%files +%doc README BUGS NEWS +%{_bindir}/ick +%{_libdir}/libick.a +%{_libdir}/libickmt.a +%{_libdir}/libyuk.a +%{_includedir}/intercal-1.26/lose.h +%{_includedir}/intercal-1.26/abcess.h +%{_includedir}/intercal-1.26/fiddle.h +%{_includedir}/intercal-1.26/yuk.h + +%changelog +* Wed Dec 31 2003 Eric S. Raymond 0.24-1 +- Non-root users can now build RPMs. + +# The following sets edit modes for GNU EMACS +# Local Variables: +# mode:rpm-spec +# End: + + diff --git a/makeick.bat b/makeick.bat index 08d6b7b..24d2efc 100755 --- a/makeick.bat +++ b/makeick.bat @@ -1,66 +1,70 @@ -@echo off - -rem C-INTERCAL 0.25 compilation batch file for DJGPP. - -rem This code will attempt to recompile the parser and lexer using -rem bison and flex. If you don't have them, you will get an error -rem message and the parser and lexer included with the distribution -rem will be used. My DJGPP distribution seems to require that you -rem copy DJDIR\bin\m4.exe to the temp subdir of the INTERCAL -rem distribution or bison won't work; YMMV. - -copy /y src\*.* temp -cd temp -bison -d -oparser.c parser.y -flex -olexer.c lexer.l - -rem If you don't care about being able to debug ick, use -rem set CFLAGS=-s -O2 -DICKNOSEARCH -W -Wall -set CFLAGS=-gstabs+ -O2 -DICKNOSEARCH -W -Wall - -rem Set this to a location of the GNU GPL on your system... -set COPYLOC=C:\DJGPP\COPYING -rem ...and this to the same thing, but within "s and with backslashes doubled. -set COPYLOCC="C:\\DJGPP\\COPYING" - -if not exist %COPYLOC% goto :error -echo Compiling... - -gcc -c %CFLAGS% parser.c -gcc -c %CFLAGS% lexer.c -gcc -c %CFLAGS% feh2.c -gcc -c %CFLAGS% dekludge.c -gcc -c %CFLAGS% perpet.c -gcc -c %CFLAGS% cesspool.c -gcc -c %CFLAGS% numerals.c -gcc -c %CFLAGS% unravel.c -gcc -c %CFLAGS% fiddle.c -gcc -c %CFLAGS% arrgghh.c -gcc -c %CFLAGS% lose.c -gcc -c %CFLAGS% -DYUKCOPYLOC=\"%COPYLOCC%\" yuk.c -ar cr libick.a cesspool.o numerals.o fiddle.o arrgghh.o lose.o -ranlib libick.a -ar cr libickmt.a cesspool.o numerals.o fiddle.o arrgghh.o lose.o unravel.o -ranlib libickmt.a -ar cr libyuk.a yuk.o -ranlib libyuk.a -gcc %CFLAGS% -oickmain.exe parser.o lexer.o perpet.o feh2.o dekludge.o lose.o fiddle.o -copy /y ickmain.exe ..\bin -copy /y *.a ..\lib -cd .. -copy /y src\ick-wrap.c lib -copy /y src\pickwrap.c lib -copy /y pit\lib\syslib.i lib -copy /y pit\lib\syslib.?i lib -copy /y src\fiddle.h include -copy /y src\abcess.h include -copy /y src\lose.h include -copy /y src\yuk.h include -copy /y src\ick.bat bin -echo Compilation complete unless there were errors. -goto :end -:error -echo You need to tell this batch file where the GNU GPL is on your system. -echo Please edit this batch file and set COPYLOC to a correct location. -echo (You can point it to the copy of COPYING.txt provided.) +@echo off + +rem C-INTERCAL 0.25 compilation batch file for DJGPP. + +rem This code will attempt to recompile the parser and lexer using +rem bison and flex. If you don't have them, you will get an error +rem message and the parser and lexer included with the distribution +rem will be used. My DJGPP distribution seems to require that you +rem copy DJDIR\bin\m4.exe to the temp subdir of the INTERCAL +rem distribution or bison won't work; YMMV. + +if not exist makeick.bat goto :direrror + +copy /y src\*.* temp +cd temp +bison -d -oparser.c parser.y +flex -olexer.c lexer.l + +rem If you don't care about being able to debug ick, use +rem set CFLAGS=-s -O2 -DICKNOSEARCH -W -Wall +set CFLAGS=-gstabs+ -O2 -DICKNOSEARCH -W -Wall + +rem Set this to a location of the GNU GPL on your system... +set COPYLOC=C:\DJGPP\COPYING +rem ...and this to the same thing, but within "s and with backslashes doubled. +set COPYLOCC="C:\\DJGPP\\COPYING" + +if not exist %COPYLOC% goto :error +echo Compiling... + +gcc -c %CFLAGS% parser.c +gcc -c %CFLAGS% lexer.c +gcc -c %CFLAGS% feh2.c +gcc -c %CFLAGS% dekludge.c +gcc -c %CFLAGS% perpet.c +gcc -c %CFLAGS% cesspool.c +gcc -c %CFLAGS% numerals.c +gcc -c %CFLAGS% unravel.c +gcc -c %CFLAGS% fiddle.c +gcc -c %CFLAGS% arrgghh.c +gcc -c %CFLAGS% lose.c +gcc -c %CFLAGS% -DYUKCOPYLOC=\"%COPYLOCC%\" yuk.c +ar cr libick.a cesspool.o numerals.o fiddle.o arrgghh.o lose.o +ranlib libick.a +ar cr libickmt.a cesspool.o numerals.o fiddle.o arrgghh.o lose.o unravel.o +ranlib libickmt.a +ar cr libyuk.a yuk.o +ranlib libyuk.a +gcc %CFLAGS% -oick.exe parser.o lexer.o perpet.o feh2.o dekludge.o lose.o fiddle.o +copy /y ick.exe ..\bin +copy /y *.a ..\lib +cd .. +copy /y src\ick-wrap.c lib +copy /y src\pickwrap.c lib +copy /y pit\lib\syslib.i lib +copy /y pit\lib\syslib.?i lib +copy /y src\fiddle.h include +copy /y src\abcess.h include +copy /y src\lose.h include +copy /y src\yuk.h include +echo Compilation complete unless there were errors. +goto :end +:error +echo You need to tell this batch file where the GNU GPL is on your system. +echo Please edit this batch file and set COPYLOC to a correct location. +echo (You can point it to the copy of COPYING.txt provided.) +goto :end +:direrror +echo Please run this batch file from its own directory. :end \ No newline at end of file diff --git a/makeick.sh b/makeick.sh index f9ba3a6..e4551ee 100755 --- a/makeick.sh +++ b/makeick.sh @@ -55,8 +55,8 @@ ar cr libickmt.a cesspool.o numerals.o fiddle.o arrgghh.o lose.o unravel.o ranlib libickmt.a ar cr libyuk.a yuk.o ranlib libyuk.a -gcc ${CFLAGS} -oickmain.exe parser.o lexer.o perpet.o feh2.o dekludge.o lose.o fiddle.o -cp ickmain.exe ../bin +gcc ${CFLAGS} -oick.exe parser.o lexer.o perpet.o feh2.o dekludge.o lose.o fiddle.o +cp ick.exe ../bin cp *.a ../lib cd .. cp src/ick-wrap.c lib @@ -67,5 +67,4 @@ cp src/fiddle.h include cp src/abcess.h include cp src/lose.h include cp src/yuk.h include -cp src/ick.bat bin echo Compilation complete unless there were errors. \ No newline at end of file diff --git a/pit/CATALOG b/pit/CATALOG index 316d4fd..68c9bc1 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -1,134 +1,134 @@ -This is the directory of programs written in INTERCAL. Most of these -are no doubt full of bugs. Don't complain, you're lucky if anything -written in INTERCAL works at all. - -The subdirectory lib contains code fragments that are not complete -programs. - -Contents: - -from original manual: - sample.i Returns absolute value of a 16-bit 2s-complement number - lib/syslib.i Standard library, with bugs fixed - lib/syslib-orig.i Standard library (original buggy version) - -by Jon Blow - tests/sink.i Simple test program - random.i Random number program - lib/plus.i Increment .1 - -by Hans Olsson - lib/1910.doc Listing of a random number routine. Hans said he wrote this - because he couldn't find (1910) in the system library, but - it's there in our lib/syslib.i. We keep this around as an - example. (What? Throw away INTERCAL code? Perish the thought!) - -by Louis Howell - life.i Conway's game of Life, standard INTERCAL version - life2.i This version uses COME FROM and character output - blinkers - t_tet - glider - gun Input files for both Life programs - bubble.i Bubble sort - icat.i Sends input to output - lib/lib2.i New library routines: decrement, decrement and branch on 0, - add bit, 16-bit division with remainder, exponentiation - pi.i Calculate pi - primes.i Find prime numbers - pow.i Prints a list of nth powers using old exponentiation routine - lib/syslib.i Corrected version of system library - iching1.i Generates I Ching hexagrams - iching2.i This version uses a lookup table to find the sequence number - iching.doc Description of the two I Ching programs - change.i Count up different ways to make change - change.doc Description of change.i - -by Matt Dimeo - beer.i Print out the lyrics to "99 Bottles of Beer On The Wall" - -by Stinglai Ka'abi : - random2.i Another random-number generator - -by Jacob Mandelson - rot13.i Prints ROT-13 of its input - -by Jan-Pieter Cornet - hail_mary.3i Print 1,000,000 Hail Marys - tests/count.3i Count from 1 to 10 in TriINTERCAL - tests/iogerunds.i Demonstrate gerund abstention - -by Clemens Meier - rot13b.i Another ROT-13 program - -By Brian Raiter - lib/numio.i I/O routines - lib/numio.doc Description of the I/O routines - lib/syslib.3i - lib/syslib.4i - lib/syslib.5i - lib/syslib.6i Translations of the standard library to - lib/syslib.7i C-INTERCAL's other bases. - lib/syslib3-7.doc Documentation for same - hello.i The traditional hello world program - ins.i Intersections & Splats, a Mastermind-style game - ins.doc Documentation for I&S - yapp.i Prints an INTERCAL program that prints - yapp.doc Description of yapp.i - quine.i Prints itself - lib/floatlib.i Floating-point routines - lib/floatlib.doc Documentation for the floating-point routines - flonck.i An RPN calculator - flonck.doc Documentation for flonck.i - fft.i Fast Fourier Transform - fft.doc Description of fft.i - delta.fft - tophat.fft Sample input for FFT - -by Donald Knuth - tpk.i Don Knuth's implementation of the TPK algorithm - tpk.doc Don's note about the algorithm - -The subdirectory tests contains some programs written only to test the -compiler. - -by David Moews - tests/test1.i Prints DO THIS TEST HAS BEEN SUCCESSFULLY COMPLETED - tests/test2.i Reads in two numbers and multiplies their product - -David Moews wrote of the latter (test2.i): - -The following program reads in two numbers and then prints their product. -It consists of a trivial calling program followed by a cleaned-up version -of a portion of the INTERCAL subroutine library. (Only a portion of -the INTERCAL subroutine library is present in the posted manual, and -that portion is full of typos.) - -by Alex Smith - tests/ais1.i A very simple test program - tests/ais2.i A demonstration of computed ABSTAIN's power - tests/compucome.i A program to test computed COME FROM - tests/onceagain.i A single-threaded program testing ONCE and AGAIN - tests/arrtest.i A program to test some changes I made to the grammar - tests/arrtest.doc The history behind those changes - tests/permute.i A permutation-printing program to test backtracking - tests/permute.doc Information about the permutation-printer - sort.i An insertion-sort program testing computed ABSTAIN - -by Malcom Ryan - tests/testonce.i A single-threaded program testing ONCE and AGAIN - pass.i A multithread program illustrating communications - between threads - -The programs test16bit.i, testarray.i, testcf.i, testlib2.i, mult.i, -limits.{i,3i}, testops.{3i,5i}, testsplat.i, were all written by Louis -Howell. Of these, testcf.i might be considered an interesting -puzzle---try to figure out what it's doing. The others are pretty -boring, but are included as diagnostics and because so few other -example programs exist. Not all of these even produce interesting -diagnostic output; it may be necessary to look at the degenerated C -code to determine if the compiler is doing the right thing. - - -End of file CATALOG -------------------- +This is the directory of programs written in INTERCAL. Most of these +are no doubt full of bugs. Don't complain, you're lucky if anything +written in INTERCAL works at all. + +The subdirectory lib contains code fragments that are not complete +programs. + +Contents: + +from original manual: + sample.i Returns absolute value of a 16-bit 2s-complement number + lib/syslib.i Standard library, with bugs fixed + lib/syslib-orig.i Standard library (original buggy version) + +by Jon Blow + tests/sink.i Simple test program + random.i Random number program + lib/plus.i Increment .1 + +by Hans Olsson + lib/1910.doc Listing of a random number routine. Hans said he wrote this + because he couldn't find (1910) in the system library, but + it's there in our lib/syslib.i. We keep this around as an + example. (What? Throw away INTERCAL code? Perish the thought!) + +by Louis Howell + life.i Conway's game of Life, standard INTERCAL version + life2.i This version uses COME FROM and character output + blinkers + t_tet + glider + gun Input files for both Life programs + bubble.i Bubble sort + icat.i Sends input to output + lib/lib2.i New library routines: decrement, decrement and branch on 0, + add bit, 16-bit division with remainder, exponentiation + pi.i Calculate pi + primes.i Find prime numbers + pow.i Prints a list of nth powers using old exponentiation routine + lib/syslib.i Corrected version of system library + iching1.i Generates I Ching hexagrams + iching2.i This version uses a lookup table to find the sequence number + iching.doc Description of the two I Ching programs + change.i Count up different ways to make change + change.doc Description of change.i + +by Matt Dimeo + beer.i Print out the lyrics to "99 Bottles of Beer On The Wall" + +by Stinglai Ka'abi : + random2.i Another random-number generator + +by Jacob Mandelson + rot13.i Prints ROT-13 of its input + +by Jan-Pieter Cornet + hail_mary.3i Print 1,000,000 Hail Marys + tests/count.3i Count from 1 to 10 in TriINTERCAL + tests/iogerunds.i Demonstrate gerund abstention + +by Clemens Meier + rot13b.i Another ROT-13 program + +By Brian Raiter + lib/numio.i I/O routines + lib/numio.doc Description of the I/O routines + lib/syslib.3i + lib/syslib.4i + lib/syslib.5i + lib/syslib.6i Translations of the standard library to + lib/syslib.7i C-INTERCAL's other bases. + lib/syslib3-7.doc Documentation for same + hello.i The traditional hello world program + ins.i Intersections & Splats, a Mastermind-style game + ins.doc Documentation for I&S + yapp.i Prints an INTERCAL program that prints + yapp.doc Description of yapp.i + quine.i Prints itself + lib/floatlib.i Floating-point routines + lib/floatlib.doc Documentation for the floating-point routines + flonck.i An RPN calculator + flonck.doc Documentation for flonck.i + fft.i Fast Fourier Transform + fft.doc Description of fft.i + delta.fft + tophat.fft Sample input for FFT + +by Donald Knuth + tpk.i Don Knuth's implementation of the TPK algorithm + tpk.doc Don's note about the algorithm + +The subdirectory tests contains some programs written only to test the +compiler. + +by David Moews + tests/test1.i Prints DO THIS TEST HAS BEEN SUCCESSFULLY COMPLETED + tests/test2.i Reads in two numbers and multiplies their product + +David Moews wrote of the latter (test2.i): + +The following program reads in two numbers and then prints their product. +It consists of a trivial calling program followed by a cleaned-up version +of a portion of the INTERCAL subroutine library. (Only a portion of +the INTERCAL subroutine library is present in the posted manual, and +that portion is full of typos.) + +by Alex Smith + tests/ais1.i A very simple test program + tests/ais2.i A demonstration of computed ABSTAIN's power + tests/compucome.i A program to test computed COME FROM + tests/onceagain.i A single-threaded program testing ONCE and AGAIN + tests/arrtest.i A program to test some changes I made to the grammar + tests/arrtest.doc The history behind those changes + tests/permute.i A permutation-printing program to test backtracking + tests/permute.doc Information about the permutation-printer + sort.i An insertion-sort program testing computed ABSTAIN + +by Malcom Ryan + tests/testonce.i A single-threaded program testing ONCE and AGAIN + pass.i A multithread program illustrating communications + between threads + +The programs test16bit.i, testarray.i, testcf.i, testlib2.i, mult.i, +limits.{i,3i}, testops.{3i,5i}, testsplat.i, were all written by Louis +Howell. Of these, testcf.i might be considered an interesting +puzzle---try to figure out what it's doing. The others are pretty +boring, but are included as diagnostics and because so few other +example programs exist. Not all of these even produce interesting +diagnostic output; it may be necessary to look at the degenerated C +code to determine if the compiler is doing the right thing. + + +End of file CATALOG +------------------- diff --git a/pit/Makefile b/pit/Makefile index 3658fba..e500c8c 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -1,147 +1,147 @@ -# -# Torture-tester for the INTERCAL compiler -# - -ICK = ../ick -b - -SOURCES = \ - ./sample.i \ - ./beer.i \ - ./bubble.i \ - ./count.3i \ - ./hail_mary.3i \ - ./icat.i \ - ./tests/test1.i \ - ./tests/limits.i \ - ./tests/limits.3i \ - ./tests/test16bit.i \ - ./tests/testarray.i \ - ./tests/testcf.i \ - ./tests/testlib2.i \ - ./tests/test2.i \ - ./tests/testops.3i \ - ./tests/testops.5i \ - ./tests/testsplat.i \ - ./pow.i \ - ./random.i \ - ./random2.i \ - ./rot13.i \ - ./rot13b.i \ - ./iogerunds.i \ - ./pi.i \ - ./lib/lib2.i \ - ./lib/numio.i \ - ./lib/syslib.i \ - ./lib/syslib3.i \ - ./lib/syslib4.i \ - ./lib/syslib5.i \ - ./lib/syslib6.i \ - ./lib/syslib7.i \ - ./lib/plus.i \ - ./primes.i \ - ./life.i \ - ./life2.i \ - ./sink.i \ - ./change.i \ - ./iching1.i \ - ./iching2.i \ - ./hello.i \ - ./ins.i \ - ./yapp.i - -TARGETS = \ - ./sample \ - ./beer \ - ./bubble \ - ./count \ - ./hail_mary \ - ./icat \ - ./tests/test1 \ - ./tests/limits \ - ./tests/limits3 \ - ./tests/test16bit \ - ./tests/testarray \ - ./tests/testcf \ - ./tests/testlib2 \ - ./tests/test2 \ - ./tests/testops \ - ./tests/testops \ - ./tests/testsplat \ - ./pow \ - ./random \ - ./random2 \ - ./rot13 \ - ./rot13b \ - ./iogerunds \ - ./pi \ - ./lib/lib2 \ - ./lib/numio \ - ./lib/syslib \ - ./lib/syslib3 \ - ./lib/syslib4 \ - ./lib/syslib5 \ - ./lib/syslib6 \ - ./lib/syslib7 \ - ./lib/plus \ - ./primes \ - ./life \ - ./life2 \ - ./sink \ - ./change \ - ./iching1 \ - ./iching2 \ - ./hello \ - ./ins \ - ./yapp - -.SUFFIXES: .i .3i .4i .5i .6i .7i - -.i: - $(ICK) $< - -.3i: - $(ICK) $< - -.4i: - $(ICK) $< - -.5i: - $(ICK) $< - -.6i: - $(ICK) $< - -.7i: - $(ICK) $< - -test: $(TARGETS) - -./lib/syslib3: ./lib/syslib.3i - cp ./lib/syslib.3i ./lib/syslib3.3i - $(ICK) ./lib/syslib3.3i - -./lib/syslib4: ./lib/syslib.4i - cp ./lib/syslib.4i ./lib/syslib4.4i - $(ICK) ./lib/syslib4.4i - -./lib/syslib5: ./lib/syslib.5i - cp ./lib/syslib.5i ./lib/syslib5.5i - $(ICK) ./lib/syslib5.5i - -./lib/syslib6: ./lib/syslib.6i - cp ./lib/syslib.6i ./lib/syslib6.6i - $(ICK) ./lib/syslib6.6i - -./lib/syslib7: ./lib/syslib.7i - cp ./lib/syslib.7i ./lib/syslib7.7i - $(ICK) ./lib/syslib7.7i - -./tests/limits3: ./tests/limits.3i - cp ./tests/limits.3i ./tests/limits3.3i - $(ICK) ./tests/limits3.3i - -lines: - wc -l $(SOURCES) - -clean: - rm -f $(TARGETS) *.c *.o *~ lib/syslib?.?i tests/limits3.3i +# +# Torture-tester for the INTERCAL compiler +# + +ICK = ../ick -b + +SOURCES = \ + ./sample.i \ + ./beer.i \ + ./bubble.i \ + ./count.3i \ + ./hail_mary.3i \ + ./icat.i \ + ./tests/test1.i \ + ./tests/limits.i \ + ./tests/limits.3i \ + ./tests/test16bit.i \ + ./tests/testarray.i \ + ./tests/testcf.i \ + ./tests/testlib2.i \ + ./tests/test2.i \ + ./tests/testops.3i \ + ./tests/testops.5i \ + ./tests/testsplat.i \ + ./pow.i \ + ./random.i \ + ./random2.i \ + ./rot13.i \ + ./rot13b.i \ + ./iogerunds.i \ + ./pi.i \ + ./lib/lib2.i \ + ./lib/numio.i \ + ./lib/syslib.i \ + ./lib/syslib3.i \ + ./lib/syslib4.i \ + ./lib/syslib5.i \ + ./lib/syslib6.i \ + ./lib/syslib7.i \ + ./lib/plus.i \ + ./primes.i \ + ./life.i \ + ./life2.i \ + ./sink.i \ + ./change.i \ + ./iching1.i \ + ./iching2.i \ + ./hello.i \ + ./ins.i \ + ./yapp.i + +TARGETS = \ + ./sample \ + ./beer \ + ./bubble \ + ./count \ + ./hail_mary \ + ./icat \ + ./tests/test1 \ + ./tests/limits \ + ./tests/limits3 \ + ./tests/test16bit \ + ./tests/testarray \ + ./tests/testcf \ + ./tests/testlib2 \ + ./tests/test2 \ + ./tests/testops \ + ./tests/testops \ + ./tests/testsplat \ + ./pow \ + ./random \ + ./random2 \ + ./rot13 \ + ./rot13b \ + ./iogerunds \ + ./pi \ + ./lib/lib2 \ + ./lib/numio \ + ./lib/syslib \ + ./lib/syslib3 \ + ./lib/syslib4 \ + ./lib/syslib5 \ + ./lib/syslib6 \ + ./lib/syslib7 \ + ./lib/plus \ + ./primes \ + ./life \ + ./life2 \ + ./sink \ + ./change \ + ./iching1 \ + ./iching2 \ + ./hello \ + ./ins \ + ./yapp + +.SUFFIXES: .i .3i .4i .5i .6i .7i + +.i: + $(ICK) $< + +.3i: + $(ICK) $< + +.4i: + $(ICK) $< + +.5i: + $(ICK) $< + +.6i: + $(ICK) $< + +.7i: + $(ICK) $< + +test: $(TARGETS) + +./lib/syslib3: ./lib/syslib.3i + cp ./lib/syslib.3i ./lib/syslib3.3i + $(ICK) ./lib/syslib3.3i + +./lib/syslib4: ./lib/syslib.4i + cp ./lib/syslib.4i ./lib/syslib4.4i + $(ICK) ./lib/syslib4.4i + +./lib/syslib5: ./lib/syslib.5i + cp ./lib/syslib.5i ./lib/syslib5.5i + $(ICK) ./lib/syslib5.5i + +./lib/syslib6: ./lib/syslib.6i + cp ./lib/syslib.6i ./lib/syslib6.6i + $(ICK) ./lib/syslib6.6i + +./lib/syslib7: ./lib/syslib.7i + cp ./lib/syslib.7i ./lib/syslib7.7i + $(ICK) ./lib/syslib7.7i + +./tests/limits3: ./tests/limits.3i + cp ./tests/limits.3i ./tests/limits3.3i + $(ICK) ./tests/limits3.3i + +lines: + wc -l $(SOURCES) + +clean: + rm -f $(TARGETS) *.c *.o *~ lib/syslib?.?i tests/limits3.3i diff --git a/pit/blinkers b/pit/blinkers index 8707fc3..b1ea1fc 100644 --- a/pit/blinkers +++ b/pit/blinkers @@ -1,16 +1,16 @@ -NINE -FIVE -THREE -TWO -THREE -THREE -THREE -FOUR -THREE -SIX -THREE -SEVEN -THREE -EIGHT -THREE -ZERO +NINE +FIVE +THREE +TWO +THREE +THREE +THREE +FOUR +THREE +SIX +THREE +SEVEN +THREE +EIGHT +THREE +ZERO diff --git a/pit/delta.fft b/pit/delta.fft index 43eac5c..d3c2c88 100644 --- a/pit/delta.fft +++ b/pit/delta.fft @@ -1,258 +1,258 @@ -ONE -ONE TWO EIGHT -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -SIX OH OH OH OH OH OH ZERO ONE -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -SIX OH OH OH OH OH OH ZERO ONE -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO +ONE +ONE TWO EIGHT +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +SIX OH OH OH OH OH OH ZERO ONE +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +SIX OH OH OH OH OH OH ZERO ONE +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO diff --git a/pit/glider b/pit/glider index 69baa28..e619f6f 100644 --- a/pit/glider +++ b/pit/glider @@ -1,14 +1,14 @@ -NINE -NINE -ZERO -TWO -FOUR -THREE -FOUR -FOUR -FOUR -FOUR -THREE -THREE -TWO -OH +NINE +NINE +ZERO +TWO +FOUR +THREE +FOUR +FOUR +FOUR +FOUR +THREE +THREE +TWO +OH diff --git a/pit/gun b/pit/gun index 7c4c0b7..3317c69 100644 --- a/pit/gun +++ b/pit/gun @@ -1,90 +1,90 @@ -THREE EIGHT -TWO ZERO -ZERO -TWO -SIX -TWO -SEVEN -THREE -SIX -THREE -SEVEN -ONE THREE -SIX -ONE THREE -SEVEN -ONE THREE -EIGHT -ONE FOUR -FIVE -ONE FOUR -NINE -ONE FIVE -FOUR -ONE FIVE -ONE ZERO -ONE SIX -FIVE -ONE SIX -NINE -ONE SEVEN -SIX -ONE SEVEN -SEVEN -ONE SEVEN -EIGHT -ONE EIGHT -SIX -ONE EIGHT -SEVEN -ONE EIGHT -EIGHT -TWO THREE -FOUR -TWO THREE -FIVE -TWO THREE -SIX -TWO FOUR -THREE -TWO FOUR -FOUR -TWO FOUR -SIX -TWO FOUR -SEVEN -TWO FIVE -THREE -TWO FIVE -FOUR -TWO FIVE -SIX -TWO FIVE -SEVEN -TWO SIX -THREE -TWO SIX -FOUR -TWO SIX -FIVE -TWO SIX -SIX -TWO SIX -SEVEN -TWO SEVEN -TWO -TWO SEVEN -THREE -TWO SEVEN -SEVEN -TWO SEVEN -EIGHT -THREE SIX -FOUR -THREE SIX -FIVE -THREE SEVEN -FOUR -THREE SEVEN -FIVE -ZERO +THREE EIGHT +TWO ZERO +ZERO +TWO +SIX +TWO +SEVEN +THREE +SIX +THREE +SEVEN +ONE THREE +SIX +ONE THREE +SEVEN +ONE THREE +EIGHT +ONE FOUR +FIVE +ONE FOUR +NINE +ONE FIVE +FOUR +ONE FIVE +ONE ZERO +ONE SIX +FIVE +ONE SIX +NINE +ONE SEVEN +SIX +ONE SEVEN +SEVEN +ONE SEVEN +EIGHT +ONE EIGHT +SIX +ONE EIGHT +SEVEN +ONE EIGHT +EIGHT +TWO THREE +FOUR +TWO THREE +FIVE +TWO THREE +SIX +TWO FOUR +THREE +TWO FOUR +FOUR +TWO FOUR +SIX +TWO FOUR +SEVEN +TWO FIVE +THREE +TWO FIVE +FOUR +TWO FIVE +SIX +TWO FIVE +SEVEN +TWO SIX +THREE +TWO SIX +FOUR +TWO SIX +FIVE +TWO SIX +SIX +TWO SIX +SEVEN +TWO SEVEN +TWO +TWO SEVEN +THREE +TWO SEVEN +SEVEN +TWO SEVEN +EIGHT +THREE SIX +FOUR +THREE SIX +FIVE +THREE SEVEN +FOUR +THREE SEVEN +FIVE +ZERO diff --git a/pit/hail_mary.3i b/pit/hail_mary.3i index 6710c4d..88a5931 100644 --- a/pit/hail_mary.3i +++ b/pit/hail_mary.3i @@ -1,38 +1,38 @@ - - DO ,1 <- #10 - DO ,1 SUB #1 <- #238 - PLEASE ABSTAIN FROM (11) - DO ,1 SUB #2 <- #140 - PLEASE DO ,1 SUB #3 <- #240 - DO ,1 SUB #4 <- #96 - DO ,1 SUB #5 <- #132 - DO ,1 SUB #6 <- #44 - DO ,1 SUB #7 <- #56 - DO ,1 SUB #8 <- #176 - DO ,1 SUB #9 <- #238 - DO ,1 SUB #10 <- #96 - DO .1 <- #400 - DO (19) NEXT - DO GIVE UP -(19) DO COME FROM (55) - PLEASE DO STASH .1 - DO .1 <- #2500 - PLEASE (31) NEXT - DO RETRIEVE .1 - DO (123) NEXT -(55) PLEASE DO (15) NEXT -(31) DO COME FROM (69) - PLEASE DON'T FORGET TO INSERT A BETTER HAIL-MARY ROUTINE -(11) DO ,1 SUB #1 <- #62 - PLEASE REINSTATE CALCULATING - DO READ OUT ,1 - PLEASE DO (123) NEXT -(69) DO (15) NEXT -(42) DO RESUME .9 -(123) PLEASE .8 <- #1 - PLEASE COME FROM (81) - DO .1 <- "?.1$.8"~"#0$#29524" - DO .9 <- '?"V!1~.8'$#1"~#1'~#1 - PLEASE DO (42) NEXT -(81) DO .8 <- !8$#0'~"#9841$#1" -(15) PLEASE RESUME '?"!1~.1'~#2"$#1'~#1 + + DO ,1 <- #10 + DO ,1 SUB #1 <- #238 + PLEASE ABSTAIN FROM (11) + DO ,1 SUB #2 <- #140 + PLEASE DO ,1 SUB #3 <- #240 + DO ,1 SUB #4 <- #96 + DO ,1 SUB #5 <- #132 + DO ,1 SUB #6 <- #44 + DO ,1 SUB #7 <- #56 + DO ,1 SUB #8 <- #176 + DO ,1 SUB #9 <- #238 + DO ,1 SUB #10 <- #96 + DO .1 <- #400 + DO (19) NEXT + DO GIVE UP +(19) DO COME FROM (55) + PLEASE DO STASH .1 + DO .1 <- #2500 + PLEASE (31) NEXT + DO RETRIEVE .1 + DO (123) NEXT +(55) PLEASE DO (15) NEXT +(31) DO COME FROM (69) + PLEASE DON'T FORGET TO INSERT A BETTER HAIL-MARY ROUTINE +(11) DO ,1 SUB #1 <- #62 + PLEASE REINSTATE CALCULATING + DO READ OUT ,1 + PLEASE DO (123) NEXT +(69) DO (15) NEXT +(42) DO RESUME .9 +(123) PLEASE .8 <- #1 + PLEASE COME FROM (81) + DO .1 <- "?.1$.8"~"#0$#29524" + DO .9 <- '?"V!1~.8'$#1"~#1'~#1 + PLEASE DO (42) NEXT +(81) DO .8 <- !8$#0'~"#9841$#1" +(15) PLEASE RESUME '?"!1~.1'~#2"$#1'~#1 diff --git a/pit/lib/syslib.3i b/pit/lib/syslib.3i index fd1ea3c..44b3ba9 100644 --- a/pit/lib/syslib.3i +++ b/pit/lib/syslib.3i @@ -1,323 +1,323 @@ - PLEASE KNOCK THREE TIMES 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$#29524' - DO .6 <- '?"'V"'&.1$.2'~'#0$#29524'"$#29524' - ~'#0$#29524'"$#29524'~'#0$#29524' - PLEASE DO .5 <- 'V".6~#39366"$#1'~#1 - 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 <- 'V"!6~.6'~#2"$#1'~#1 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#9841$#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 <- '?#59048$.2'~'#0$#29524' - 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 <- 'V"!1~.2'$#1"'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#29524' - DO (1022) NEXT - DO .2 <- !2$#0'~'#9841$#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~#29524 - PLEASE DO .5 <- :1~'#29403$#29403' - DO .5 <- 'V"!5~.5'~#2"$#1'~#1 - 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~'#29403$#29403' - DO .5 <- 'V"!5~.5'~#2"$#1'~#1 - 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~#29524 - PLEASE DO .2 <- :2~#29524 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#29403$#29403' - DO .2 <- :2~'#29403$#29403' - 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' - 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 <- "'?#59048$":2~'#29524$#0'"'~'#0$#29524'" - $"'?#59048$":2~'#0$#29524'"'~'#0$#29524'" - 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~#22143 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#22143"'~'#0$#29524' - DO .3 <- .1~#7381 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#7381"'~'#0$#29524'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"'"!3$#0'~'#9841$#1'"$#0'~'#3280$#4'" - $#0'~'#3280$#4' - 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"$#7'~#4"$#2'~#10 - DO (1534) NEXT - DO (1500) NEXT - DO :1 <- :3 - DO (1536) NEXT - (1534) DO (1531) NEXT - (1536) DO (1500) NEXT - DO :1 <- :3 - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #2 - DO .3 <- !3$#0'~'#9841$#1' - DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' - ~'#9841$#1'" - PLEASE DO .5 <- 'V"!3~.3'~#2"$#1'~#1 - 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~#29524 - PLEASE DO .2 <- :2~'#29403$#29403' - DO .5 <- :1~'#29403$#29403' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#29524 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#29403$#29403'"$":4~'#29403 - $#29403'" - DO .5 <- ':1~:1'~#2 - DO .2 <- :2~'#29403$#29403' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#2"$.5'~#4 - DO .1 <- :3~#29524 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#29524 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$":4~#1"'~#31 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$":4~#1"'~#274 - DO .5 <- !5~.5'~#1 - 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 + :6 + .5 - DO :3 <- #0 - DO .5 <- 'V"':2~:2'~#2"$#1'~#1 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#39366$#0"'"$#1'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' - ~'#9841$#1'" - PLEASE DO :4 <- ":4~'#0$#29524'"$"'":4~'#9841 - $#0'"$#0'~'#9841$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 - ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ - "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ - #29524'"'~'#0$#29524'"'~'#0$#29524'" - DO :5 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' - ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ - #29524'"'~'#0$#59048'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#29524$#0'"$ - #19683'~'#0$#29524'"$"'?:5~:5'~'#9841$#0'"' - ~'#19683$#9841'"$"'?:5~:5'~'#0$#29524'"'" - ~#1'$#1"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 - ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ - "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ - #29524'"'~'#0$#29524'"'~'#0$#29524'" - DO :3 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' - ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ - #29524'"'~'#0$#59048'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#29524$#0'"$ - #19683'~'#0$#29524'"$"'?:3~:3'~'#9841$#0'"' - ~'#19683$#9841'"$"'?:3~:3'~'#0$#29524'"'" - ~#1'$#1"~#1 - DO (1557) NEXT - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :3 <- "'V":4~'#59048$#0'"$":5~'#29524$#0'"' - ~'#0$#29524'"$"'V":4~'#0$#59048'"$":5~'#0$ - #29524'"'~'#0$#29524'" - PLEASE DO (1555) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :3 <- "'V":4~'#29524$#0'"$":5~'#29524$#0'"' - ~'#0$#29524'"$"'V":4~'#0$#29524'"$":5~'#0$ - #29524'"'~'#0$#29524'" - PLEASE DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) PLEASE FORGET #1 - DO .5 <- "?':4~#2'$#1"~#1 - DO (1551) NEXT - DO :2 <- :2~'#29524$#29523' - DO :4 <- :4~'#29524$#29523' - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .5 - PLEASE RESUME #2 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#29524' - DO %50 .1 <- '^.1$.2'~'#0$#29524' - (1903) PLEASE FORGET #1 - DO .2 <- !2$#0'~'#9841$#1' - PLEASE DO .5 <- 'V"!2~.2'~#2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #59037 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET THREE 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'~#2"$#1'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #29524 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#29403$#29403' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 + PLEASE KNOCK THREE TIMES 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$#29524' + DO .6 <- '?"'V"'&.1$.2'~'#0$#29524'"$#29524' + ~'#0$#29524'"$#29524'~'#0$#29524' + PLEASE DO .5 <- 'V".6~#39366"$#1'~#1 + 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 <- 'V"!6~.6'~#2"$#1'~#1 + DO (1003) NEXT + DO .1 <- .3 + DO .2 <- !6$#0'~'#9841$#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 <- '?#59048$.2'~'#0$#29524' + 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 <- 'V"!1~.2'$#1"'~#1 + PLEASE DO .1 <- '^.1$.2'~'#0$#29524' + DO (1022) NEXT + DO .2 <- !2$#0'~'#9841$#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~#29524 + PLEASE DO .5 <- :1~'#29403$#29403' + DO .5 <- 'V"!5~.5'~#2"$#1'~#1 + 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~'#29403$#29403' + DO .5 <- 'V"!5~.5'~#2"$#1'~#1 + 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~#29524 + PLEASE DO .2 <- :2~#29524 + DO (1009) NEXT + DO .5 <- .3 + PLEASE DO .6 <- .4 + DO .1 <- :1~'#29403$#29403' + DO .2 <- :2~'#29403$#29403' + 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' + 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 <- "'?#59048$":2~'#29524$#0'"'~'#0$#29524'" + $"'?#59048$":2~'#0$#29524'"'~'#0$#29524'" + 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~#22143 + DO (1525) NEXT + PLEASE DO .4 <- 'V.3$".2~#22143"'~'#0$#29524' + DO .3 <- .1~#7381 + PLEASE DO (1525) NEXT + DO :1 <- .4$"'V.3$".2~#7381"'~'#0$#29524'" + PLEASE RETRIEVE .3 + .4 + DO RESUME #1 + (1525) DO .3 <- '"'"!3$#0'~'#9841$#1'"$#0'~'#3280$#4'" + $#0'~'#3280$#4' + 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"$#7'~#4"$#2'~#10 + DO (1534) NEXT + DO (1500) NEXT + DO :1 <- :3 + DO (1536) NEXT + (1534) DO (1531) NEXT + (1536) DO (1500) NEXT + DO :1 <- :3 + PLEASE DO (1533) NEXT + (1531) PLEASE DO (1001) NEXT + (1533) DO FORGET #2 + DO .3 <- !3$#0'~'#9841$#1' + DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' + ~'#9841$#1'" + PLEASE DO .5 <- 'V"!3~.3'~#2"$#1'~#1 + 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~#29524 + PLEASE DO .2 <- :2~'#29403$#29403' + DO .5 <- :1~'#29403$#29403' + DO (1530) NEXT + DO :3 <- :1 + DO .2 <- :2~#29524 + PLEASE DO (1530) NEXT + DO :5 <- :1 + DO .1 <- .5 + DO (1530) NEXT + DO :4 <- :1 + PLEASE DO :1 <- ":3~'#29403$#29403'"$":4~'#29403 + $#29403'" + DO .5 <- ':1~:1'~#2 + DO .2 <- :2~'#29403$#29403' + DO (1530) NEXT + PLEASE DO .5 <- '"':1~:1'~#2"$.5'~#4 + DO .1 <- :3~#29524 + DO .2 <- #0 + DO (1520) NEXT + PLEASE DO :2 <- :1 + PLEASE DO .1 <- :4~#29524 + DO (1520) NEXT + DO (1509) NEXT + DO .5 <- !5$":4~#1"'~#31 + DO :1 <- :3 + DO :2 <- :5 + DO (1509) NEXT + PLEASE DO .5 <- !5$":4~#1"'~#274 + DO .5 <- !5~.5'~#1 + 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 + :6 + .5 + DO :3 <- #0 + DO .5 <- 'V"':2~:2'~#2"$#1'~#1 + PLEASE DO (1551) NEXT + DO :4 <- #1 + PLEASE DO (1553) NEXT + (1553) DO FORGET #1 + DO .5 <- '?"':2~"#39366$#0"'"$#1'~#1 + DO (1552) NEXT + DO :2 <- ":2~'#0$#29524'"$"'":2~'#9841$#0'"$#0' + ~'#9841$#1'" + PLEASE DO :4 <- ":4~'#0$#29524'"$"'":4~'#9841 + $#0'"$#0'~'#9841$#1'" + DO (1553) NEXT + (1552) DO (1001) NEXT + (1556) PLEASE FORGET #1 + DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 + ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ + "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ + #29524'"'~'#0$#29524'"'~'#0$#29524'" + DO :5 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' + ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ + #29524'"'~'#0$#59048'" + DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#29524$#0'"$ + #19683'~'#0$#29524'"$"'?:5~:5'~'#9841$#0'"' + ~'#19683$#9841'"$"'?:5~:5'~'#0$#29524'"'" + ~#1'$#1"~#1 + DO (1554) NEXT + DO :5 <- :3 + DO (1510) NEXT + PLEASE DO :1 <- :3 + DO :6 <- "'&":2~'#29524$#0'"$"'?#59048$":1 + ~'#29524$#0'"'~'#0$#29524'"'~'#0$#29524'"$ + "'&":2~'#0$#29524'"$"'?#59048$":1~'#0$ + #29524'"'~'#0$#29524'"'~'#0$#29524'" + DO :3 <- "'?":1~'#29524$#0'"$":2~'#29524$#0'"' + ~'#0$#59048'"$"'?":1~'#0$#29524'"$":2~'#0$ + #29524'"'~'#0$#59048'" + DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#29524$#0'"$ + #19683'~'#0$#29524'"$"'?:3~:3'~'#9841$#0'"' + ~'#19683$#9841'"$"'?:3~:3'~'#0$#29524'"'" + ~#1'$#1"~#1 + DO (1557) NEXT + DO (1510) NEXT + PLEASE DO :1 <- :3 + DO :3 <- "'V":4~'#59048$#0'"$":5~'#29524$#0'"' + ~'#0$#29524'"$"'V":4~'#0$#59048'"$":5~'#0$ + #29524'"'~'#0$#29524'" + PLEASE DO (1555) NEXT + (1557) PLEASE DO (1001) NEXT + PLEASE FORGET #1 + DO :3 <- "'V":4~'#29524$#0'"$":5~'#29524$#0'"' + ~'#0$#29524'"$"'V":4~'#0$#29524'"$":5~'#0$ + #29524'"'~'#0$#29524'" + PLEASE DO (1555) NEXT + (1554) PLEASE DO (1001) NEXT + (1555) PLEASE FORGET #1 + DO .5 <- "?':4~#2'$#1"~#1 + DO (1551) NEXT + DO :2 <- :2~'#29524$#29523' + DO :4 <- :4~'#29524$#29523' + PLEASE DO (1556) NEXT + (1551) DO (1001) NEXT + PLEASE RETRIEVE :1 + :4 + :5 + :6 + .5 + PLEASE RESUME #2 + (1900) DO STASH .2 + .5 + DO .1 <- #0 + DO .2 <- #1 + PLEASE DO (1901) NEXT + (1901) DO FORGET #1 + DO %50 (1904) NEXT + DO %50 (1901) NEXT + PLEASE DO (1903) NEXT + (1904) DO .1 <- '^.1$.2'~'#0$#29524' + DO %50 .1 <- '^.1$.2'~'#0$#29524' + (1903) PLEASE FORGET #1 + DO .2 <- !2$#0'~'#9841$#1' + PLEASE DO .5 <- 'V"!2~.2'~#2"$#1'~#1 + DO (1902) NEXT + DO (1901) NEXT + (1902) DO (1001) NEXT + DO RETRIEVE .2 + .5 + PLEASE RESUME #2 + (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 + DO .3 <- #59037 + DO :1 <- #6 + DO (1911) NEXT + PLEASE NOTE THAT YOU CAN'T GET THREE 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'~#2"$#1'~#1 + DO (1912) NEXT + DO .1 <- #12 + PLEASE DO (1050) NEXT + DO RETRIEVE .1 + DO (1530) NEXT + DO :2 <- #29524 + DO (1500) NEXT + PLEASE DO .2 <- :3~'#29403$#29403' + PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + DO RESUME #1 diff --git a/pit/lib/syslib.4i b/pit/lib/syslib.4i index d1c1084..1710a1f 100644 --- a/pit/lib/syslib.4i +++ b/pit/lib/syslib.4i @@ -1,354 +1,354 @@ - PLEASE KNOCK TWICE TWO TIMES 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$#21845' - DO .6 <- '?"'V"'&.1$.2'~'#0$#21845'"$"'^"'@.1$ - .2'~'#0$#21845'"$#21845'~'#0$#43690'"' - ~'#0$#21845'"$#43690'~'#0$#21845' - PLEASE DO .5 <- '?".6~#49152"$#4'~#4 - 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'~#3"$#4'~#4 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#5461$#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 <- '?#65535$.2'~'#0$#21845' - 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 <- '?"'V".1~.2"$#2'~#1"$#1'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#21845' - DO (1022) NEXT - DO .2 <- !2$#0'~'#5461$#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~#21845 - PLEASE DO .5 <- :1~'#21760$#21760' - DO .5 <- '?"!5~.5'~#3"$#4'~#4 - 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~'#21760$#21760' - DO .5 <- '?"!5~.5'~#3"$#4'~#4 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1200) DO .2 <- '^.1$.1'~'#0$#21845' - DO .3 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .2 <- '^.2$"!3$#0'~'#5461$#1'"'~'#0$#21845' - DO .3 <- .3~#16384 - PLEASE RESUME #1 - (1210) DO .2 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .3 <- '^.1$.1'~'#0$#21845' - DO .2 <- '^.2$".3~#21844"'~'#0$#21845' - DO .3 <- .3~#1 - PLEASE RESUME #1 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#21845 - PLEASE DO .2 <- :2~#21845 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#21760$#21760' - DO .2 <- :2~'#21760$#21760' - 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' - 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 <- "'?#65535$":2~'#21845$#0'"'~'#0$#21845'"$ - "'?#65535$":2~'#0$#21845'"'~'#0$#21845'" - 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~#17476 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#17476"'~'#0$#21845' - DO .3 <- .1~#4369 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#4369"'~'#0$#21845'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"'"!3$#0'~'#5461$#1'"$#0'~'#5461$#1'"$ - #0'~'#1365$#5' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .1 + .2 + .3 - DO :3 <- #0 - DO :2 <- .1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .3 <- '?"!2~.2'~#3"$#4'~#4 - DO (1532) NEXT - DO .1 <- .2 - DO (1210) NEXT - DO .3 <- 'V.3$#1'~#1 - DO (1531) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1534) NEXT - (1533) DO FORGET #1 - DO :1 <- :2 - DO (1700) NEXT - DO (1535) NEXT - (1534) PLEASE RESUME .3 - (1532) DO (1534) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 - 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~#21845 - PLEASE DO .2 <- :2~'#21760$#21760' - DO .5 <- :1~'#21760$#21760' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#21845 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#21760$#21760'"$":4 - ~'#21760$#21760'" - DO .5 <- ':1~:1'~#3 - DO .2 <- :2~'#21760$#21760' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#3"$.5'~#5 - DO .1 <- :3~#21845 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#21845 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#69 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#1093 - DO .5 <- '?"!5~.5'~#1"$#1'~#1 - 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 + :1 + :4 + :5 + :6 + .1 + .5 - DO :3 <- #0 - DO .5 <- '?"':2~:2'~#3"$#4'~#4 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?#0$"'V"'@":2~'#16384$#0'"$#3'~#1"$#2' - ~#1"'~#1 - DO (1552) NEXT - DO :5 <- :2 - DO :1 <- :4 - PLEASE DO (1700) NEXT - DO :4 <- :2 - DO :1 <- :5 - PLEASE DO (1700) NEXT - DO (1553) NEXT - (1552) DO (1001) NEXT - DO RETRIEVE :1 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#21845$#0'"$"'?#65535$":1 - ~'#21845$#0'"'~'#0$#21845'"'~'#0$#21845'"$ - "'&":2~'#0$#21845'"$"'?#65535$":1~'#0$ - #21845'"'~'#0$#21845'"'~'#0$#21845'" - DO :6 <- "'?"'V":6~'#21845$#0'"$#21845'~'#0$ - #21845'"$#21845'~'#0$#65535'"$"'?"'V":6 - ~'#0$#21845'"$#21845'~'#0$#21845'"$#21845' - ~'#0$#65535'" - DO :5 <- "'?":1~'#21845$#0'"$":2~'#21845$#0'"' - ~'#0$#65535'"$"'?":1~'#0$#21845'"$":2~'#0$ - #21845'"'~'#0$#65535'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#21845$#0'"$ - #16384'~'#0$#21845'"$"'?:5~:5'~'#5461$#0'"' - ~'#16384$#5461'"$"'?:5~:5'~'#0$#21845'"'" - ~#1'$#2"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO :3 <- "'^":4~'#21845$#0'"$":5~'#21845$#0'"' - ~'#0$#21845'"$"'^":4~'#0$#21845'"$":5~'#0$ - #21845'"'~'#0$#21845'" - DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) DO FORGET #1 - DO .5 <- 'V":4~#1"$"'?#2$":4~#1"'~#1"'~#1 - DO (1551) NEXT - DO :5 <- :1 - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :5 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1700) PLEASE STASH .2 - DO .1 <- :1~'#0$#21845' - DO .2 <- :1~'#21845$#0' - DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ - #21845'" - DO .1 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO .2 <- '?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' - ~'#0$#21845'"'~'#0$#21845' - DO :2 <- "'^":2~'#21845$#0'"$.1'~'#0$#21845'"$ - "'^":2~'#0$#21845'"$"'.2$#0'~'#5461$#1'"' - ~'#0$#21845'" - DO .1 <- .2~#16384 - PLEASE RETRIEVE .2 - PLEASE RESUME #1 - (1710) PLEASE STASH :1 + .2 - DO .1 <- :1~'#0$#21845' - DO .2 <- :1~'#21845$#0' - DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ - #21845'" - DO :1 <- "'?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' - ~'#0$#21845'"'~'#0$#21845'"$"'?"'@.1$#0' - ~'#0$#21845'"$"'@.1$#65535'~'#0$#21845'"' - ~'#0$#21845'" - DO .1 <- :2~#1 - DO :2 <- "'^":1~'#21845$#0'"$":2~'#0$#21844'"' - ~'#0$#21845'"$"'^":1~'#0$#21845'"$":2 - ~'#21845$#0'"'~'#0$#21845'" - PLEASE RETRIEVE :1 + .2 - PLEASE RESUME #1 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) PLEASE FORGET #1 - DO %50 .1 <- 'V.1$.2'~'#0$#21845' - DO %50 .1 <- '^.1$".2~#43690"'~'#0$#21845' - DO .2 <- !2$#0'~'#5461$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .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 ANYWHERE 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'~#3"$#2'~#1 - 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~'#21760$#21760' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 + PLEASE KNOCK TWICE TWO TIMES 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$#21845' + DO .6 <- '?"'V"'&.1$.2'~'#0$#21845'"$"'^"'@.1$ + .2'~'#0$#21845'"$#21845'~'#0$#43690'"' + ~'#0$#21845'"$#43690'~'#0$#21845' + PLEASE DO .5 <- '?".6~#49152"$#4'~#4 + 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'~#3"$#4'~#4 + DO (1003) NEXT + DO .1 <- .3 + DO .2 <- !6$#0'~'#5461$#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 <- '?#65535$.2'~'#0$#21845' + 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 <- '?"'V".1~.2"$#2'~#1"$#1'~#1 + PLEASE DO .1 <- '^.1$.2'~'#0$#21845' + DO (1022) NEXT + DO .2 <- !2$#0'~'#5461$#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~#21845 + PLEASE DO .5 <- :1~'#21760$#21760' + DO .5 <- '?"!5~.5'~#3"$#4'~#4 + 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~'#21760$#21760' + DO .5 <- '?"!5~.5'~#3"$#4'~#4 + DO (1051) NEXT + DO (1999) NEXT + (1051) DO (1001) NEXT + DO .2 <- :3 + PLEASE RETRIEVE :2 + :3 + .5 + DO RESUME #2 + (1200) DO .2 <- '^.1$.1'~'#0$#21845' + DO .3 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' + ~'#0$#21845'"'~'#0$#21845' + DO .2 <- '^.2$"!3$#0'~'#5461$#1'"'~'#0$#21845' + DO .3 <- .3~#16384 + PLEASE RESUME #1 + (1210) DO .2 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' + ~'#0$#21845'"'~'#0$#21845' + DO .3 <- '^.1$.1'~'#0$#21845' + DO .2 <- '^.2$".3~#21844"'~'#0$#21845' + DO .3 <- .3~#1 + PLEASE RESUME #1 + (1500) PLEASE ABSTAIN FROM (1502) + PLEASE ABSTAIN FROM (1506) + (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 + DO .1 <- :1~#21845 + PLEASE DO .2 <- :2~#21845 + DO (1009) NEXT + DO .5 <- .3 + PLEASE DO .6 <- .4 + DO .1 <- :1~'#21760$#21760' + DO .2 <- :2~'#21760$#21760' + 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' + 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 <- "'?#65535$":2~'#21845$#0'"'~'#0$#21845'"$ + "'?#65535$":2~'#0$#21845'"'~'#0$#21845'" + 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~#17476 + DO (1525) NEXT + PLEASE DO .4 <- 'V.3$".2~#17476"'~'#0$#21845' + DO .3 <- .1~#4369 + PLEASE DO (1525) NEXT + DO :1 <- .4$"'V.3$".2~#4369"'~'#0$#21845'" + PLEASE RETRIEVE .3 + .4 + DO RESUME #1 + (1525) DO .3 <- '"'"!3$#0'~'#5461$#1'"$#0'~'#5461$#1'"$ + #0'~'#1365$#5' + PLEASE RESUME #1 + (1530) DO STASH :2 + :3 + .1 + .2 + .3 + DO :3 <- #0 + DO :2 <- .1 + DO (1535) NEXT + (1535) PLEASE FORGET #1 + DO .3 <- '?"!2~.2'~#3"$#4'~#4 + DO (1532) NEXT + DO .1 <- .2 + DO (1210) NEXT + DO .3 <- 'V.3$#1'~#1 + DO (1531) NEXT + DO :1 <- :3 + DO (1500) NEXT + PLEASE DO (1533) NEXT + (1531) PLEASE DO (1534) NEXT + (1533) DO FORGET #1 + DO :1 <- :2 + DO (1700) NEXT + DO (1535) NEXT + (1534) PLEASE RESUME .3 + (1532) DO (1534) NEXT + DO :1 <- :3 + PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 + 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~#21845 + PLEASE DO .2 <- :2~'#21760$#21760' + DO .5 <- :1~'#21760$#21760' + DO (1530) NEXT + DO :3 <- :1 + DO .2 <- :2~#21845 + PLEASE DO (1530) NEXT + DO :5 <- :1 + DO .1 <- .5 + DO (1530) NEXT + DO :4 <- :1 + PLEASE DO :1 <- ":3~'#21760$#21760'"$":4 + ~'#21760$#21760'" + DO .5 <- ':1~:1'~#3 + DO .2 <- :2~'#21760$#21760' + DO (1530) NEXT + PLEASE DO .5 <- '"':1~:1'~#3"$.5'~#5 + DO .1 <- :3~#21845 + DO .2 <- #0 + DO (1520) NEXT + PLEASE DO :2 <- :1 + PLEASE DO .1 <- :4~#21845 + DO (1520) NEXT + DO (1509) NEXT + DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#69 + DO :1 <- :3 + DO :2 <- :5 + DO (1509) NEXT + PLEASE DO .5 <- !5$"'^":4~#1"$#1'~#1"'~#1093 + DO .5 <- '?"!5~.5'~#1"$#1'~#1 + 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 + :1 + :4 + :5 + :6 + .1 + .5 + DO :3 <- #0 + DO .5 <- '?"':2~:2'~#3"$#4'~#4 + PLEASE DO (1551) NEXT + DO :4 <- #1 + PLEASE DO (1553) NEXT + (1553) DO FORGET #1 + DO .5 <- '?#0$"'V"'@":2~'#16384$#0'"$#3'~#1"$#2' + ~#1"'~#1 + DO (1552) NEXT + DO :5 <- :2 + DO :1 <- :4 + PLEASE DO (1700) NEXT + DO :4 <- :2 + DO :1 <- :5 + PLEASE DO (1700) NEXT + DO (1553) NEXT + (1552) DO (1001) NEXT + DO RETRIEVE :1 + (1556) PLEASE FORGET #1 + DO :6 <- "'&":2~'#21845$#0'"$"'?#65535$":1 + ~'#21845$#0'"'~'#0$#21845'"'~'#0$#21845'"$ + "'&":2~'#0$#21845'"$"'?#65535$":1~'#0$ + #21845'"'~'#0$#21845'"'~'#0$#21845'" + DO :6 <- "'?"'V":6~'#21845$#0'"$#21845'~'#0$ + #21845'"$#21845'~'#0$#65535'"$"'?"'V":6 + ~'#0$#21845'"$#21845'~'#0$#21845'"$#21845' + ~'#0$#65535'" + DO :5 <- "'?":1~'#21845$#0'"$":2~'#21845$#0'"' + ~'#0$#65535'"$"'?":1~'#0$#21845'"$":2~'#0$ + #21845'"'~'#0$#65535'" + DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#21845$#0'"$ + #16384'~'#0$#21845'"$"'?:5~:5'~'#5461$#0'"' + ~'#16384$#5461'"$"'?:5~:5'~'#0$#21845'"'" + ~#1'$#2"~#1 + DO (1554) NEXT + DO :5 <- :3 + DO (1510) NEXT + PLEASE DO :1 <- :3 + DO :3 <- "'^":4~'#21845$#0'"$":5~'#21845$#0'"' + ~'#0$#21845'"$"'^":4~'#0$#21845'"$":5~'#0$ + #21845'"'~'#0$#21845'" + DO (1555) NEXT + (1554) PLEASE DO (1001) NEXT + (1555) DO FORGET #1 + DO .5 <- 'V":4~#1"$"'?#2$":4~#1"'~#1"'~#1 + DO (1551) NEXT + DO :5 <- :1 + DO :1 <- :4 + DO :4 <- :2 + DO (1710) NEXT + DO :1 <- :4 + DO :4 <- :2 + DO (1710) NEXT + DO :1 <- :5 + PLEASE DO (1556) NEXT + (1551) DO (1001) NEXT + PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 + PLEASE RESUME #2 + (1700) PLEASE STASH .2 + DO .1 <- :1~'#0$#21845' + DO .2 <- :1~'#21845$#0' + DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ + #21845'" + DO .1 <- '?"'@.1$#0'~'#0$#21845'"$"'@.1$#65535' + ~'#0$#21845'"'~'#0$#21845' + DO .2 <- '?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' + ~'#0$#21845'"'~'#0$#21845' + DO :2 <- "'^":2~'#21845$#0'"$.1'~'#0$#21845'"$ + "'^":2~'#0$#21845'"$"'.2$#0'~'#5461$#1'"' + ~'#0$#21845'" + DO .1 <- .2~#16384 + PLEASE RETRIEVE .2 + PLEASE RESUME #1 + (1710) PLEASE STASH :1 + .2 + DO .1 <- :1~'#0$#21845' + DO .2 <- :1~'#21845$#0' + DO :2 <- "'^.2$.2'~'#0$#21845'"$"'^.1$.1'~'#0$ + #21845'" + DO :1 <- "'?"'@.2$#0'~'#0$#21845'"$"'@.2$#65535' + ~'#0$#21845'"'~'#0$#21845'"$"'?"'@.1$#0' + ~'#0$#21845'"$"'@.1$#65535'~'#0$#21845'"' + ~'#0$#21845'" + DO .1 <- :2~#1 + DO :2 <- "'^":1~'#21845$#0'"$":2~'#0$#21844'"' + ~'#0$#21845'"$"'^":1~'#0$#21845'"$":2 + ~'#21845$#0'"'~'#0$#21845'" + PLEASE RETRIEVE :1 + .2 + PLEASE RESUME #1 + (1900) DO STASH .2 + .5 + DO .1 <- #0 + DO .2 <- #1 + PLEASE DO (1901) NEXT + (1901) PLEASE FORGET #1 + DO %50 .1 <- 'V.1$.2'~'#0$#21845' + DO %50 .1 <- '^.1$".2~#43690"'~'#0$#21845' + DO .2 <- !2$#0'~'#5461$#1' + PLEASE DO .5 <- '^".2~.2"$#1'~#1 + DO (1902) NEXT + DO (1901) NEXT + (1902) DO (1001) NEXT + DO RETRIEVE .2 + .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 ANYWHERE 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'~#3"$#2'~#1 + 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~'#21760$#21760' + PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + DO RESUME #1 diff --git a/pit/lib/syslib.5i b/pit/lib/syslib.5i index 518b7cd..c768250 100644 --- a/pit/lib/syslib.5i +++ b/pit/lib/syslib.5i @@ -1,355 +1,355 @@ - PLEASE KNOCK "SHAVE-AND-A-HAIRCUT" 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$#3906' - DO .6 <- '?"'V"'&.1$.2'~'#0$#3906'"$"'^"'@.1$ - .2'~'#0$#3906'"$#3906'~'#0$#11718'"' - ~'#0$#3906'"$#11718'~'#0$#3906' - PLEASE DO .5 <- "?!6~#12500'$#5"~#5 - 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'~#4"$#5'~#5 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#781$#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 <- '?#15624$.2'~'#0$#3906' - 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 <- '?"'V".1~.2"$#3'~#1"$#2'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#3906' - DO (1022) NEXT - DO .2 <- !2$#0'~'#781$#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~#3906 - PLEASE DO .5 <- :1~'#3875$#3875' - DO .5 <- '?"!5~.5'~#4"$#5'~#5 - 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~'#3875$#3875' - DO .5 <- '?"!5~.5'~#4"$#5'~#5 - 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~#3906 - PLEASE DO .2 <- :2~#3906 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#3875$#3875' - DO .2 <- :2~'#3875$#3875' - 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' - 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 <- "'?#15624$":2~'#3906$#0'"'~'#0$#3906'"$ - "'?#15624$":2~'#0$#3906'"'~'#0$#3906'" - 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~#3255 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#3255"'~'#0$#3906' - DO .3 <- .1~#651 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#651"'~'#0$#3906'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#781$#1'"$#0'~'#156$#6' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 - DO :3 <- #0 - DO :4 <- .2 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- '?".1~#4"$#5'~#5 - DO (1531) NEXT - DO :1 <- :4 - DO (1720) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #1 - DO .1 <- .1~#3905 - DO :4 <- ":4~'#0$#3906'"$"'":4~'#781$#0'"$#0' - ~'#781$#1'" - PLEASE DO .5 <- '?"!1~.1'~#4"$#5'~#5 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .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~#3906 - PLEASE DO .2 <- :2~'#3875$#3875' - DO .5 <- :1~'#3875$#3875' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#3906 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#3875$#3875'"$":4 - ~'#3875$#3875'" - DO .5 <- ':1~:1'~#4 - DO .2 <- :2~'#3875$#3875' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#4"$.5'~#6 - DO .1 <- :3~#3906 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#3906 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#131 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#3256 - DO .5 <- '?"!5~.5'~#1"$#2'~#1 - 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 + :6 + .1 + .5 - DO :5 <- #0 - DO .5 <- '?"':2~:2'~#4"$#5'~#5 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#12500$#0"'"$#3'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#3906'"$"'":2~'#781$#0'"$#0' - ~'#781$#1'" - PLEASE DO :4 <- ":4~'#0$#3906'"$"'":4~'#781 - $#0'"$#0'~'#781$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - DO .1 <- #0 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#3906$#0'"$"'?#15624$":1 - ~'#3906$#0'"'~'#0$#3906'"'~'#0$#3906'"$ - "'&":2~'#0$#3906'"$"'?#15624$":1~'#0$ - #3906'"'~'#0$#3906'"'~'#0$#3906'" - DO :6 <- "'?"'V":6~'#3906$#0'"$#7812'~'#0$ - #3906'"$#7812'~'#0$#15624'"$"'?"'V":6 - ~'#0$#3906'"$#7812'~'#0$#3906'"$#7812' - ~'#0$#15624'" - DO :3 <- "'?":1~'#3906$#0'"$":2~'#3906$#0'"' - ~'#0$#15624'"$"'?":1~'#0$#3906'"$":2~'#0$ - #3906'"'~'#0$#15624'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#3906$#0'"$ - #3125'~'#0$#3906'"$"'?:3~:3'~'#781$#0'"' - ~'#3125$#781'"$"'?:3~:3'~'#0$#3906'"'"~#1'$ - #3"~#1 - PLEASE DO (1557) NEXT - DO (1510) NEXT - PLEASE DO :1 <- :3 - DO .5 <- '?#0$"'V.1$#3'~#1"'~#1 - DO (1557) NEXT - DO .1 <- '^.1$#3906'~'#0$#3906' - DO (1556) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :5 <- "'V":4~'.1$#0'"$":5~'#3906$#0'"' - ~'#0$#3906'"$"'V":4~'#0$.1'"$":5~'#0$ - #3906'"'~'#0$#3906'" - DO .5 <- "?#2$':4~#1'"~#1 - DO (1551) NEXT - DO :2 <- :2~'#3906$#3905' - DO :4 <- :4~'#3906$#3905' - DO .1 <- #0 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - DO :3 <- :5 - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 - DO :2 <- #0 - DO .2 <- #0 - DO .5 <- '?".1~#4"$#5'~#5 - DO (1729) NEXT - DO .5 <- .1~#1 - DO .2 <- :1~'#3906$#0' - DO .1 <- :1~'#0$#3906' - PLEASE DO (1724) NEXT - DO :1 <- '"?#0$.2"~"#0$#3906"'$'"?#0$.1"~"#0$ - #3906"' - DO :2 <- '"?'"V.2$#3906"~"#0$#3906"'$ - #3906"~"#0$#3906"'$'"?'"V.1$#3906" - ~"#0$#3906"'$#3906"~"#0$#3906"' - DO (1728) NEXT - (1724) PLEASE DO (1723) NEXT - DO :1 <- '"?#0$'"^.2$.2"~"#0$#3906"'"~"#0$#3906"'$ - '"?#0$'"^.1$.1"~"#0$#3906"'"~"#0$#3906"' - DO :2 <- '"?'"V'"@.2$#11718"~"#0$#3906"'$#7812" - ~"#0$#3906"'$#7812"~"#0$#3906"'$'"?'"V'"@.1$ - #11718"~"#0$#3906"'$#7812"~"#0$#3906"'$#7812" - ~"#0$#3906"' - (1728) DO .2 <- :2~'#3125$#0' - DO :2 <- ':2~"#0$#3906"'$'"':2~"#781$#0"'$#0" - ~"#781$#1"' - DO (1509) NEXT - DO :2 <- :3 - DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 - DO (1721) NEXT - (1723) PLEASE DO (1722) NEXT - DO :1 <- '"^.2$.2"~"#0$#3906"'$'"^.1$.1"~"#0$ - #3906"' - DO :2 <- '"?'"V'"2@.2$#15624"~"#0$#3906"'$ - #11718"~"#0$#3906"'$#11718"~"#0$#3906"'$ - '"?'"V'"2@.1$#15624"~"#0$#3906"'$#11718" - ~"#0$#3906"'$#11718"~"#0$#3906"' - PLEASE FORGET #2 - DO (1728) NEXT - (1729) DO (1001) NEXT - DO (1721) NEXT - (1722) PLEASE DO (1001) NEXT - DO :2 <- :1 - DO .2 <- #0 - DO FORGET #1 - (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 - PLEASE RESUME #3 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO %20 (1903) NEXT - DO .1 <- 'V.1$.2'~'#0$#3906' - DO %50 .1 <- '^.1$".2~#7812"'~'#0$#3906' - DO %50 .1 <- '^.1$.2'~'#0$#3906' - PLEASE DO (1903) NEXT - (1903) PLEASE FORGET #2 - DO .2 <- !2$#0'~'#781$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #15613 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET SOMETHING FROM NOTHING - (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'~#4"$#3'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #7812 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#3875$#3875' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 + PLEASE KNOCK "SHAVE-AND-A-HAIRCUT" 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$#3906' + DO .6 <- '?"'V"'&.1$.2'~'#0$#3906'"$"'^"'@.1$ + .2'~'#0$#3906'"$#3906'~'#0$#11718'"' + ~'#0$#3906'"$#11718'~'#0$#3906' + PLEASE DO .5 <- "?!6~#12500'$#5"~#5 + 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'~#4"$#5'~#5 + DO (1003) NEXT + DO .1 <- .3 + DO .2 <- !6$#0'~'#781$#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 <- '?#15624$.2'~'#0$#3906' + 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 <- '?"'V".1~.2"$#3'~#1"$#2'~#1 + PLEASE DO .1 <- '^.1$.2'~'#0$#3906' + DO (1022) NEXT + DO .2 <- !2$#0'~'#781$#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~#3906 + PLEASE DO .5 <- :1~'#3875$#3875' + DO .5 <- '?"!5~.5'~#4"$#5'~#5 + 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~'#3875$#3875' + DO .5 <- '?"!5~.5'~#4"$#5'~#5 + 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~#3906 + PLEASE DO .2 <- :2~#3906 + DO (1009) NEXT + DO .5 <- .3 + PLEASE DO .6 <- .4 + DO .1 <- :1~'#3875$#3875' + DO .2 <- :2~'#3875$#3875' + 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' + 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 <- "'?#15624$":2~'#3906$#0'"'~'#0$#3906'"$ + "'?#15624$":2~'#0$#3906'"'~'#0$#3906'" + 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~#3255 + DO (1525) NEXT + PLEASE DO .4 <- 'V.3$".2~#3255"'~'#0$#3906' + DO .3 <- .1~#651 + PLEASE DO (1525) NEXT + DO :1 <- .4$"'V.3$".2~#651"'~'#0$#3906'" + PLEASE RETRIEVE .3 + .4 + DO RESUME #1 + (1525) DO .3 <- '"!3$#0'~'#781$#1'"$#0'~'#156$#6' + PLEASE RESUME #1 + (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 + DO :3 <- #0 + DO :4 <- .2 + DO (1535) NEXT + (1535) PLEASE FORGET #1 + DO .5 <- '?".1~#4"$#5'~#5 + DO (1531) NEXT + DO :1 <- :4 + DO (1720) NEXT + DO :1 <- :3 + DO (1500) NEXT + PLEASE DO (1533) NEXT + (1531) PLEASE DO (1001) NEXT + (1533) DO FORGET #1 + DO .1 <- .1~#3905 + DO :4 <- ":4~'#0$#3906'"$"'":4~'#781$#0'"$#0' + ~'#781$#1'" + PLEASE DO .5 <- '?"!1~.1'~#4"$#5'~#5 + DO (1532) NEXT + DO (1535) NEXT + (1532) DO (1001) NEXT + DO :1 <- :3 + PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .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~#3906 + PLEASE DO .2 <- :2~'#3875$#3875' + DO .5 <- :1~'#3875$#3875' + DO (1530) NEXT + DO :3 <- :1 + DO .2 <- :2~#3906 + PLEASE DO (1530) NEXT + DO :5 <- :1 + DO .1 <- .5 + DO (1530) NEXT + DO :4 <- :1 + PLEASE DO :1 <- ":3~'#3875$#3875'"$":4 + ~'#3875$#3875'" + DO .5 <- ':1~:1'~#4 + DO .2 <- :2~'#3875$#3875' + DO (1530) NEXT + PLEASE DO .5 <- '"':1~:1'~#4"$.5'~#6 + DO .1 <- :3~#3906 + DO .2 <- #0 + DO (1520) NEXT + PLEASE DO :2 <- :1 + PLEASE DO .1 <- :4~#3906 + DO (1520) NEXT + DO (1509) NEXT + DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#131 + DO :1 <- :3 + DO :2 <- :5 + DO (1509) NEXT + PLEASE DO .5 <- !5$"'^":4~#1"$#2'~#1"'~#3256 + DO .5 <- '?"!5~.5'~#1"$#2'~#1 + 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 + :6 + .1 + .5 + DO :5 <- #0 + DO .5 <- '?"':2~:2'~#4"$#5'~#5 + PLEASE DO (1551) NEXT + DO :4 <- #1 + PLEASE DO (1553) NEXT + (1553) DO FORGET #1 + DO .5 <- '?"':2~"#12500$#0"'"$#3'~#1 + DO (1552) NEXT + DO :2 <- ":2~'#0$#3906'"$"'":2~'#781$#0'"$#0' + ~'#781$#1'" + PLEASE DO :4 <- ":4~'#0$#3906'"$"'":4~'#781 + $#0'"$#0'~'#781$#1'" + DO (1553) NEXT + (1552) DO (1001) NEXT + DO .1 <- #0 + (1556) PLEASE FORGET #1 + DO :6 <- "'&":2~'#3906$#0'"$"'?#15624$":1 + ~'#3906$#0'"'~'#0$#3906'"'~'#0$#3906'"$ + "'&":2~'#0$#3906'"$"'?#15624$":1~'#0$ + #3906'"'~'#0$#3906'"'~'#0$#3906'" + DO :6 <- "'?"'V":6~'#3906$#0'"$#7812'~'#0$ + #3906'"$#7812'~'#0$#15624'"$"'?"'V":6 + ~'#0$#3906'"$#7812'~'#0$#3906'"$#7812' + ~'#0$#15624'" + DO :3 <- "'?":1~'#3906$#0'"$":2~'#3906$#0'"' + ~'#0$#15624'"$"'?":1~'#0$#3906'"$":2~'#0$ + #3906'"'~'#0$#15624'" + DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#3906$#0'"$ + #3125'~'#0$#3906'"$"'?:3~:3'~'#781$#0'"' + ~'#3125$#781'"$"'?:3~:3'~'#0$#3906'"'"~#1'$ + #3"~#1 + PLEASE DO (1557) NEXT + DO (1510) NEXT + PLEASE DO :1 <- :3 + DO .5 <- '?#0$"'V.1$#3'~#1"'~#1 + DO (1557) NEXT + DO .1 <- '^.1$#3906'~'#0$#3906' + DO (1556) NEXT + (1557) PLEASE DO (1001) NEXT + PLEASE FORGET #1 + DO :5 <- "'V":4~'.1$#0'"$":5~'#3906$#0'"' + ~'#0$#3906'"$"'V":4~'#0$.1'"$":5~'#0$ + #3906'"'~'#0$#3906'" + DO .5 <- "?#2$':4~#1'"~#1 + DO (1551) NEXT + DO :2 <- :2~'#3906$#3905' + DO :4 <- :4~'#3906$#3905' + DO .1 <- #0 + PLEASE DO (1556) NEXT + (1551) DO (1001) NEXT + DO :3 <- :5 + PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 + PLEASE RESUME #2 + (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 + DO :2 <- #0 + DO .2 <- #0 + DO .5 <- '?".1~#4"$#5'~#5 + DO (1729) NEXT + DO .5 <- .1~#1 + DO .2 <- :1~'#3906$#0' + DO .1 <- :1~'#0$#3906' + PLEASE DO (1724) NEXT + DO :1 <- '"?#0$.2"~"#0$#3906"'$'"?#0$.1"~"#0$ + #3906"' + DO :2 <- '"?'"V.2$#3906"~"#0$#3906"'$ + #3906"~"#0$#3906"'$'"?'"V.1$#3906" + ~"#0$#3906"'$#3906"~"#0$#3906"' + DO (1728) NEXT + (1724) PLEASE DO (1723) NEXT + DO :1 <- '"?#0$'"^.2$.2"~"#0$#3906"'"~"#0$#3906"'$ + '"?#0$'"^.1$.1"~"#0$#3906"'"~"#0$#3906"' + DO :2 <- '"?'"V'"@.2$#11718"~"#0$#3906"'$#7812" + ~"#0$#3906"'$#7812"~"#0$#3906"'$'"?'"V'"@.1$ + #11718"~"#0$#3906"'$#7812"~"#0$#3906"'$#7812" + ~"#0$#3906"' + (1728) DO .2 <- :2~'#3125$#0' + DO :2 <- ':2~"#0$#3906"'$'"':2~"#781$#0"'$#0" + ~"#781$#1"' + DO (1509) NEXT + DO :2 <- :3 + DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 + DO (1721) NEXT + (1723) PLEASE DO (1722) NEXT + DO :1 <- '"^.2$.2"~"#0$#3906"'$'"^.1$.1"~"#0$ + #3906"' + DO :2 <- '"?'"V'"2@.2$#15624"~"#0$#3906"'$ + #11718"~"#0$#3906"'$#11718"~"#0$#3906"'$ + '"?'"V'"2@.1$#15624"~"#0$#3906"'$#11718" + ~"#0$#3906"'$#11718"~"#0$#3906"' + PLEASE FORGET #2 + DO (1728) NEXT + (1729) DO (1001) NEXT + DO (1721) NEXT + (1722) PLEASE DO (1001) NEXT + DO :2 <- :1 + DO .2 <- #0 + DO FORGET #1 + (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 + PLEASE RESUME #3 + (1900) DO STASH .2 + .5 + DO .1 <- #0 + DO .2 <- #1 + PLEASE DO (1901) NEXT + (1901) DO %20 (1903) NEXT + DO .1 <- 'V.1$.2'~'#0$#3906' + DO %50 .1 <- '^.1$".2~#7812"'~'#0$#3906' + DO %50 .1 <- '^.1$.2'~'#0$#3906' + PLEASE DO (1903) NEXT + (1903) PLEASE FORGET #2 + DO .2 <- !2$#0'~'#781$#1' + PLEASE DO .5 <- '^".2~.2"$#1'~#1 + DO (1902) NEXT + DO (1901) NEXT + (1902) DO (1001) NEXT + DO RETRIEVE .2 + .5 + PLEASE RESUME #2 + (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 + DO .3 <- #15613 + DO :1 <- #6 + DO (1911) NEXT + PLEASE NOTE THAT YOU CAN'T GET SOMETHING FROM NOTHING + (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'~#4"$#3'~#1 + DO (1912) NEXT + DO .1 <- #12 + PLEASE DO (1050) NEXT + DO RETRIEVE .1 + DO (1530) NEXT + DO :2 <- #7812 + DO (1500) NEXT + PLEASE DO .2 <- :3~'#3875$#3875' + PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + DO RESUME #1 diff --git a/pit/lib/syslib.6i b/pit/lib/syslib.6i index 156a59f..43e5f52 100644 --- a/pit/lib/syslib.6i +++ b/pit/lib/syslib.6i @@ -1,373 +1,373 @@ - PLEASE KNOCK THRICE TWO TIMES 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$#9331' - DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#9331'"$"'^"'@.1$ - .2'~'#0$#9331'"$#9331'~'#0$#9331'"'~'#0$ - #9331'"$"'^"'2@.1$.2'~'#0$#9331'"$#18662' - ~'#0$#9331'"'~'#0$#37324'"$#37324'~'#0$#9331' - PLEASE DO .5 <- "?!6~#38880'$#6"~#6 - 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'~#5"$#6'~#6 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#1555$#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 <- '?#46655$.2'~'#0$#9331' - 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 <- '?"'V".1~.2"$#4'~#1"$#3'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#9331' - DO (1022) NEXT - DO .2 <- !2$#0'~'#1555$#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~#9331 - PLEASE DO .5 <- :1~'#9288$#9288' - DO .5 <- '?"!5~.5'~#5"$#6'~#6 - 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~'#9288$#9288' - DO .5 <- '?"!5~.5'~#5"$#6'~#6 - DO (1051) NEXT - DO (1999) NEXT - (1051) DO (1001) NEXT - DO .2 <- :3 - PLEASE RETRIEVE :2 + :3 + .5 - DO RESUME #2 - (1200) DO .2 <- '^.1$.1'~'#0$#9331' - DO .3 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO .2 <- '^.2$"!3$#0'~'#1555$#1'"'~'#0$#9331' - DO .3 <- .3~#7776 - PLEASE RESUME #1 - (1210) DO .2 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ - #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331' - DO .3 <- '^"'^.1$.1'~'#0$#9331'"$.1'~'#0$#9331' - DO .2 <- '^.2$".3~#9330"'~'#0$#9331' - DO .3 <- .3~#1 - PLEASE RESUME #1 - (1500) PLEASE ABSTAIN FROM (1502) - PLEASE ABSTAIN FROM (1506) - (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 - DO .1 <- :1~#9331 - PLEASE DO .2 <- :2~#9331 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#9288$#9288' - DO .2 <- :2~'#9288$#9288' - 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' - 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 <- "'?#46655$":2~'#9331$#0'"'~'#0$#9331'"$ - "'?#46655$":2~'#0$#9331'"'~'#0$#9331'" - 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~#7998 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#7998"'~'#0$#9331' - DO .3 <- .1~#1333 - PLEASE DO (1525) NEXT - DO :1 <- .4$"'V.3$".2~#1333"'~'#0$#9331'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#1555$#1'"$#0'~'#259$#7' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + .1 + .2 + .3 - DO :3 <- #0 - DO :2 <- .1 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .3 <- '?"!2~.2'~#5"$#6'~#6 - DO (1532) NEXT - DO .1 <- .2 - DO (1210) NEXT - DO .3 <- '?#1$".3~#5"'~#1 - DO (1531) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1534) NEXT - (1533) DO FORGET #1 - DO :1 <- :2 - DO (1700) NEXT - DO (1535) NEXT - (1534) PLEASE RESUME .3 - (1532) DO (1534) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 - 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~#9331 - PLEASE DO .2 <- :2~'#9288$#9288' - DO .5 <- :1~'#9288$#9288' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#9331 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#9288$#9288'"$":4 - ~'#9288$#9288'" - DO .5 <- ':1~:1'~#5 - DO .2 <- :2~'#9288$#9288' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#5"$.5'~#7 - DO .1 <- :3~#9331 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#9331 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#223 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#7999 - DO .5 <- '?"!5~.5'~#1"$#3'~#1 - 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 + :1 + :4 + :5 + :6 + .1 + .5 - DO :3 <- #0 - DO .5 <- '?"':2~:2'~#5"$#6'~#6 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?#0$"'V"'2@":2~'#7776$#0'"$#5'~#1"$#4' - ~#1"'~#1 - DO (1552) NEXT - DO :5 <- :2 - DO :1 <- :4 - PLEASE DO (1700) NEXT - DO :4 <- :2 - DO :1 <- :5 - PLEASE DO (1700) NEXT - DO (1553) NEXT - (1552) DO (1001) NEXT - DO RETRIEVE :1 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#9331$#0'"$"'?#46655$":1 - ~'#9331$#0'"'~'#0$#9331'"'~'#0$#9331'"$ - "'&":2~'#0$#9331'"$"'?#46655$":1~'#0$ - #9331'"'~'#0$#9331'"'~'#0$#9331'" - DO :5 <- "'?":1~'#9331$#0'"$":2~'#9331$#0'"' - ~'#0$#9331'"$"'?":1~'#0$#9331'"$":2~'#0$ - #9331'"'~'#0$#9331'" - DO :6 <- "'&":6~'#9331$#0'"$":5~'#9331$#0'"' - ~'#0$#9331'"$"'&":6~'#0$#9331'"$":5~'#0$ - #9331'"'~'#0$#9331'" - DO :5 <- :5~'#46655$#46655' - DO :6 <- "'?"'V":6~'#9331$#0'"$#27993'~'#0$ - #9331'"$#27993'~'#0$#46655'"$"'?"'V":6 - ~'#0$#9331'"$#27993'~'#0$#9331'"$#27993' - ~'#0$#46655'" - DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#9331$#0'"$ - #7776'~'#0$#9331'"$"'?:5~:5'~'#1555$#0'"' - ~'#7776$#1555'"$"'?:5~:5'~'#0$#9331'"'"~#1'$ - #4"~#1 - DO (1554) NEXT - DO :5 <- :3 - DO (1510) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO :2 <- :5 - DO :5 <- :3 - DO (1500) NEXT - DO :2 <- :4 - DO :4 <- :1 - DO :1 <- :5 - DO (1555) NEXT - (1554) PLEASE DO (1001) NEXT - (1555) DO FORGET #1 - DO .5 <- '?#2$"'@#0$":4~#1"'~#1"'~#1 - DO (1551) NEXT - DO :5 <- :1 - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :4 - DO :4 <- :2 - DO (1710) NEXT - DO :1 <- :5 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1700) PLEASE STASH .2 - DO .1 <- :1~'#0$#9331' - DO .2 <- :1~'#9331$#0' - DO :2 <- "'^.2$.2'~'#0$#9331'"$"'^.1$.1'~'#0$ - #9331'" - DO .1 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO .2 <- '?"'2@.2$#0'~'#0$#9331'"$"'2@.2$#46655' - ~'#0$#9331'"'~'#0$#9331' - DO :2 <- "'^":2~'#9331$#0'"$.1'~'#0$#9331'"$"'^":2 - ~'#0$#9331'"$"'.2$#0'~'#1555$#1'"'~'#0$#9331'" - DO .1 <- .2~#7776 - PLEASE RETRIEVE .2 - PLEASE RESUME #1 - (1710) PLEASE STASH :1 + .2 - DO .2 <- :1~'#9331$#0' - DO .1 <- :1~'#0$#9331' - DO :2 <- "'^"'^.2$.2'~'#0$#9331'"$.2'~'#0$ - #9331'"$"'^"'^.1$.1'~'#0$#9331'"$.1'~'#0$ - #9331'" - DO .1 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ - #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331' - DO :1 <- "'^"'?"'@.2$#0'~'#0$#9331'"$"'@.2$#46655' - ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.2$#0'~'#0$ - #9331'"$"'3@.2$#46655'~'#0$#9331'"'~'#0$ - #9331'"'~'#0$#9331'"$.1 - DO .1 <- :2~#1 - DO :2 <- "'^":1~'#9331$#0'"$":2~'#0$#9330'"' - ~'#0$#9331'"$"'^":1~'#0$#9331'"$":2~'#9331$ - #0'"'~'#0$#9331'" - PLEASE RETRIEVE :1 + .2 - PLEASE RESUME #1 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#9331' - DO %50 .1 <- '^.1$.2'~'#0$#9331' - (1903) PLEASE FORGET #1 - DO %50 .1 <- '^.1$".2~#27993"'~'#0$#9331' - DO .2 <- !2$#0'~'#1555$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #46644 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET BLOOD FROM A TURNIP - (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'~#5"$#4'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #23328 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#9288$#9288' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 + PLEASE KNOCK THRICE TWO TIMES 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$#9331' + DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#9331'"$"'^"'@.1$ + .2'~'#0$#9331'"$#9331'~'#0$#9331'"'~'#0$ + #9331'"$"'^"'2@.1$.2'~'#0$#9331'"$#18662' + ~'#0$#9331'"'~'#0$#37324'"$#37324'~'#0$#9331' + PLEASE DO .5 <- "?!6~#38880'$#6"~#6 + 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'~#5"$#6'~#6 + DO (1003) NEXT + DO .1 <- .3 + DO .2 <- !6$#0'~'#1555$#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 <- '?#46655$.2'~'#0$#9331' + 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 <- '?"'V".1~.2"$#4'~#1"$#3'~#1 + PLEASE DO .1 <- '^.1$.2'~'#0$#9331' + DO (1022) NEXT + DO .2 <- !2$#0'~'#1555$#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~#9331 + PLEASE DO .5 <- :1~'#9288$#9288' + DO .5 <- '?"!5~.5'~#5"$#6'~#6 + 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~'#9288$#9288' + DO .5 <- '?"!5~.5'~#5"$#6'~#6 + DO (1051) NEXT + DO (1999) NEXT + (1051) DO (1001) NEXT + DO .2 <- :3 + PLEASE RETRIEVE :2 + :3 + .5 + DO RESUME #2 + (1200) DO .2 <- '^.1$.1'~'#0$#9331' + DO .3 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' + ~'#0$#9331'"'~'#0$#9331' + DO .2 <- '^.2$"!3$#0'~'#1555$#1'"'~'#0$#9331' + DO .3 <- .3~#7776 + PLEASE RESUME #1 + (1210) DO .2 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' + ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ + #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ + #9331'"'~'#0$#9331' + DO .3 <- '^"'^.1$.1'~'#0$#9331'"$.1'~'#0$#9331' + DO .2 <- '^.2$".3~#9330"'~'#0$#9331' + DO .3 <- .3~#1 + PLEASE RESUME #1 + (1500) PLEASE ABSTAIN FROM (1502) + PLEASE ABSTAIN FROM (1506) + (1509) PLEASE STASH :1 + .1 + .2 + .3 + .4 + .5 + .6 + DO .1 <- :1~#9331 + PLEASE DO .2 <- :2~#9331 + DO (1009) NEXT + DO .5 <- .3 + PLEASE DO .6 <- .4 + DO .1 <- :1~'#9288$#9288' + DO .2 <- :2~'#9288$#9288' + 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' + 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 <- "'?#46655$":2~'#9331$#0'"'~'#0$#9331'"$ + "'?#46655$":2~'#0$#9331'"'~'#0$#9331'" + 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~#7998 + DO (1525) NEXT + PLEASE DO .4 <- 'V.3$".2~#7998"'~'#0$#9331' + DO .3 <- .1~#1333 + PLEASE DO (1525) NEXT + DO :1 <- .4$"'V.3$".2~#1333"'~'#0$#9331'" + PLEASE RETRIEVE .3 + .4 + DO RESUME #1 + (1525) DO .3 <- '"!3$#0'~'#1555$#1'"$#0'~'#259$#7' + PLEASE RESUME #1 + (1530) DO STASH :2 + :3 + .1 + .2 + .3 + DO :3 <- #0 + DO :2 <- .1 + DO (1535) NEXT + (1535) PLEASE FORGET #1 + DO .3 <- '?"!2~.2'~#5"$#6'~#6 + DO (1532) NEXT + DO .1 <- .2 + DO (1210) NEXT + DO .3 <- '?#1$".3~#5"'~#1 + DO (1531) NEXT + DO :1 <- :3 + DO (1500) NEXT + PLEASE DO (1533) NEXT + (1531) PLEASE DO (1534) NEXT + (1533) DO FORGET #1 + DO :1 <- :2 + DO (1700) NEXT + DO (1535) NEXT + (1534) PLEASE RESUME .3 + (1532) DO (1534) NEXT + DO :1 <- :3 + PLEASE RETRIEVE :2 + :3 + .1 + .2 + .3 + 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~#9331 + PLEASE DO .2 <- :2~'#9288$#9288' + DO .5 <- :1~'#9288$#9288' + DO (1530) NEXT + DO :3 <- :1 + DO .2 <- :2~#9331 + PLEASE DO (1530) NEXT + DO :5 <- :1 + DO .1 <- .5 + DO (1530) NEXT + DO :4 <- :1 + PLEASE DO :1 <- ":3~'#9288$#9288'"$":4 + ~'#9288$#9288'" + DO .5 <- ':1~:1'~#5 + DO .2 <- :2~'#9288$#9288' + DO (1530) NEXT + PLEASE DO .5 <- '"':1~:1'~#5"$.5'~#7 + DO .1 <- :3~#9331 + DO .2 <- #0 + DO (1520) NEXT + PLEASE DO :2 <- :1 + PLEASE DO .1 <- :4~#9331 + DO (1520) NEXT + DO (1509) NEXT + DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#223 + DO :1 <- :3 + DO :2 <- :5 + DO (1509) NEXT + PLEASE DO .5 <- !5$"'^":4~#1"$#3'~#1"'~#7999 + DO .5 <- '?"!5~.5'~#1"$#3'~#1 + 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 + :1 + :4 + :5 + :6 + .1 + .5 + DO :3 <- #0 + DO .5 <- '?"':2~:2'~#5"$#6'~#6 + PLEASE DO (1551) NEXT + DO :4 <- #1 + PLEASE DO (1553) NEXT + (1553) DO FORGET #1 + DO .5 <- '?#0$"'V"'2@":2~'#7776$#0'"$#5'~#1"$#4' + ~#1"'~#1 + DO (1552) NEXT + DO :5 <- :2 + DO :1 <- :4 + PLEASE DO (1700) NEXT + DO :4 <- :2 + DO :1 <- :5 + PLEASE DO (1700) NEXT + DO (1553) NEXT + (1552) DO (1001) NEXT + DO RETRIEVE :1 + (1556) PLEASE FORGET #1 + DO :6 <- "'&":2~'#9331$#0'"$"'?#46655$":1 + ~'#9331$#0'"'~'#0$#9331'"'~'#0$#9331'"$ + "'&":2~'#0$#9331'"$"'?#46655$":1~'#0$ + #9331'"'~'#0$#9331'"'~'#0$#9331'" + DO :5 <- "'?":1~'#9331$#0'"$":2~'#9331$#0'"' + ~'#0$#9331'"$"'?":1~'#0$#9331'"$":2~'#0$ + #9331'"'~'#0$#9331'" + DO :6 <- "'&":6~'#9331$#0'"$":5~'#9331$#0'"' + ~'#0$#9331'"$"'&":6~'#0$#9331'"$":5~'#0$ + #9331'"'~'#0$#9331'" + DO :5 <- :5~'#46655$#46655' + DO :6 <- "'?"'V":6~'#9331$#0'"$#27993'~'#0$ + #9331'"$#27993'~'#0$#46655'"$"'?"'V":6 + ~'#0$#9331'"$#27993'~'#0$#9331'"$#27993' + ~'#0$#46655'" + DO .5 <- "?'"':6~:5'~'"'"'&"':5~:5'~'#9331$#0'"$ + #7776'~'#0$#9331'"$"'?:5~:5'~'#1555$#0'"' + ~'#7776$#1555'"$"'?:5~:5'~'#0$#9331'"'"~#1'$ + #4"~#1 + DO (1554) NEXT + DO :5 <- :3 + DO (1510) NEXT + DO :1 <- :4 + DO :4 <- :2 + DO :2 <- :5 + DO :5 <- :3 + DO (1500) NEXT + DO :2 <- :4 + DO :4 <- :1 + DO :1 <- :5 + DO (1555) NEXT + (1554) PLEASE DO (1001) NEXT + (1555) DO FORGET #1 + DO .5 <- '?#2$"'@#0$":4~#1"'~#1"'~#1 + DO (1551) NEXT + DO :5 <- :1 + DO :1 <- :4 + DO :4 <- :2 + DO (1710) NEXT + DO :1 <- :4 + DO :4 <- :2 + DO (1710) NEXT + DO :1 <- :5 + PLEASE DO (1556) NEXT + (1551) DO (1001) NEXT + PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 + PLEASE RESUME #2 + (1700) PLEASE STASH .2 + DO .1 <- :1~'#0$#9331' + DO .2 <- :1~'#9331$#0' + DO :2 <- "'^.2$.2'~'#0$#9331'"$"'^.1$.1'~'#0$ + #9331'" + DO .1 <- '?"'2@.1$#0'~'#0$#9331'"$"'2@.1$#46655' + ~'#0$#9331'"'~'#0$#9331' + DO .2 <- '?"'2@.2$#0'~'#0$#9331'"$"'2@.2$#46655' + ~'#0$#9331'"'~'#0$#9331' + DO :2 <- "'^":2~'#9331$#0'"$.1'~'#0$#9331'"$"'^":2 + ~'#0$#9331'"$"'.2$#0'~'#1555$#1'"'~'#0$#9331'" + DO .1 <- .2~#7776 + PLEASE RETRIEVE .2 + PLEASE RESUME #1 + (1710) PLEASE STASH :1 + .2 + DO .2 <- :1~'#9331$#0' + DO .1 <- :1~'#0$#9331' + DO :2 <- "'^"'^.2$.2'~'#0$#9331'"$.2'~'#0$ + #9331'"$"'^"'^.1$.1'~'#0$#9331'"$.1'~'#0$ + #9331'" + DO .1 <- '^"'?"'@.1$#0'~'#0$#9331'"$"'@.1$#46655' + ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.1$#0'~'#0$ + #9331'"$"'3@.1$#46655'~'#0$#9331'"'~'#0$ + #9331'"'~'#0$#9331' + DO :1 <- "'^"'?"'@.2$#0'~'#0$#9331'"$"'@.2$#46655' + ~'#0$#9331'"'~'#0$#9331'"$"'?"'3@.2$#0'~'#0$ + #9331'"$"'3@.2$#46655'~'#0$#9331'"'~'#0$ + #9331'"'~'#0$#9331'"$.1 + DO .1 <- :2~#1 + DO :2 <- "'^":1~'#9331$#0'"$":2~'#0$#9330'"' + ~'#0$#9331'"$"'^":1~'#0$#9331'"$":2~'#9331$ + #0'"'~'#0$#9331'" + PLEASE RETRIEVE :1 + .2 + PLEASE RESUME #1 + (1900) DO STASH .2 + .5 + DO .1 <- #0 + DO .2 <- #1 + PLEASE DO (1901) NEXT + (1901) DO FORGET #1 + DO %50 (1904) NEXT + DO %50 (1901) NEXT + PLEASE DO (1903) NEXT + (1904) DO .1 <- '^.1$.2'~'#0$#9331' + DO %50 .1 <- '^.1$.2'~'#0$#9331' + (1903) PLEASE FORGET #1 + DO %50 .1 <- '^.1$".2~#27993"'~'#0$#9331' + DO .2 <- !2$#0'~'#1555$#1' + PLEASE DO .5 <- '^".2~.2"$#1'~#1 + DO (1902) NEXT + DO (1901) NEXT + (1902) DO (1001) NEXT + DO RETRIEVE .2 + .5 + PLEASE RESUME #2 + (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 + DO .3 <- #46644 + DO :1 <- #6 + DO (1911) NEXT + PLEASE NOTE THAT YOU CAN'T GET BLOOD FROM A TURNIP + (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'~#5"$#4'~#1 + DO (1912) NEXT + DO .1 <- #12 + PLEASE DO (1050) NEXT + DO RETRIEVE .1 + DO (1530) NEXT + DO :2 <- #23328 + DO (1500) NEXT + PLEASE DO .2 <- :3~'#9288$#9288' + PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + DO RESUME #1 diff --git a/pit/lib/syslib.7i b/pit/lib/syslib.7i index 1d51a1a..ea218e0 100644 --- a/pit/lib/syslib.7i +++ b/pit/lib/syslib.7i @@ -1,402 +1,402 @@ - PLEASE KNOCK "SHAVE-AND-A-HAIRCUT-TWO-PLEASE" 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$#2801' - DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#2801'"$"'^"'@.1$ - .2'~'#0$#2801'"$#2801'~'#0$#2801'"'~'#0$ - #2801'"$"'^"'2@.1$.2'~'#0$#2801'"$#5602' - ~'#0$#2801'"'~'#0$#14005'"$#14005'~'#0$#2801' - PLEASE DO .5 <- "?!6~#14406'$#7"~#7 - 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'~#6"$#7'~#7 - DO (1003) NEXT - DO .1 <- .3 - DO .2 <- !6$#0'~'#400$#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 <- '?#16806$.2'~'#0$#2801' - 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 <- '?"'V".1~.2"$#5'~#1"$#4'~#1 - PLEASE DO .1 <- '^.1$.2'~'#0$#2801' - DO (1022) NEXT - DO .2 <- !2$#0'~'#400$#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~#2801 - PLEASE DO .5 <- :1~'#2793$#2744' - DO .5 <- '?"!5~.5'~#6"$#7'~#7 - 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~'#2793$#2744' - DO .5 <- '?"!5~.5'~#6"$#7'~#7 - 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~#2801 - PLEASE DO .2 <- :2~#2801 - DO (1009) NEXT - DO .5 <- .3 - PLEASE DO .6 <- .4 - DO .1 <- :1~'#2793$#2744' - DO .2 <- :2~'#2793$#2744' - 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' - 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 <- "'?#16806$":2~'#2801$#0'"'~'#0$#2801'"$ - "'?#16806$":2~'#0$#2801'"'~'#0$#2801'" - 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~#2451 - DO (1525) NEXT - PLEASE DO .4 <- 'V.3$".2~#350"'~'#0$#2801' - DO .3 <- .1~#350 - PLEASE DO (1526) NEXT - DO :1 <- .4$"'V.3$".2~#2451"'~'#0$#2801'" - PLEASE RETRIEVE .3 + .4 - DO RESUME #1 - (1525) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#400$#1' - PLEASE RESUME #1 - (1526) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#57$#8' - PLEASE RESUME #1 - (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 - DO :3 <- #0 - DO :4 <- .2 - DO (1535) NEXT - (1535) PLEASE FORGET #1 - DO .5 <- '?".1~#6"$#7'~#7 - DO (1531) NEXT - DO :1 <- :4 - DO (1720) NEXT - DO :1 <- :3 - DO (1500) NEXT - PLEASE DO (1533) NEXT - (1531) PLEASE DO (1001) NEXT - (1533) DO FORGET #1 - DO .1 <- .1~#2800 - DO :4 <- ":4~'#0$#2801'"$"'":4~'#400$#0'"$#0' - ~'#400$#1'" - PLEASE DO .5 <- '?"!1~.1'~#6"$#7'~#7 - DO (1532) NEXT - DO (1535) NEXT - (1532) DO (1001) NEXT - DO :1 <- :3 - PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .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~#2801 - PLEASE DO .2 <- :2~'#2793$#2744' - DO .5 <- :1~'#2793$#2744' - DO (1530) NEXT - DO :3 <- :1 - DO .2 <- :2~#2801 - PLEASE DO (1530) NEXT - DO :5 <- :1 - DO .1 <- .5 - DO (1530) NEXT - DO :4 <- :1 - PLEASE DO :1 <- ":3~'#2793$#2744'"$":4 - ~'#2793$#2744'" - DO .5 <- ':1~:1'~#6 - DO .2 <- :2~'#2793$#2744' - DO (1530) NEXT - PLEASE DO .5 <- '"':1~:1'~#6"$.5'~#8 - DO .1 <- :3~#2801 - DO .2 <- #0 - DO (1520) NEXT - PLEASE DO :2 <- :1 - PLEASE DO .1 <- :4~#2801 - DO (1520) NEXT - DO (1509) NEXT - DO .5 <- !5$"'^":4~#1"$#4'~#1"'~#351 - DO :1 <- :3 - DO :2 <- :5 - DO (1509) NEXT - PLEASE DO .5 <- !5$"'^":4~#1"$#4'~#1"'~'#57$#1' - DO .5 <- '?"!5~.5'~#1"$#4'~#1 - 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 + :6 + .1 + .5 - DO :5 <- #0 - DO .5 <- '?"':2~:2'~#6"$#7'~#7 - PLEASE DO (1551) NEXT - DO :4 <- #1 - PLEASE DO (1553) NEXT - (1553) DO FORGET #1 - DO .5 <- '?"':2~"#14406$#0"'"$#5'~#1 - DO (1552) NEXT - DO :2 <- ":2~'#0$#2801'"$"'":2~'#400$#0'"$#0' - ~'#400$#1'" - PLEASE DO :4 <- ":4~'#0$#2801'"$"'":4~'#400 - $#0'"$#0'~'#400$#1'" - DO (1553) NEXT - (1552) DO (1001) NEXT - DO .1 <- #0 - (1556) PLEASE FORGET #1 - DO :6 <- "'&":2~'#2801$#0'"$"'?#16806$":1 - ~'#2801$#0'"'~'#0$#2801'"'~'#0$#2801'"$ - "'&":2~'#0$#2801'"$"'?#16806$":1~'#0$ - #2801'"'~'#0$#2801'"'~'#0$#2801'" - DO :3 <- "'?":1~'#2801$#0'"$":2~'#2801$#0'"' - ~'#0$#2801'"$"'?":1~'#0$#2801'"$":2~'#0$ - #2801'"'~'#0$#2801'" - DO :6 <- "'&":6~'#2801$#0'"$":3~'#2801$#0'"' - ~'#0$#2801'"$"'&":6~'#0$#2801'"$":3~'#0$ - #2801'"'~'#0$#2801'" - DO :3 <- :3~'#16806$#16806' - DO :6 <- "'?"'V":6~'#2801$#0'"$#11204'~'#0$ - #2801'"$#11204'~'#0$#16806'"$"'?"'V":6 - ~'#0$#2801'"$#11204'~'#0$#2801'"$#11204' - ~'#0$#16806'" - DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#2801$#0'"$ - #2401'~'#0$#2801'"$"'?:3~:3'~'#400$#0'"' - ~'#2401$#400'"$"'?:3~:3'~'#0$#2801'"'"~#1'$ - #5"~#1 - PLEASE DO (1557) NEXT - DO (1510) NEXT - DO :1 <- :3 - DO .5 <- '?#0$"'V.1$#5'~#1"'~#1 - DO (1557) NEXT - DO .1 <- '^.1$#2801'~'#0$#2801' - DO (1556) NEXT - (1557) PLEASE DO (1001) NEXT - PLEASE FORGET #1 - DO :5 <- "'V":4~'.1$#0'"$":5~'#2801$#0'"' - ~'#0$#2801'"$"'V":4~'#0$.1'"$":5~'#0$ - #2801'"'~'#0$#2801'" - DO .5 <- "?#2$':4~#1'"~#1 - DO (1551) NEXT - DO :2 <- :2~'#2801$#2800' - DO :4 <- :4~'#2801$#2800' - DO .1 <- #0 - PLEASE DO (1556) NEXT - (1551) DO (1001) NEXT - DO :3 <- :5 - PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 - PLEASE RESUME #2 - (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 - DO :2 <- #0 - DO .2 <- #0 - DO .5 <- '?".1~#6"$#7'~#7 - DO (1729) NEXT - DO .5 <- .1~#1 - DO .2 <- :1~'#2801$#0' - DO .1 <- :1~'#0$#2801' - PLEASE DO (1726) NEXT - DO :1 <- '"?#0$.2"~"#0$#2801"'$'"?#0$.1"~"#0$ - #2801"' - DO :2 <- '"?'"V.2$#2801"~"#0$#2801"'$#2801" - ~"#0$#2801"'$'"?'"V.1$#2801"~"#0$#2801"'$ - #2801"~"#0$#2801"' - DO (1728) NEXT - (1726) PLEASE DO (1725) NEXT - DO :1 <- '"?#0$'"^.2$.2"~"#0$#2801"'"~"#0$ - #2801"'$'"?#0$'"^.1$.1"~"#0$#2801"'"~"#0$ - #2801"' - DO .2 <- "^'"V'"2@.2$#11204"~"#0$#2801"'$ - #5602"~"#0$#2801"'$'"2@.2$#2801"~"#0$ - #2801"'"~"#0$#2801" - DO .1 <- "^'"V'"2@.1$#11204"~"#0$#2801"'$ - #5602"~"#0$#2801"'$'"2@.1$#2801"~"#0$ - #2801"'"~"#0$#2801" - DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" - ~"#0$#2801"' - (1728) DO .2 <- :2~'#2401$#0' - DO :2 <- ':2~"#0$#2801"'$'"':2~"#400$#0"'$#0" - ~"#400$#1"' - DO (1509) NEXT - DO :2 <- :3 - DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 - DO (1721) NEXT - (1725) PLEASE DO (1724) NEXT - DO :2 <- '"?'"V'"?'"3@.2$#14005"~"#0$#2801"'$ - '"@.2$#0"~"#0$#2801"'"~"#0$#11204"'$#8403" - ~"#0$#2801"'$#8403"~"#0$#2801"'$ - '"?'"V'"?'"3@.1$#14005"~"#0$#2801"'$'"@.1$ - #0"~"#0$#2801"'"~"#0$#11204"'$#8403"~"#0$ - #2801"'$#8403"~"#0$#2801"' - DO .2 <- '^.2$.2'~'#0$#2801' - DO .1 <- '^.1$.1'~'#0$#2801' - DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ - #2801"' - PLEASE FORGET #2 - DO (1728) NEXT - (1724) PLEASE DO (1723) NEXT - DO :1 <- '"^'"^.2$.2"~"#0$#2801"'$.2"~"#0$ - #2801"'$'"^'"^.1$.1"~"#0$#2801"'$.1" - ~"#0$#2801"' - DO .2 <- "^'"V'"2@.2$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$'"V'"4@.2$#16806" - ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ - #2801" - DO .1 <- "^'"V'"2@.1$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$'"V'"4@.1$#16806" - ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ - #2801" - DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" - ~"#0$#2801"' - PLEASE FORGET #3 - DO (1728) NEXT - (1723) PLEASE DO (1722) NEXT - DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ - #2801"' - DO :2 <- '"?'"V'"3@.2$#16806"~"#0$#2801"'$ - #14005"~"#0$#2801"'$#14005"~"#0$#2801"'$ - '"?'"V'"3@.1$#16806"~"#0$#2801"'$#14005" - ~"#0$#2801"'$#14005"~"#0$#2801"' - PLEASE FORGET #4 - DO (1728) NEXT - (1729) DO (1001) NEXT - DO (1721) NEXT - (1722) PLEASE DO (1001) NEXT - DO :2 <- :1 - DO .2 <- #0 - DO FORGET #3 - (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 - PLEASE RESUME #3 - (1900) DO STASH .2 + .5 - DO .1 <- #0 - DO .2 <- #1 - PLEASE DO (1901) NEXT - (1901) DO FORGET #1 - DO %50 (1905) NEXT - DO %50 (1904) NEXT - DO %50 (1901) NEXT - PLEASE DO (1903) NEXT - (1905) DO FORGET #1 - DO .1 <- '^.1$".2~#8403"'~'#0$#2801' - PLEASE DO %50 .1 <- '^.1$".2~#5602"'~'#0$#2801' - DO (1906) NEXT - (1904) DO .1 <- '^.1$.2'~'#0$#2801' - (1906) DO %50 .1 <- '^.1$.2'~'#0$#2801' - (1903) PLEASE FORGET #1 - DO .2 <- !2$#0'~'#400$#1' - PLEASE DO .5 <- '^".2~.2"$#1'~#1 - DO (1902) NEXT - DO (1901) NEXT - (1902) DO (1001) NEXT - DO RETRIEVE .2 + .5 - PLEASE RESUME #2 - (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 - DO .3 <- #16795 - DO :1 <- #6 - DO (1911) NEXT - PLEASE NOTE THAT YOU CAN'T GET SENSE FROM INTERCAL - (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'~#6"$#5'~#1 - DO (1912) NEXT - DO .1 <- #12 - PLEASE DO (1050) NEXT - DO RETRIEVE .1 - DO (1530) NEXT - DO :2 <- #8403 - DO (1500) NEXT - PLEASE DO .2 <- :3~'#2793$#2744' - PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 - DO RESUME #1 + PLEASE KNOCK "SHAVE-AND-A-HAIRCUT-TWO-PLEASE" 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$#2801' + DO .6 <- '?"'V"'V"'&.1$.2'~'#0$#2801'"$"'^"'@.1$ + .2'~'#0$#2801'"$#2801'~'#0$#2801'"'~'#0$ + #2801'"$"'^"'2@.1$.2'~'#0$#2801'"$#5602' + ~'#0$#2801'"'~'#0$#14005'"$#14005'~'#0$#2801' + PLEASE DO .5 <- "?!6~#14406'$#7"~#7 + 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'~#6"$#7'~#7 + DO (1003) NEXT + DO .1 <- .3 + DO .2 <- !6$#0'~'#400$#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 <- '?#16806$.2'~'#0$#2801' + 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 <- '?"'V".1~.2"$#5'~#1"$#4'~#1 + PLEASE DO .1 <- '^.1$.2'~'#0$#2801' + DO (1022) NEXT + DO .2 <- !2$#0'~'#400$#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~#2801 + PLEASE DO .5 <- :1~'#2793$#2744' + DO .5 <- '?"!5~.5'~#6"$#7'~#7 + 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~'#2793$#2744' + DO .5 <- '?"!5~.5'~#6"$#7'~#7 + 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~#2801 + PLEASE DO .2 <- :2~#2801 + DO (1009) NEXT + DO .5 <- .3 + PLEASE DO .6 <- .4 + DO .1 <- :1~'#2793$#2744' + DO .2 <- :2~'#2793$#2744' + 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' + 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 <- "'?#16806$":2~'#2801$#0'"'~'#0$#2801'"$ + "'?#16806$":2~'#0$#2801'"'~'#0$#2801'" + 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~#2451 + DO (1525) NEXT + PLEASE DO .4 <- 'V.3$".2~#350"'~'#0$#2801' + DO .3 <- .1~#350 + PLEASE DO (1526) NEXT + DO :1 <- .4$"'V.3$".2~#2451"'~'#0$#2801'" + PLEASE RETRIEVE .3 + .4 + DO RESUME #1 + (1525) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#400$#1' + PLEASE RESUME #1 + (1526) DO .3 <- '"!3$#0'~'#400$#1'"$#0'~'#57$#8' + PLEASE RESUME #1 + (1530) DO STASH :2 + :3 + :4 + .1 + .2 + .5 + DO :3 <- #0 + DO :4 <- .2 + DO (1535) NEXT + (1535) PLEASE FORGET #1 + DO .5 <- '?".1~#6"$#7'~#7 + DO (1531) NEXT + DO :1 <- :4 + DO (1720) NEXT + DO :1 <- :3 + DO (1500) NEXT + PLEASE DO (1533) NEXT + (1531) PLEASE DO (1001) NEXT + (1533) DO FORGET #1 + DO .1 <- .1~#2800 + DO :4 <- ":4~'#0$#2801'"$"'":4~'#400$#0'"$#0' + ~'#400$#1'" + PLEASE DO .5 <- '?"!1~.1'~#6"$#7'~#7 + DO (1532) NEXT + DO (1535) NEXT + (1532) DO (1001) NEXT + DO :1 <- :3 + PLEASE RETRIEVE :2 + :3 + :4 + .1 + .2 + .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~#2801 + PLEASE DO .2 <- :2~'#2793$#2744' + DO .5 <- :1~'#2793$#2744' + DO (1530) NEXT + DO :3 <- :1 + DO .2 <- :2~#2801 + PLEASE DO (1530) NEXT + DO :5 <- :1 + DO .1 <- .5 + DO (1530) NEXT + DO :4 <- :1 + PLEASE DO :1 <- ":3~'#2793$#2744'"$":4 + ~'#2793$#2744'" + DO .5 <- ':1~:1'~#6 + DO .2 <- :2~'#2793$#2744' + DO (1530) NEXT + PLEASE DO .5 <- '"':1~:1'~#6"$.5'~#8 + DO .1 <- :3~#2801 + DO .2 <- #0 + DO (1520) NEXT + PLEASE DO :2 <- :1 + PLEASE DO .1 <- :4~#2801 + DO (1520) NEXT + DO (1509) NEXT + DO .5 <- !5$"'^":4~#1"$#4'~#1"'~#351 + DO :1 <- :3 + DO :2 <- :5 + DO (1509) NEXT + PLEASE DO .5 <- !5$"'^":4~#1"$#4'~#1"'~'#57$#1' + DO .5 <- '?"!5~.5'~#1"$#4'~#1 + 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 + :6 + .1 + .5 + DO :5 <- #0 + DO .5 <- '?"':2~:2'~#6"$#7'~#7 + PLEASE DO (1551) NEXT + DO :4 <- #1 + PLEASE DO (1553) NEXT + (1553) DO FORGET #1 + DO .5 <- '?"':2~"#14406$#0"'"$#5'~#1 + DO (1552) NEXT + DO :2 <- ":2~'#0$#2801'"$"'":2~'#400$#0'"$#0' + ~'#400$#1'" + PLEASE DO :4 <- ":4~'#0$#2801'"$"'":4~'#400 + $#0'"$#0'~'#400$#1'" + DO (1553) NEXT + (1552) DO (1001) NEXT + DO .1 <- #0 + (1556) PLEASE FORGET #1 + DO :6 <- "'&":2~'#2801$#0'"$"'?#16806$":1 + ~'#2801$#0'"'~'#0$#2801'"'~'#0$#2801'"$ + "'&":2~'#0$#2801'"$"'?#16806$":1~'#0$ + #2801'"'~'#0$#2801'"'~'#0$#2801'" + DO :3 <- "'?":1~'#2801$#0'"$":2~'#2801$#0'"' + ~'#0$#2801'"$"'?":1~'#0$#2801'"$":2~'#0$ + #2801'"'~'#0$#2801'" + DO :6 <- "'&":6~'#2801$#0'"$":3~'#2801$#0'"' + ~'#0$#2801'"$"'&":6~'#0$#2801'"$":3~'#0$ + #2801'"'~'#0$#2801'" + DO :3 <- :3~'#16806$#16806' + DO :6 <- "'?"'V":6~'#2801$#0'"$#11204'~'#0$ + #2801'"$#11204'~'#0$#16806'"$"'?"'V":6 + ~'#0$#2801'"$#11204'~'#0$#2801'"$#11204' + ~'#0$#16806'" + DO .5 <- "?'"':6~:3'~'"'"'&"':3~:3'~'#2801$#0'"$ + #2401'~'#0$#2801'"$"'?:3~:3'~'#400$#0'"' + ~'#2401$#400'"$"'?:3~:3'~'#0$#2801'"'"~#1'$ + #5"~#1 + PLEASE DO (1557) NEXT + DO (1510) NEXT + DO :1 <- :3 + DO .5 <- '?#0$"'V.1$#5'~#1"'~#1 + DO (1557) NEXT + DO .1 <- '^.1$#2801'~'#0$#2801' + DO (1556) NEXT + (1557) PLEASE DO (1001) NEXT + PLEASE FORGET #1 + DO :5 <- "'V":4~'.1$#0'"$":5~'#2801$#0'"' + ~'#0$#2801'"$"'V":4~'#0$.1'"$":5~'#0$ + #2801'"'~'#0$#2801'" + DO .5 <- "?#2$':4~#1'"~#1 + DO (1551) NEXT + DO :2 <- :2~'#2801$#2800' + DO :4 <- :4~'#2801$#2800' + DO .1 <- #0 + PLEASE DO (1556) NEXT + (1551) DO (1001) NEXT + DO :3 <- :5 + PLEASE RETRIEVE :1 + :4 + :5 + :6 + .1 + .5 + PLEASE RESUME #2 + (1720) PLEASE STASH :1 + :3 + :4 + .1 + .5 + DO :2 <- #0 + DO .2 <- #0 + DO .5 <- '?".1~#6"$#7'~#7 + DO (1729) NEXT + DO .5 <- .1~#1 + DO .2 <- :1~'#2801$#0' + DO .1 <- :1~'#0$#2801' + PLEASE DO (1726) NEXT + DO :1 <- '"?#0$.2"~"#0$#2801"'$'"?#0$.1"~"#0$ + #2801"' + DO :2 <- '"?'"V.2$#2801"~"#0$#2801"'$#2801" + ~"#0$#2801"'$'"?'"V.1$#2801"~"#0$#2801"'$ + #2801"~"#0$#2801"' + DO (1728) NEXT + (1726) PLEASE DO (1725) NEXT + DO :1 <- '"?#0$'"^.2$.2"~"#0$#2801"'"~"#0$ + #2801"'$'"?#0$'"^.1$.1"~"#0$#2801"'"~"#0$ + #2801"' + DO .2 <- "^'"V'"2@.2$#11204"~"#0$#2801"'$ + #5602"~"#0$#2801"'$'"2@.2$#2801"~"#0$ + #2801"'"~"#0$#2801" + DO .1 <- "^'"V'"2@.1$#11204"~"#0$#2801"'$ + #5602"~"#0$#2801"'$'"2@.1$#2801"~"#0$ + #2801"'"~"#0$#2801" + DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" + ~"#0$#2801"' + (1728) DO .2 <- :2~'#2401$#0' + DO :2 <- ':2~"#0$#2801"'$'"':2~"#400$#0"'$#0" + ~"#400$#1"' + DO (1509) NEXT + DO :2 <- :3 + DO .2 <- '^.2$"'?":4~#1"$#1'~#1"'~#1 + DO (1721) NEXT + (1725) PLEASE DO (1724) NEXT + DO :2 <- '"?'"V'"?'"3@.2$#14005"~"#0$#2801"'$ + '"@.2$#0"~"#0$#2801"'"~"#0$#11204"'$#8403" + ~"#0$#2801"'$#8403"~"#0$#2801"'$ + '"?'"V'"?'"3@.1$#14005"~"#0$#2801"'$'"@.1$ + #0"~"#0$#2801"'"~"#0$#11204"'$#8403"~"#0$ + #2801"'$#8403"~"#0$#2801"' + DO .2 <- '^.2$.2'~'#0$#2801' + DO .1 <- '^.1$.1'~'#0$#2801' + DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ + #2801"' + PLEASE FORGET #2 + DO (1728) NEXT + (1724) PLEASE DO (1723) NEXT + DO :1 <- '"^'"^.2$.2"~"#0$#2801"'$.2"~"#0$ + #2801"'$'"^'"^.1$.1"~"#0$#2801"'$.1" + ~"#0$#2801"' + DO .2 <- "^'"V'"2@.2$#16806"~"#0$#2801"'$ + #14005"~"#0$#2801"'$'"V'"4@.2$#16806" + ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ + #2801" + DO .1 <- "^'"V'"2@.1$#16806"~"#0$#2801"'$ + #14005"~"#0$#2801"'$'"V'"4@.1$#16806" + ~"#0$#2801"'$#14005"~"#0$#2801"'"~"#0$ + #2801" + DO :2 <- '"?.2$#8403"~"#0$#2801"'$'"?.1$#8403" + ~"#0$#2801"' + PLEASE FORGET #3 + DO (1728) NEXT + (1723) PLEASE DO (1722) NEXT + DO :1 <- '"^.2$.2"~"#0$#2801"'$'"^.1$.1"~"#0$ + #2801"' + DO :2 <- '"?'"V'"3@.2$#16806"~"#0$#2801"'$ + #14005"~"#0$#2801"'$#14005"~"#0$#2801"'$ + '"?'"V'"3@.1$#16806"~"#0$#2801"'$#14005" + ~"#0$#2801"'$#14005"~"#0$#2801"' + PLEASE FORGET #4 + DO (1728) NEXT + (1729) DO (1001) NEXT + DO (1721) NEXT + (1722) PLEASE DO (1001) NEXT + DO :2 <- :1 + DO .2 <- #0 + DO FORGET #3 + (1721) PLEASE RETRIEVE :1 + :3 + :4 + .1 + .5 + PLEASE RESUME #3 + (1900) DO STASH .2 + .5 + DO .1 <- #0 + DO .2 <- #1 + PLEASE DO (1901) NEXT + (1901) DO FORGET #1 + DO %50 (1905) NEXT + DO %50 (1904) NEXT + DO %50 (1901) NEXT + PLEASE DO (1903) NEXT + (1905) DO FORGET #1 + DO .1 <- '^.1$".2~#8403"'~'#0$#2801' + PLEASE DO %50 .1 <- '^.1$".2~#5602"'~'#0$#2801' + DO (1906) NEXT + (1904) DO .1 <- '^.1$.2'~'#0$#2801' + (1906) DO %50 .1 <- '^.1$.2'~'#0$#2801' + (1903) PLEASE FORGET #1 + DO .2 <- !2$#0'~'#400$#1' + PLEASE DO .5 <- '^".2~.2"$#1'~#1 + DO (1902) NEXT + DO (1901) NEXT + (1902) DO (1001) NEXT + DO RETRIEVE .2 + .5 + PLEASE RESUME #2 + (1910) PLEASE STASH .1 + .3 + .5 + :1 + :2 + :3 + DO .3 <- #16795 + DO :1 <- #6 + DO (1911) NEXT + PLEASE NOTE THAT YOU CAN'T GET SENSE FROM INTERCAL + (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'~#6"$#5'~#1 + DO (1912) NEXT + DO .1 <- #12 + PLEASE DO (1050) NEXT + DO RETRIEVE .1 + DO (1530) NEXT + DO :2 <- #8403 + DO (1500) NEXT + PLEASE DO .2 <- :3~'#2793$#2744' + PLEASE RETRIEVE .3 + .5 + :1 + :2 + :3 + DO RESUME #1 diff --git a/pit/t_tet b/pit/t_tet index 54106e6..25339f4 100644 --- a/pit/t_tet +++ b/pit/t_tet @@ -1,12 +1,12 @@ -ONE ONE -ONE ONE -ONE OH -FIVE -SIX -SIX -SIX -SEVEN -SIX -SIX -SEVEN -OH +ONE ONE +ONE ONE +ONE OH +FIVE +SIX +SIX +SIX +SEVEN +SIX +SIX +SEVEN +OH diff --git a/pit/tests/count.3i b/pit/tests/count.3i index 9988329..2d2225e 100644 --- a/pit/tests/count.3i +++ b/pit/tests/count.3i @@ -1,43 +1,43 @@ - DO ,1 <- #16 - DO :2 <- #6490$#55022 - PLEASE DO (44) NEXT - DO :2 <- #5631$#54733 - PLEASE DO (44) NEXT - DO :2 <- #14637$#40039 - PLEASE DO (44) NEXT - DO :2 <- #58550$#53112 - PLEASE DO (44) NEXT - DO .1 <- #1 - PLEASE DO (99) NEXT - DO GIVE UP -(44) DO REINSTATE COMING FROM -(19) DO COME FROM (68) - DO ABSTAIN FROM (19) -(31) DO COME FROM (34) - DO ABSTAIN FROM (31) -(88) DO COME FROM (65) - PLEASE ABSTAIN FROM (88) - DO COME FROM (44) - PLEASE DO (123) NEXT - DO .3 <- ':2~"#4$#13"' - DO :2 <- ':2~"#29520$#29511"' - DO ,1 SUB .1 <- .3 -(65) DON'T GIVE UP -(34) PLEASE DON'T GIVE UP -(68) DO NOTE THAT THIS FUNNY CODE ACTUALLY WORKS - PLEASE RESUME #1 -(99) DO COME FROM (69) - DO READ OUT ,1 - DO ,1 SUB #1 <- #180 - DO READ OUT .1 - DO .2 <- "?.1$#10"~"#0$#29524" - PLEASE DO (15) NEXT -(69) PLEASE DO (123) NEXT -(42) DO RESUME .9 -(123) PLEASE .8 <- #1 - DO COME FROM (81) - DO .9 <- '?"V!1~.8'$#1"~#1'~#1 - DO .1 <- "^.1$.8"~"#0$#29524" - PLEASE DO (42) NEXT -(81) DO .8 <- !8$#0'~"#9841$#1" -(15) PLEASE RESUME '?"!2~.2'~#2"$#1'~#1 + DO ,1 <- #16 + DO :2 <- #6490$#55022 + PLEASE DO (44) NEXT + DO :2 <- #5631$#54733 + PLEASE DO (44) NEXT + DO :2 <- #14637$#40039 + PLEASE DO (44) NEXT + DO :2 <- #58550$#53112 + PLEASE DO (44) NEXT + DO .1 <- #1 + PLEASE DO (99) NEXT + DO GIVE UP +(44) DO REINSTATE COMING FROM +(19) DO COME FROM (68) + DO ABSTAIN FROM (19) +(31) DO COME FROM (34) + DO ABSTAIN FROM (31) +(88) DO COME FROM (65) + PLEASE ABSTAIN FROM (88) + DO COME FROM (44) + PLEASE DO (123) NEXT + DO .3 <- ':2~"#4$#13"' + DO :2 <- ':2~"#29520$#29511"' + DO ,1 SUB .1 <- .3 +(65) DON'T GIVE UP +(34) PLEASE DON'T GIVE UP +(68) DO NOTE THAT THIS FUNNY CODE ACTUALLY WORKS + PLEASE RESUME #1 +(99) DO COME FROM (69) + DO READ OUT ,1 + DO ,1 SUB #1 <- #180 + DO READ OUT .1 + DO .2 <- "?.1$#10"~"#0$#29524" + PLEASE DO (15) NEXT +(69) PLEASE DO (123) NEXT +(42) DO RESUME .9 +(123) PLEASE .8 <- #1 + DO COME FROM (81) + DO .9 <- '?"V!1~.8'$#1"~#1'~#1 + DO .1 <- "^.1$.8"~"#0$#29524" + PLEASE DO (42) NEXT +(81) DO .8 <- !8$#0'~"#9841$#1" +(15) PLEASE RESUME '?"!2~.2'~#2"$#1'~#1 diff --git a/pit/tests/limits.3i b/pit/tests/limits.3i index 0c62541..6293447 100644 --- a/pit/tests/limits.3i +++ b/pit/tests/limits.3i @@ -1,5 +1,5 @@ - DO .1 <- #59048 - DO :1 <- #59048 - DO WRITE IN .1 + :1 - DO READ OUT .1 + :1 - PLEASE GIVE UP + DO .1 <- #59048 + DO :1 <- #59048 + DO WRITE IN .1 + :1 + DO READ OUT .1 + :1 + PLEASE GIVE UP diff --git a/pit/tests/testops.3i b/pit/tests/testops.3i index ca109ff..f540881 100644 --- a/pit/tests/testops.3i +++ b/pit/tests/testops.3i @@ -1,18 +1,18 @@ - PLEASE WRITE IN .3 - DO .1 <- "^.3$#1"~#1 - DO READ OUT .1 - DO .1 <- "V.3$#1"~#1 - PLEASE DO READ OUT .1 - DO .1 <- "V'"&.3$#2"~#1'$#1"~#1 - DO READ OUT .1 - DO .1 <- "?'"&.3$#2"~#1'$#1"~#1 - PLEASE DO READ OUT .1 - DO .1 <- "V!3~#2'$#1"~#1 - DO READ OUT .1 - DO .1 <- "?!3~#2'$#1"~#1 - PLEASE DO READ OUT .1 - DO .1 <- "@'"^.3$#7"~#4'$#2"~#10 - DO READ OUT .1 - DO .1 <- "^.3$.3"~"#0$#29524" - PLEASE DO READ OUT .1 - PLEASE GIVE UP + PLEASE WRITE IN .3 + DO .1 <- "^.3$#1"~#1 + DO READ OUT .1 + DO .1 <- "V.3$#1"~#1 + PLEASE DO READ OUT .1 + DO .1 <- "V'"&.3$#2"~#1'$#1"~#1 + DO READ OUT .1 + DO .1 <- "?'"&.3$#2"~#1'$#1"~#1 + PLEASE DO READ OUT .1 + DO .1 <- "V!3~#2'$#1"~#1 + DO READ OUT .1 + DO .1 <- "?!3~#2'$#1"~#1 + PLEASE DO READ OUT .1 + DO .1 <- "@'"^.3$#7"~#4'$#2"~#10 + DO READ OUT .1 + DO .1 <- "^.3$.3"~"#0$#29524" + PLEASE DO READ OUT .1 + PLEASE GIVE UP diff --git a/pit/tests/testops.5i b/pit/tests/testops.5i index c00ed20..5669467 100644 --- a/pit/tests/testops.5i +++ b/pit/tests/testops.5i @@ -1,17 +1,17 @@ - PLEASE WRITE IN .3 - DO .1 <- "^'"^.3$.3"~"#0$#3906"'$'"^.3$.3"~"#0$#3906"'"~"#0$#3906" - PLEASE DO READ OUT .1 - DO .1 <- "^.3$.3"~"#0$#3906" - DO .1 <- "^.1$.1"~"#0$#3906" - DO READ OUT .1 - DO .1 <- "&.3$#1"~#1 - PLEASE DO READ OUT .1 - DO .1 <- "@.3$#1"~#1 - DO READ OUT .1 - DO .1 <- "2@.3$#1"~#1 - PLEASE DO READ OUT .1 - DO .1 <- "3@.3$#1"~#1 - DO READ OUT .1 - DO .1 <- "V.3$#1"~#1 - DO READ OUT .1 - PLEASE GIVE UP + PLEASE WRITE IN .3 + DO .1 <- "^'"^.3$.3"~"#0$#3906"'$'"^.3$.3"~"#0$#3906"'"~"#0$#3906" + PLEASE DO READ OUT .1 + DO .1 <- "^.3$.3"~"#0$#3906" + DO .1 <- "^.1$.1"~"#0$#3906" + DO READ OUT .1 + DO .1 <- "&.3$#1"~#1 + PLEASE DO READ OUT .1 + DO .1 <- "@.3$#1"~#1 + DO READ OUT .1 + DO .1 <- "2@.3$#1"~#1 + PLEASE DO READ OUT .1 + DO .1 <- "3@.3$#1"~#1 + DO READ OUT .1 + DO .1 <- "V.3$#1"~#1 + DO READ OUT .1 + PLEASE GIVE UP diff --git a/pit/tests/version.4i b/pit/tests/version.4i index f18b9bc..fd19d0a 100644 --- a/pit/tests/version.4i +++ b/pit/tests/version.4i @@ -1,7 +1,7 @@ -(1) DO .1 <- #?6 - DOING DETECTION... YOU ARE USING INTERCAL-72 -(5) PLEASE COME FROM (1) - DOING DETECTION... YOU ARE USING C-INTERCAL - PLEASE COME FROM .1 - DOING DETECTION... YOU ARE USING CLC-INTERCAL - +(1) DO .1 <- #?6 + DOING DETECTION... YOU ARE USING INTERCAL-72 +(5) PLEASE COME FROM (1) + DOING DETECTION... YOU ARE USING C-INTERCAL + PLEASE COME FROM .1 + DOING DETECTION... YOU ARE USING CLC-INTERCAL + diff --git a/pit/tophat.fft b/pit/tophat.fft index 453a687..d4c4170 100644 --- a/pit/tophat.fft +++ b/pit/tophat.fft @@ -1,258 +1,258 @@ -ONE -ONE TWO EIGHT -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO -ONE TWO FIVE OH OH OH OH FIVE ONE -ZERO +ONE +ONE TWO EIGHT +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO +ONE TWO FIVE OH OH OH OH FIVE ONE +ZERO diff --git a/src/abcess.h b/src/abcess.h index 39bf545..7a49e3b 100644 --- a/src/abcess.h +++ b/src/abcess.h @@ -155,7 +155,7 @@ extern int hybridcount; extern int oldabstain; extern int gonebackto; extern int ccfc; -extern unsigned skipto; +extern int skipto; extern jmp_buf btjb; extern jmp_buf cjb; diff --git a/src/dekludge.c b/src/dekludge.c index f42004c..e997e98 100644 --- a/src/dekludge.c +++ b/src/dekludge.c @@ -100,7 +100,7 @@ int abstainmatch(int npconstant, int tptype) if(npconstant == ABSTAIN) if(tptype == FROM || tptype == MANYFROM || tptype == DISABLE) return 1; if(npconstant == REINSTATE) - if(tptype == DISABLE) return 1; + if(tptype == ENABLE) return 1; return 0; } @@ -407,6 +407,7 @@ static void checkforintercaloperators(node *np) /* By AIS (with a few code fragments copied from elsewhere in this file) */ static void checknodeactbits(node *np) { + int temp; if (np == (node *)NULL) return; else if (np->lval != (node *)NULL) @@ -427,8 +428,12 @@ static void checknodeactbits(node *np) break; case SELECT: - np->optdata = np->lval->optdata & np->rval->optdata; - np->optdata = iselect(np->optdata, np->optdata); + /* The result could be the selected optdata, or have a 1 anywhere to the + right of a 1 in the resulting selection if there are 0s in rval where + there could have been 1s */ + np->optdata = iselect(np->lval->optdata, np->rval->optdata); + temp=16; + while(temp--) np->optdata|=(np->optdata>>1); /* fill in gaps in optdata */ break; case AND: diff --git a/src/feh2.c b/src/feh2.c index 576ae2d..83ccc10 100644 --- a/src/feh2.c +++ b/src/feh2.c @@ -1980,9 +1980,13 @@ void emit(tuple *tn, FILE *fp) break; case GIVE_UP: /* AIS: Edited to allow for yuk */ - if(yukprofile||yukdebug) fprintf(fp, "\tYUKTERM;\n"); - if(multithread) fprintf(fp, "\tkillthread();\n"); - (void) fprintf(fp, "\treturn(0);\n"); + if(!tn->initabstain) /* AIS: DON'T GIVE UP is a no-op, so ignore it */ + { + (void) fprintf(fp, "\t;};{\n"); /* AIS: can't be abstained from */ + if(yukprofile||yukdebug) fprintf(fp, "\tYUKTERM;\n"); + if(multithread) fprintf(fp, "\tkillthread();\n"); + (void) fprintf(fp, "\treturn(0);\n"); + } break; case TRY_AGAIN: /* By AIS */ diff --git a/src/ick.bat b/src/ick.bat deleted file mode 100755 index 0e246b8..0000000 --- a/src/ick.bat +++ /dev/null @@ -1,8 +0,0 @@ -@rem Wrapper for ickmain.exe that gets around the 126-byte system() limit - -@echo off -ickmain %* -if exist ickgcc.rsp gcc @ickgcc.rsp -if exist ickgcc.rsp del ickgcc.rsp -if exist ickyuk.bat call ickyuk.bat -if exist ickyuk.bat del ickyuk.bat diff --git a/src/lexer.l b/src/lexer.l index aee2b40..2c268a1 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -131,6 +131,10 @@ int getc(FILE *fp) c_char=0; /* AIS */ (void)fread(&c_char,1,1,fp); + /* AIS: ignore the first \r in a row to deal with DOS newlines. The + second in a row is definitely an error, though, and will be caught + later on. */ + if(c_char=='\r') (void)fread(&c_char,1,1,fp); c = c_char; /*if(!c) c=' '; AIS */ if(feof(fp)) c=EOF; diff --git a/src/perpet.c b/src/perpet.c index 6adeebc..c40910a 100644 --- a/src/perpet.c +++ b/src/perpet.c @@ -204,6 +204,14 @@ static void print_usage(char *prog, char *options) fprintf(stderr,"\t\teach file produces a separate output program.\n"); } +/* AIS: Determine whether an environment variable exists (this is used to + find a temp directory) */ +int isenv(char* e) +{ + char* x=getenv(e); + return x&&*x; +} + /* AIS: This function looks for the skeleton and syslib, searching first the path they should be in, then the current directory, then argv[0]'s directory (if one was given). This function avoids possible buffer @@ -328,6 +336,7 @@ int main(int argc, char *argv[]) FILE *ifp, *ofp; int maxabstain, /* nextcount, AIS */ bugline; bool needsyslib, firstfile; + int oldstdin; /* AIS: for keeping track of where stdin was */ if (!(includedir = getenv("ICKINCLUDEDIR"))) includedir = ICKINCLUDEDIR; @@ -496,6 +505,9 @@ int main(int argc, char *argv[]) buf[strlen(buf) - 2] = '\0'; + /* AIS: Save the old stdin */ + oldstdin=dup(0); + for (firstfile = TRUE; optind < argc; optind++, firstfile = FALSE) { /* AIS: Read as binary to pick up Latin-1 and UTF-8 better */ @@ -740,10 +752,17 @@ int main(int argc, char *argv[]) if(!pickcompile) { if (tp->exechance > 0) + { (void) fprintf(ofp, "0, "); + tp->initabstain=0; /* AIS: -f might not be + given, so we can't rely + on dekludge.c doing + this */ + } else { (void) fprintf(ofp, "1, "); tp->exechance = -tp->exechance; + tp->initabstain=1; /* AIS: As above */ /* AIS: If the line was abstained, we need to swap ONCEs and AGAINs on it round, to suit the code degenerator. */ @@ -1252,16 +1271,7 @@ int main(int argc, char *argv[]) /* Note that the output must be deleted for copyright reasons (so as not to GPL a non-GPL file automatically) */ (void) system(buf2); - (void) freopen("/dev/tty", "r", stdin); - /* stdin has got seriously muddled, what with - it being redirected so much. Let's set it - to the keyboard (the only reasonable place - for input to a debugger anyway). If the user - wants to use the profiler with data from a file, - this won't work, so this code probably needs - changing. But the original value of stdin seems - to have been lost, and we need to redirect from - somewhere. */ + dup2(oldstdin,0); /* restore stdin */ (void) system(argv[optind]); (void) unlink(buf); (void) unlink(argv[optind]); @@ -1290,31 +1300,40 @@ int main(int argc, char *argv[]) command-line cap. It creates a temporary file with the arguments needed to give gcc. */ FILE* rsp; + char* tempfn="ickgcc.rsp"; /*use current dir as temp if needed*/ + /* Three tries are used to find a temp directory. + ICKTEMP is the preferred environment variable to check; + if, as expected, this isn't set, try TMPDIR (which DJGPP + sets to its own temp directory, at least when running under + bash), TEMP and TMP (in that order). DJGPP offers /dev/env + as a method of accessing environment variables in filenames.*/ + if(isenv("TMP")) tempfn="/dev/env/TMP/ickgcc.rsp"; + if(isenv("TEMP")) tempfn="/dev/env/TEMP/ickgcc.rsp"; + if(isenv("TMPDIR")) tempfn="/dev/env/TMPDIR/ickgcc.rsp"; + if(isenv("ICKTEMP")) tempfn="/dev/env/ICKTEMP/ickgcc.rsp"; rsp=debfopen("ickgcc.rsp","w"); fprintf(rsp,"%s\n",buf2); fclose(rsp); + system("gcc @ickgcc.rsp"); + remove("ickgcc.rsp"); if(yukdebug || yukprofile) { - /* Running the program from the batch file ickyuk.bat will - handle the input redirection and deletion of the files - afterwards. */ - rsp=debfopen("ickyuk.bat","w"); - fprintf(rsp,"%s.exe\ndel %s\ndel %s.exe\n", - argv[optind],buf,argv[optind]); - fclose(rsp); + dup2(oldstdin,0); /* restore stdin */ + sprintf(buf2,"%s.exe",argv[optind]); + system(buf2); + remove(buf); + remove(buf2); } else if(!cdebug) { - /* delete from the batch file after compilation */ - rsp=debfopen("ickyuk.bat","w"); - fprintf(rsp,"del %s\n",buf); - fclose(rsp); + remove(buf); } } #endif } } (void) fclose(ifp); + (void) close(oldstdin); /* AIS */ return 0; } diff --git a/src/yuk.c b/src/yuk.c index 1fdc303..1e34fe2 100644 --- a/src/yuk.c +++ b/src/yuk.c @@ -64,7 +64,7 @@ int yukcommands = 0; /* these 3 lines because externs must be defined unadorned: defining an extern extern: defined elsewhere (unless initialised) */ -static char buf[20]; +static char buf[21]; static sig_atomic_t singlestep = 1; /* if 0, run until a breakpoint */ static sig_atomic_t writelines = 1; /* whether to display executed lines onscreen */ @@ -285,7 +285,7 @@ void yukline(int aboff,int emitlineno) { printf("yuk007 "); /* this is our prompt, a sort of reverse INTERCAL version of % */ - fgets(buf,20,stdin); /* input a command */ + fgets(buf,20,stdin); if(!strchr(buf,'\n')) { lose(E810,emitlineno,(char*)NULL); diff --git a/src/yuk.h b/src/yuk.h index 2b2f0c2..553669a 100644 --- a/src/yuk.h +++ b/src/yuk.h @@ -30,10 +30,16 @@ extern int yukloop; 4 to use times() */ /* Note: On many systems, 0's resolution is too low to produce any output 1 and 2 produce the same output; use 2 if your system can handle - long long because the overflow is dealt with more simply + long long because the overflow is dealt with more simply. 3 is a system-specific function. If there are more system-specific functions around that return more accurate times than the others - used here, it would improve the profiler on those systems. */ + used here, it would improve the profiler on those systems. + According to the DJGPP documentation, it's impossible to get times + with decent accuracy under DOS. DJGPP implements timer types 0, 1, + and 2, so it will 'work' with the default value of 2, but the results + you get will be basically meaningless as the base information can't + be accurately obtained (the resolution is slightly worse than 50ms, + which is far too slow for profiling). */ #if YPTIMERTYPE == 0 #define YPTIMERTFORMAT "lu" -- 2.43.0