build index.html for all winners

Updated manifest as per recent file changes.

Updated winner `.winner.json` to reflect the manifest changes.

Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over
all winning entries.

These tools had slight improvements in the help usage message:

* bin/gen-author.sh VERSION="1.3.1 2024-01-16"
* bin/gen-inventory.sh VERSION="1.0.1 2024-01-16"
* bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16"
* bin/subst.default.sh VERSION="1.1.1 2024-01-16"
* bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16"

The `bin/readme2index.sh` tool was improved so that
if the `index.html` file exists and the tool forms
the exact same content, then the file `index.html`
file is NOT touched.

* bin/readme2index.sh VERSION="1.1 2024-01-16"

We used the following command to generate `index.html` files
for all winning entries:

```sh
bin/all_run.sh -v 3 bin/readme2index.sh
```

NOTE: We have not (yet) built HTML files above the winner directory
level (e.g., no year level nor top level HTML), nor have be built
non-index HTML files for winners.

NOTE: By default we are running `pandoc(1)` with:

```
--fail-if-warnings=true
```

This means that any problems with markdown to HTML
generates an error.  This is done to be sure that
the HTML conversion is clean.

We had to fix the following `README.md` files:

* `2000/rince/README.md`

The reference [^2] was never used.  We made a guess that [^2] applies
to the same spot as [^1].  Perhaps there is a better spot where
[^2] applies?

NOTE: For every reference, there MUST be some place where that
reference is used.

* 2012/vik/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

* 2018/burton1/README.md

The reference [2] was duplicated.  We changed the
second [2] to [3].

NOTE: Every reference needs to have a unique number.

* 2020/carlini/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

We also found 2 errors in the `author/author_handle.json` file set:

* author/Anonymous_2001.json

The `author/Anonymous_2001.json` file was missing.

* author/Jari_Arkko.json

The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
Landon Curt Noll committed 2024-01-17 00:32:39 -08:00
1 parent 893cd915b6
commit c1466f5165
350 files changed
+95242 -4217

No files matched your search

