Eliminated the need for the `.tar.tstamp` files. It became intractable
to produce a tarball that was byte-for-byte identical to a tarball
on another platform. We further simplified the process used by the
`bin/tar-year.sh` tool to no longer need `.tar.tstamp` files.
Removed `.tar.tstamp` files and updated the manifest.
Sorry (tm Canada 🇨🇦) for the "flip-flop".
The `bin/tar-year.sh` tool now uses a similar algorithm to how
`bin/tar-entry.sh` determines if a compressed tarball needs to be
rebuilt.
Changed `bin/tar-entry.sh` VERSION from "1.3.3 2024-03-27"
to "1.3.4 2024-03-27".
Changed `bin/tar-year.sh` VERSION from "1.1.3 2024-03-27"
to "1.2 2024-03-27".
Performed `make www` and `make form_entry_tarball`
and `make form_year_tarball` to complete the above
actions and test these changes under macOS.
TODO: Test the `bin/tar-year.sh` tool under Linux.
TODO: Address issues with building the top level `ioccc.tar.bz2`
and the `bin/tar-all.sh` tool and the `make form_all_tarball` rule.
NOTE: The `bin/tar-all.sh` tool and the `make form_all_tarball` rule
and the `make tar` should **NOT** be used at this time.
337 lines
18 KiB
HTML
337 lines
18 KiB
HTML
<!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 !!! -->
|
||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- -->
|
||
<!-- END: this line ends content from: inc/top.default.html -->
|
||
<!-- -->
|
||
<!-- This web page was formed via the tool: bin/readme2index.sh -->
|
||
<!-- -->
|
||
<!-- The content of main section of this web page came from: 2001/bellard/README.md -->
|
||
<!-- -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2001/bellard/README.md -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2001/bellard/README.md -->
|
||
<!-- !!! Do not modify this web page, instead modify the file: 2001/bellard/README.md -->
|
||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||
<!-- -->
|
||
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
|
||
<!-- -->
|
||
<!-- START: this line starts content from: inc/head.default.html -->
|
||
|
||
<head>
|
||
<link rel="stylesheet" href="../../ioccc.css">
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
<title>2001/bellard - Best abuse of the rules</title>
|
||
<meta name="description" content="2001 IOCCC entry bellard - Best abuse of the rules">
|
||
<meta name="keywords" content="IOCCC, 2001, IOCCC 2001, IOCCC entry, bellard, Best abuse of the rules">
|
||
</head>
|
||
|
||
<!-- END: this line ends content from: inc/head.default.html -->
|
||
<!-- START: this line starts content from: inc/body.default.html -->
|
||
|
||
<body>
|
||
|
||
<!-- END: this line ends content from: inc/body.default.html -->
|
||
<!-- START: this line starts content from: inc/header.default.html -->
|
||
|
||
<div class="header">
|
||
<img src="../../png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||
<h1>The International Obfuscated C Code Contest</h1>
|
||
<h2>2001/bellard - Best abuse of the rules</h2>
|
||
</div>
|
||
|
||
<!-- END: this line ends content from: inc/header.default.html -->
|
||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||
|
||
<div class="topnav">
|
||
<a class="Left" href="../anonymous/index.html">← anonymous</a>
|
||
<a class="Left" href="../index.html">↑ 2001 ↑</a>
|
||
<a class="Left" href="../cheong/index.html">cheong →</a>
|
||
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2001/bellard/bellard.c">C code</a>
|
||
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/2001/bellard/Makefile">Makefile</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="../../index.html">IOCCC Home</a>
|
||
<a href="../../years.html">Winning Entries</a>
|
||
<a href="../../authors.html">People who have won</a>
|
||
<a href="../../location.html">Location of authors</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="../../news.html">IOCCC News</a>
|
||
<a href="../../status.html">Contest status</a>
|
||
<a href="../../faq.html#submit">How to enter the IOCCC</a>
|
||
<a href="../../faq.html">FAQ</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="../../bugs.html">Bugs & (mis)features</a>
|
||
<a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a>
|
||
<a href="../../faq.html#fix_web_site">Fixing the web site</a>
|
||
<a href="../../faq.html#fix_author">Fixing author info</a>
|
||
<a href="../../thanks-for-help.html">Thanks for the help</a>
|
||
</div>
|
||
<hr>
|
||
<div class="sidenav">
|
||
<a href="../../judges.html">The IOCCC Judges</a>
|
||
<a href="../../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 for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
|
||
|
||
<!-- START: this line starts content generated by: bin/output-index-author.sh -->
|
||
|
||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||
<ul>
|
||
<li>Name: <a href="../../authors.html#Fabrice_Bellard">Fabrice Bellard</a><br>
|
||
Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<em>France</em>)
|
||
<br><br></li>
|
||
</ul>
|
||
|
||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||
|
||
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
|
||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.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>
|
||
<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
|
||
STATUS: doesn't work with some platforms - please help us fix</code></pre>
|
||
<p>For more detailed information see <a href="../../bugs.html#2001_bellard">2001 bellard bugs</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">./bellard</span> file</span></code></pre></div>
|
||
<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">./bellard</span> bellard.otccex.c</span></code></pre></div>
|
||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||
<p><code><JUDGES_COMMENTS></code> :-)</p>
|
||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||
<p><code>OTCC</code> is an Obfuscated Tiny C Compiler for i386-linux. It generates
|
||
FAST! i386 32 bit code (no bytecode) and it is powerful enough to
|
||
compile itself. <code>OTCC</code> supports a strict subset of C. This subset is
|
||
compilable by a standard ANSI C compiler. <code>OTCC</code> compiles,
|
||
assembles, links and runs C code without the need of any other
|
||
program.</p>
|
||
<p>You can use it by typing:</p>
|
||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bellard</span> bellard.c <span class="pp">[</span><span class="ss">args</span><span class="pp">]</span>...</span></code></pre></div>
|
||
<p>or by giving the C source to its standard input.</p>
|
||
<p><code>args</code> are given to the <code>main()</code> function of <code>bellard.c</code> (<code>argv[0]</code> is
|
||
<a href="bellard.c">bellard.c</a>).</p>
|
||
<h3 id="examples">Examples:</h3>
|
||
<ul>
|
||
<li>Sample compilation and execution:</li>
|
||
</ul>
|
||
<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="ex">./bellard</span> bellard.otccex.c 10</span></code></pre></div>
|
||
<ul>
|
||
<li>Self compilation:</li>
|
||
</ul>
|
||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bellard</span> bellard.c bellard.otccex.c 10</span></code></pre></div>
|
||
<ul>
|
||
<li>Self compilation iterated…</li>
|
||
</ul>
|
||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./bellard</span> bellard.c bellard.c bellard.otccex.c 10</span></code></pre></div>
|
||
<p>An alternate syntax is to use it as a script interpreter: you can
|
||
put <code>#!/usr/local/bin/otcc</code> at the beginning of your C source if
|
||
you installed <code>otcc</code> at this place.</p>
|
||
<h3 id="supported-c-language-subset-read-joint-example-bellard.otccex.c-to-have-an-introduction-to-otcc-dialect">Supported C language subset (read joint example <a href="bellard.otccex.c">bellard.otccex.c</a> to have an introduction to <code>OTCC</code> dialect)</h3>
|
||
<h4 id="expressions">Expressions:</h4>
|
||
<ul>
|
||
<li><p>binary operators, in decreasing precedence order: <code>*</code> <code>/</code> <code>%</code>,
|
||
<code>+</code> <code>-</code>, <code>>></code> <code><<</code>, <code><</code> <code><=</code> <code>></code> <code>>=</code>, <code>==</code> <code>!=</code>, <code>&</code>,
|
||
<code>^</code>, <code>|</code>, <code>=</code>, <code>&&</code>, <code>||</code>.</p></li>
|
||
<li><p><code>&&</code> and <code>||</code> have the same semantics as in C: left to right
|
||
evaluation and early exit (short-circuited).</p></li>
|
||
<li><p>Parenthesis are supported.</p></li>
|
||
<li><p>Unary operators: <code>&</code>, <code>*</code> (pointer indirection), <code>-</code>
|
||
(negation), <code>+</code>, <code>!</code>, <code>~</code>, postfix <code>++</code> and <code>--</code>.</p></li>
|
||
<li><p>Pointer indirection (<code>*</code>) only works with explicit cast to
|
||
<code>char *</code>, <code>int *</code> or <code>int (*)()</code> (function pointer).</p></li>
|
||
<li><p><code>++</code>, <code>--</code>, and unary <code>&</code> can only be used with variable
|
||
lvalue (left value).</p></li>
|
||
<li><p><code>=</code> can only be used with variable or <code>*</code> (pointer
|
||
indirection) lvalue.</p></li>
|
||
<li><p>Function calls are supported <em>with standard <strong>i386</strong> calling
|
||
convention</em>. Function pointers are supported <em>with explicit
|
||
cast</em>. Functions can be used before being declared.</p></li>
|
||
<li><p>Types: only signed integer (<code>int</code>) variables and functions can
|
||
be declared. Variables cannot be initialized in
|
||
declarations. <em>Only old K&R function declarations are parsed
|
||
(implicit integer return value and no types on arguments)</em>.</p></li>
|
||
<li><p>Any function or variable from the libc can be used because <code>OTCC</code>
|
||
uses the libc dynamic linker to resolve undefined symbols.</p></li>
|
||
<li><p>Instructions: blocks (<code>{</code> <code>}</code>) are supported as in C. <code>if</code> and
|
||
<code>else</code> can be used for tests. The <code>while</code> and <code>for</code> C loops are supported.
|
||
<code>break</code> can be used to exit loops. <code>return</code> is used for the return value of a
|
||
function.</p></li>
|
||
<li><p>Identifiers are parsed the same way as C. Local variables are
|
||
handled, but there is no local name space (not a problem if
|
||
different names are used for local and global variables).</p></li>
|
||
<li><p>Numbers can be entered in decimal, hexadecimal (<code>0x</code> or <code>0X</code>
|
||
prefix), or octal (<code>0</code> prefix).</p></li>
|
||
<li><p><code>#define</code> is supported without function like arguments. <em>No macro
|
||
recursion is tolerated</em>; <em>other preprocessor directives are
|
||
ignored</em>.</p></li>
|
||
<li><p>C Strings and C character constants are supported. Only <code>\n</code>,
|
||
<code>\"</code>, <code>\'</code> and <code>\\</code> escapes are recognized.</p></li>
|
||
<li><p>C Comments can be used (but no C++ comments).</p></li>
|
||
<li><p>No error is displayed if an incorrect program is given.</p></li>
|
||
<li><p>Memory: the code, data, and symbol sizes are limited to 100KB
|
||
(it can be changed in the source code).</p></li>
|
||
</ul>
|
||
<h3 id="obfuscation">Obfuscation:</h3>
|
||
<p>No special effort was needed because obfuscation is almost
|
||
unavoidable for such a program :-) <code>#define</code>s must be used to
|
||
compress the code, and integrated i386 code generator leads to non
|
||
obvious code.</p>
|
||
<h3 id="portability">Portability:</h3>
|
||
<p><code>OTCC</code> only works on i386 linux because it generates i386 code. <code>OTCC</code>
|
||
also relies on little endianness, unaligned memory accesses and
|
||
ASCII representation of characters. It also supposes that no valid
|
||
pointers are less than 512. If all those constraints are met, then
|
||
<code>OTCC</code> could be theoretically used to “cross compile”, although no
|
||
such support is currently integrated.</p>
|
||
<p>It was successfully compiled with gcc version 2.95.2. You get some
|
||
warnings because old K&R prototypes are used, some casts are implicit
|
||
and some functions are used before being defined. <code>OTCC</code> uses the
|
||
dynamic linker to resolve symbols with <code>dlsym(3)</code>, so <code>-ldl</code> must
|
||
be used when you compile and link it.</p>
|
||
<!--
|
||
|
||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||
|
||
You are free to share and adapt this file under the terms of this license:
|
||
|
||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||
|
||
For more information, see:
|
||
|
||
https://creativecommons.org/licenses/by-sa/4.0/
|
||
|
||
-->
|
||
|
||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
|
||
|
||
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
|
||
|
||
<h1 id="inventory-for-2001bellard"><a name="inventory"></a>Inventory for 2001/bellard</h1>
|
||
<p><a href="#top">Jump to top</a></p>
|
||
<h2 id="primary-files">Primary files</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.c">bellard.c</a> - entry source</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/Makefile">Makefile</a> - entry Makefile</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.orig.c">bellard.orig.c</a> - original source</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/bellard.otccex.c">bellard.otccex.c</a> - example otcc source</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/otccelf.c">otccelf.c</a> - another example otcc source</li>
|
||
<li><a href="2001_bellard.tar.bz2">2001_bellard.tar.bz2</a> - download entry source</li>
|
||
</ul>
|
||
<h2 id="secondary-files">Secondary files</h2>
|
||
<ul>
|
||
<li><a href="index.html">index.html</a> - entry home page</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/README.md">README.md</a> - markdown source for index.html</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2001/bellard/.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>
|
||
</ul>
|
||
|
||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||
|
||
<!-- END: this line ends content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.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 -->
|
||
|
||
<!--
|
||
|
||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||
|
||
You are free to share and adapt this file under the terms of this license:
|
||
|
||
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||
|
||
For more information, see:
|
||
|
||
https://creativecommons.org/licenses/by-sa/4.0/
|
||
|
||
-->
|
||
|
||
<div class="footer">
|
||
<h2>Copyright and CC BY-SA 4.0 License</h2>
|
||
<p>This file and web page is:</p>
|
||
<blockquote><b>Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
|
||
<p>You are free to share and adapt this file under the terms of this license:</p>
|
||
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
|
||
<p>For more information, see:</p>
|
||
<blockquote><a
|
||
href="https://creativecommons.org/licenses/by-sa/4.0/">https://creativecommons.org/licenses/by-sa/4.0/</a></blockquote>
|
||
<h2>Coda</h2>
|
||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2001%2Fbellard%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 -->
|