+383 -13
View File
@@ -1,4 +1,6 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
@@ -6,27 +8,395 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2006/toledo2/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2006 toledo2</title>
<meta name="description" content="IOCCC year: 2006 IOCCC winner: toledo2 winner index page">
<meta name="keywords" content="IOCCC,2006,toledo2,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>2006/toledo2</title>
<meta name="description" content="2006 IOCCC winner toledo2">
<meta name="keywords" content="IOCCC, 2006, IOCCC 2006, IOCCC winner, toledo2">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2006 toledo2</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>2006/toledo2</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2006%2Ftoledo2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2006/toledo2/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../toledo1/index.html">&larr; toledo1</a>
<a class="Left" href="../index.html">&uarr; 2006 &uarr;</a>
<a class="Left" href="../toledo3/index.html">toledo3 &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.html -->
<!-- START: this line starts content from: inc/begin-row.default.html -->
<div class="row">
<!-- END: this line ends content from: inc/begin-row.default.html -->
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
<div class="leftcolumn">
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/sidenav.default.html -->
<div class="sidenav">
<a href="#content">Jump to contents</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
</div>
<hr>
<div class="sidenav">
<a href="#top">Jump to top</a>
</div>
<!-- END: this line ends content from: inc/sidenav.default.html -->
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
<div class="rightcolumn">
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<a name="content"></a>
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Oscar_Toledo">Oscar Toledo
G.</a><br> Location: <a
href="/temp-test-ioccc/location.html#MX">MX</a></p>
<!-- END: next line ends content generated by: bin/gen-author.sh -->
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
<p>There is <a href="#alternate-code">alternate code</a> that is based
on the author’s notes for DOS/Windows. This cannot be tested by us, not
even to compile, but it appears that it should be fine, after the proper
header files were added.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a
href="/bugs.md#2006-toledo2">2006 toledo2 in bugs.md</a>.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./toledo2</span></span></code></pre></div>
<p>To end execution press <code>ctrl-z</code>. As mentioned in the
author’s remarks and in the below section, it is supposed to crash on
termination though some noted this does not seem to happen in macOS or
linux in 2023.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./toledo2</span></span></code></pre></div>
<p>and then type in the following:</p>
<pre><code>10 PRINT &quot;HELLO WORLD!&quot;
LIST
RUN</code></pre>
<p>To end the program hit ctrl-z.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version, as noted, should work for DOS/Windows. It uses
non-standard functions in place of <code>read(2)</code> and
<code>write(2)</code>.</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>The author noted that for PC/DOS you will have to add
<code>ANSI.SYS</code> to your <code>CONFIG.SYS</code> but this is also
something we can’t test.</p>
<p>Use <code>toledeo2.alt</code> as you would <code>toledo2</code>
above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We’re impressed! Last year, it was a <a
href="https://en.wikipedia.org/wiki/MOS_Technology_6502">6502</a>
emulator; this year, it’s <a
href="https://en.wikipedia.org/wiki/Intel_8080">8080</a>! It requires an
input file (<code>C</code>) to be present, but it does not have to be
one of <code>C.BASIC</code> or <code>C.BIOS</code> - you’re welcome to
write a standalone 8080 program yourself! How about <code>C.FORTH</code>
or <code>C.LISP</code>?</p>
<p>In addition to the functionality you could expect from a program of
this size, it allows importing files from the host file system (one by
one, so you’ll have to be patient).</p>
<p>Remember the good old days and play (or let your kids play) <a
href="https://rickadams.org/adventure/">Adventure</a> (in the directory
<code>ADVENTUR</code>); walking in a maze of twisty little passages all
alike is easier than understanding the code!</p>
<p><strong>NOTE</strong>: The <code>KAYPROII.ZIP</code> file originally
came from <a
href="http://www.retroarchive.org/cpm/os/KAYPROII.ZIP">http://www.retroarchive.org/cpm/os/KAYPROII.ZIP</a>.
For your convenience, we have included <code>KAYPROII.ZIP</code> in this
entry. Both the <code>make all</code> and the <code>make alt</code>
unzip that file, and the <code>make clobber</code> removes those files
extracted from the <code>KAYPROII.ZIP</code>.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program emulates a complete <a
href="https://en.wikipedia.org/wiki/Intel_8080">Intel(r) 8080</a>
processor, along with a teletype and a disk controller, just like at the
start of the personal computers revolution (circa 1975).</p>
<p>It needs an initial memory image to do something usable, so along
with it you will find two files: (<a href="C.BASIC">C.BASIC</a> and <a
href="C.BIOS">C.BIOS</a>). Rename <a href="C.BASIC">C.BASIC</a> to
<code>C</code> (NOTE from the judges: running <code>make</code> will do
this for you), run the emulator, and et voila! you have the public
domain Palo Alto <a href="https://en.wikipedia.org/wiki/Tiny_BASIC">Tiny
BASIC</a> (by Li-Chen Wang), published in the very first volume of <a
href="https://en.wikipedia.org/wiki/Dr._Dobb%27s_Journal">Dr. Dobb’s
Journal</a>.</p>
<p>Type using uppercase letters. Here are three example programs. Press
Enter after each line:</p>
<pre class="basic"><code>10 PRINT &quot;Hello, world!&quot;
LIST
RUN
10 FOR A=1 TO 10
20 PRINT A\
30 NEXT A\
LIST\
RUN
10 INPUT A
20 INPUT B
30 PRINT A+B
LIST
RUN</code></pre>
<p>Press Ctrl+Z to quit. By the way, the segmentation fault is normal at
this point.</p>
<p>All good programmers started learning <a
href="https://en.wikipedia.org/wiki/BASIC">BASIC</a>, now, what about a
<a href="https://en.wikipedia.org/wiki/CP/M">CP/M</a> emulator?</p>
<p>Copy <code>CPM64.COM</code> to files named <code>A</code> and
<code>B</code> (these will be the disk drives). Now rename the provided
<code>C.BIOS</code> to <code>C</code> and run the emulator.</p>
<p>Now you have a running <a
href="https://en.wikipedia.org/wiki/CP/M">CP/M</a> system!, with two
files on A: drive, <code>HALT.COM</code> to stop the emulator (so it
closes drives) and <code>IMPORT.COM</code> to introduce new files. The
two files are created automatically by the provided C.BIOS.</p>
<p>To get a complete <a
href="https://en.wikipedia.org/wiki/CP/M">CP/M</a> system, you will need
the following files from the <code>SOURCE</code> directory:</p>
<pre><code> ASM.COM DDT.COM DUMP.COM ED.COM LOAD.COM
PIP.COM STAT.COM SUBMIT.COM XSUB.COM</code></pre>
<p>To import them, you must run the emulator with an argument, by
example:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./toledo2</span> DDT.COM</span></code></pre></div>
<p>When the <code>&gt;</code> prompt appears, do:</p>
<pre><code>IMPORT DDT.COM</code></pre>
<p>When it ends, do <code>HALT</code>, so the file is closed, and you
can start the same process with another file.</p>
<p>At this time I have tested successfully the following software from
<a href="http://www.retroarchive.org"
class="uri">http://www.retroarchive.org</a>:</p>
<ul>
<li><a href="http://www.retroarchive.org/cpm/lang/c80v30.zip"
class="uri">http://www.retroarchive.org/cpm/lang/c80v30.zip</a></li>
<li><a href="http://www.retroarchive.org/cpm/lang/Mbasic.com"
class="uri">http://www.retroarchive.org/cpm/lang/Mbasic.com</a></li>
<li><a href="http://www.retroarchive.org/cpm/business/MULTPLAN.ZIP"
class="uri">http://www.retroarchive.org/cpm/business/MULTPLAN.ZIP</a></li>
</ul>
<p>Some programs require installation to configure the terminal, locate
ANSI or VT-100.</p>
<h3 id="what-is-an-8080">What is an 8080?</h3>
<p>It is simply the little brother of the <a
href="https://en.wikipedia.org/wiki/Zilog_Z80">Z80</a>; it has no
extended registers (<code>AF'</code>, <code>BC'</code>,
<code>DE'</code>, <code>HL'</code>, <code>IX</code> or <code>IY</code>),
no relative jumps, and no instruction beginning with <code>CB</code>,
<code>DD</code>, <code>ED</code> or <code>FD</code> exists.</p>
<p>The flags are only <code>S</code> (Sign, bit 7), <code>Z</code>
(Zero, bit 6), <code>P</code> (Parity, bit 2) and <code>C</code> (Carry,
bit 0).</p>
<h3 id="porting-it">Porting it</h3>
<p>It is easy if your platform has
<code>getch()</code>/<code>kbhit()</code> and ANSI terminal:</p>
<pre><code>read --&gt; Z=kbhit()?getch():0
write --&gt; putchar(7[o])
system --&gt; nothing</code></pre>
<p>Notice that you’ll have to do <code>#include &lt;conio.h&gt;</code>
as well.</p>
<p>Also add the following to trap Ctrl-C:</p>
<pre><code> #include &lt;signal.h&gt;
signal(SIGINT, SIG_IGN);</code></pre>
<p>NOTE: this is what the <a href="#alternate-code">alternate code</a>
is for!</p>
<p>NOTE from the judges: in Unix like systems <code>getch()</code> is
part of curses but this is not what is needed.</p>
<p>On PC/DOS you need to add <code>ANSI.SYS</code> to
<code>CONFIG.SYS</code>.</p>
<p>In Unix the min 0 on <code>stty</code> is required but circa 2001 it
was not required.</p>
<h3 id="how-it-works-spoiler">How it works (SPOILER)</h3>
<p>The <code>l</code> array contains the 64K memory; it is initialized
with a boot image loaded from the <code>C</code> file. The <a
href="https://en.wikipedia.org/wiki/Program_counter">program counter</a>
is the <code>c</code> pointer and <a
href="https://en.wikipedia.org/wiki/Processor_register">registers</a>
are in <code>o[]</code>. The main loop reads every <a
href="https://en.wikipedia.org/wiki/Opcode">opcode</a> and separates
them in one of three common forms. A lot of ternary operators selects
the instruction.</p>
<pre><code>o[0] = B register o[1] = C register
o[2] = D register o[3] = E register
o[4] = H register o[5] = L register
o[6] = Flags o[7] = A or accumulator</code></pre>
<p>The following instructions do peripheral operation:</p>
<pre><code>76 Quits emulator
DB 00 Reads key pressed status
DB 01 Reads key
DB 02 Reads byte from file (Carry=EOF)
D3 xx Writes byte from acc. to console
ED ED 02 Reads sector
ED ED 03 Writes sector</code></pre>
<p>Memory addresses:</p>
<pre><code>FBFA = Low source/target direction
FBFB - High source/target direction
FBFC - Sector
FBFD - Low cylinder
FBFE - High cylinder
FBFF - Drive.</code></pre>
<p>The BIOS is tailor made for this emulator, and helps to simplify
it.</p>
<h3 id="other-notes">Other notes</h3>
<ul>
<li>The 8080 runs at your computer speed divided between a number that I
have not calculated.</li>
<li>This obfuscated processor is created using obfuscated code produced
by an obfuscated mind; no brains were harmed during its production,
except those that tried to read the code.</li>
<li>The original version of this code was eaten by my C++ dog.</li>
<li>I intended to make it simple to understand; it uses only four C
keywords.</li>
<li>Also I discovered that braces are very useful for commenting.</li>
<li>Why bother with prototypes? Every good C programmer can develop
their C programs using only one function.</li>
</ul>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
License:</h2>
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
Reserved. You are free to share and adapt this file under the terms of
this license:</p>
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
<p>For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/</p>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-2006toledo2"><a name="inventory"></a>Inventory for
2006/toledo2</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/toledo2.c">toledo2.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/toledo2.alt.c">toledo2.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/toledo2.orig.c">toledo2.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/KAYPROII.ZIP">KAYPROII.ZIP</a>
- zip file of CPM related files</li>
<li><a href="2006_toledo2.tar.bz2">2006_toledo2.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/.gitignore">.gitignore</a>
- list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top directory</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a href="A">A</a> - binary support file</li>
<li><a href="B">B</a> - binary support file</li>
<li><a href="C.BASIC">C.BASIC</a> - compiled BASIC file</li>
<li><a href="C.BIOS">C.BIOS</a> - basic input output system</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo2/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/end-row.default.html -->
</div>
<!-- END: this line ends content from: inc/end-row.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<div class="footer">
<hr>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2006%2Ftoledo2%2Findex.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->