Fixes in 2006 html files and some of 2011
This commit is contained in:
1 parent
35038a63bd
commit
75829b4561
18 files changed
+349
-182
No files matched your search
+17
-13
@@ -147,20 +147,24 @@ as you like (as understood by the C function `isspace()`).
|
||||
|
||||
Supported operations and functions are:
|
||||
|
||||
```
|
||||
Operation | Description
|
||||
- `+`, `-`, `*`, `/`
|
||||
- Arithmetic operations, priority of * , / over +,- is respected.
|
||||
- `<,>`
|
||||
- Compares the real parts of two complex numbers (the imaginary part
|
||||
is ignored). Any number of conditions is allowed, the iteration will
|
||||
just stop as soon as one of them fails.
|
||||
- `Abs2`
|
||||
- Calculates the squared norm, i.e.: `Abs2(a+b*i)` is `(a*a+b*b)+0*i`.
|
||||
- `Re`
|
||||
- Extract the real part, i.e.: `Re(a+b*i)` is `a+0*i`.
|
||||
- `Im`
|
||||
- Extract the imaginary part, i.e.: `Im(a+b*i)` is` b+0*i`.
|
||||
- `Exp`
|
||||
- Calculates the complex exponential, i.e. `Exp(a+b*i)` is `e^a*(cos(b)+sin(b)*i)`.
|
||||
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is respected.
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration will
|
||||
| just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm
|
||||
| i.e. Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.
|
||||
```
|
||||
- `Ln`
|
||||
- Calculates the principal value of the natural logarithm i.e. `Ln(a+b*i)`
|
||||
is `ln(a*a+b*b)/2 + atan(b/a)*i`.
|
||||
|
||||
Here are a few examples of fractals you can draw:
|
||||
|
||||
|
||||
+33
-12
@@ -491,18 +491,39 @@ expression must be an assignment (<code>[variable] = [expr]</code>) or a compari
|
||||
<code><</code> or <code>></code> (<code>[expr1] < [expr2]</code> or <code>[expr1] > [expr2]</code>), and you can add spaces
|
||||
as you like (as understood by the C function <code>isspace()</code>).</p>
|
||||
<p>Supported operations and functions are:</p>
|
||||
<pre><code> Operation | Description
|
||||
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is respected.
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration will
|
||||
| just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm
|
||||
| i.e. Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.</code></pre>
|
||||
<ul>
|
||||
<li><code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>
|
||||
<ul>
|
||||
<li>Arithmetic operations, priority of * , / over +,- is respected.</li>
|
||||
</ul></li>
|
||||
<li><code><,></code>
|
||||
<ul>
|
||||
<li>Compares the real parts of two complex numbers (the imaginary part
|
||||
is ignored). Any number of conditions is allowed, the iteration will
|
||||
just stop as soon as one of them fails.</li>
|
||||
</ul></li>
|
||||
<li><code>Abs2</code>
|
||||
<ul>
|
||||
<li>Calculates the squared norm, i.e.: <code>Abs2(a+b*i)</code> is <code>(a*a+b*b)+0*i</code>.</li>
|
||||
</ul></li>
|
||||
<li><code>Re</code>
|
||||
<ul>
|
||||
<li>Extract the real part, i.e.: <code>Re(a+b*i)</code> is <code>a+0*i</code>.</li>
|
||||
</ul></li>
|
||||
<li><code>Im</code>
|
||||
<ul>
|
||||
<li>Extract the imaginary part, i.e.: <code>Im(a+b*i)</code> is<code>b+0*i</code>.</li>
|
||||
</ul></li>
|
||||
<li><code>Exp</code>
|
||||
<ul>
|
||||
<li>Calculates the complex exponential, i.e. <code>Exp(a+b*i)</code> is <code>e^a*(cos(b)+sin(b)*i)</code>.</li>
|
||||
</ul></li>
|
||||
<li><code>Ln</code>
|
||||
<ul>
|
||||
<li>Calculates the principal value of the natural logarithm i.e. <code>Ln(a+b*i)</code>
|
||||
is <code>ln(a*a+b*b)/2 + atan(b/a)*i</code>.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Here are a few examples of fractals you can draw:</p>
|
||||
<ul>
|
||||
<li>Mandelbrot:</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
make
|
||||
```
|
||||
|
||||
There is an alternate version that supports arrow keys. See the [alternate
|
||||
There is an alternate version that supports arrow keys. See the [Alternate
|
||||
code](#alternate-code) section below.
|
||||
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- BEFORE: 1st line of markdown file: 2006/night/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre><code> make</code></pre>
|
||||
<p>There is an alternate version that supports arrow keys. See the <a href="#alternate-code">alternate
|
||||
<p>There is an alternate version that supports arrow keys. See the <a href="#alternate-code">Alternate
|
||||
code</a> section below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./night</code></pre>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
```
|
||||
|
||||
We recommend the alt version so that you can see what this looked like back in 2006.
|
||||
If you wish to see the original faster version see [original
|
||||
If you wish to see the original faster version see [Original
|
||||
code](#original-code) below.
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ it. To do so try:
|
||||
./sloane.alt
|
||||
```
|
||||
|
||||
If you wish to make it like the original, as if the below [Original
|
||||
If you wish to make it like the original, as if the below [original
|
||||
code](#original-code) was being used, you can do:
|
||||
|
||||
``` <!---sh-->
|
||||
@@ -57,13 +57,13 @@ Should you wish to see the original you may do so with the original code,
|
||||
./sloane
|
||||
```
|
||||
|
||||
WARNING: if you are easily overstimulated with fast movement or have
|
||||
**WARNING**: if you are easily overstimulated with fast movement or have
|
||||
photosensitivity please be careful running this version and instead see the
|
||||
above!
|
||||
|
||||
NOTE: again as above, to see what is going on, we recommend that you instead use
|
||||
**NOTE**: again as above, to see what is going on, we recommend that you instead use
|
||||
the alternate code which we described in the [To build](#to-build) and
|
||||
[try](#try) sections above.
|
||||
[Try](#try) sections above.
|
||||
|
||||
|
||||
## Judges' Comments:
|
||||
|
||||
@@ -411,7 +411,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre><code> make alt</code></pre>
|
||||
<p>We recommend the alt version so that you can see what this looked like back in 2006.
|
||||
If you wish to see the original faster version see <a href="#original-code">original
|
||||
If you wish to see the original faster version see <a href="#original-code">Original
|
||||
code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./slone.alt</code></pre>
|
||||
@@ -423,7 +423,7 @@ value used in <code>usleep()</code>. The default is <code>75000</code> but you c
|
||||
it. To do so try:</p>
|
||||
<pre><code> make clobber SLEEP=70000 clobber alt
|
||||
./sloane.alt</code></pre>
|
||||
<p>If you wish to make it like the original, as if the below <a href="#original-code">Original
|
||||
<p>If you wish to make it like the original, as if the below <a href="#original-code">original
|
||||
code</a> was being used, you can do:</p>
|
||||
<pre><code> make SLEEP=0 clobber alt
|
||||
./sloane.alt</code></pre>
|
||||
@@ -434,12 +434,12 @@ code</a> was being used, you can do:</p>
|
||||
<pre><code> make clobber all</code></pre>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<pre><code> ./sloane</code></pre>
|
||||
<p>WARNING: if you are easily overstimulated with fast movement or have
|
||||
<p><strong>WARNING</strong>: if you are easily overstimulated with fast movement or have
|
||||
photosensitivity please be careful running this version and instead see the
|
||||
above!</p>
|
||||
<p>NOTE: again as above, to see what is going on, we recommend that you instead use
|
||||
<p><strong>NOTE</strong>: again as above, to see what is going on, we recommend that you instead use
|
||||
the alternate code which we described in the <a href="#to-build">To build</a> and
|
||||
<a href="#try">try</a> sections above.</p>
|
||||
<a href="#try">Try</a> sections above.</p>
|
||||
<h2 id="judges-comments">Judges’ Comments:</h2>
|
||||
<p>Looks almost good enough to eat, dunnit? I suppose you could argue that,
|
||||
at first blush, this looks like a self-reproducing program.</p>
|
||||
|
||||
+11
-7
@@ -32,9 +32,9 @@ where `file` is one of:
|
||||
> spirals3 spirals4 squares stars stars2<br>
|
||||
> tree tree2 tree3 tree4 triangle
|
||||
|
||||
NOTE: you cannot specify a different width from height; it's one number.
|
||||
**NOTE**: you cannot specify a different width from height; it's one number.
|
||||
|
||||
NOTE: `convert(1)` belongs to [ImageMagick](https://imagemagick.org/index.php).
|
||||
**NOTE**: `convert(1)` belongs to [ImageMagick](https://imagemagick.org/index.php).
|
||||
|
||||
|
||||
## Try:
|
||||
@@ -74,11 +74,13 @@ The program should be run with the following
|
||||
|
||||
where:
|
||||
|
||||
```
|
||||
m = The size of the picture (picture will be m X m in size).
|
||||
n = The number of iterations to run (More will make for a clearer picture).
|
||||
ifs = The file to use as input.
|
||||
```
|
||||
- `m`
|
||||
- The size of the picture (picture will be m X m in size).
|
||||
- `n`
|
||||
- The number of iterations to run (More will make for a clearer picture).
|
||||
|
||||
- `ifs`
|
||||
- The file to use as input.
|
||||
|
||||
The program will spit out an [XBM image](https://en.wikipedia.org/wiki/X_BitMap)
|
||||
on standard out. Minimal checking is done on the arguments mainly that there
|
||||
@@ -154,6 +156,8 @@ Included in my submission will be a tarball of some IFS files,
|
||||
including one that attempts (not very well) to mimic the IOCCC logo
|
||||
(I figure it can't hurt to attempt to suck up, right?).
|
||||
|
||||
(**NOTE from Judges**: we extracted the files.)
|
||||
|
||||
I would try to explain how to create an IFS file but I am not smart
|
||||
enough to condense it down to something that is coherent.
|
||||
|
||||
|
||||
+17
-5
@@ -430,8 +430,8 @@ pentagons rings rings2 spirals spirals2<br>
|
||||
spirals3 spirals4 squares stars stars2<br>
|
||||
tree tree2 tree3 tree4 triangle</p>
|
||||
</blockquote>
|
||||
<p>NOTE: you cannot specify a different width from height; it’s one number.</p>
|
||||
<p>NOTE: <code>convert(1)</code> belongs to <a href="https://imagemagick.org/index.php">ImageMagick</a>.</p>
|
||||
<p><strong>NOTE</strong>: you cannot specify a different width from height; it’s one number.</p>
|
||||
<p><strong>NOTE</strong>: <code>convert(1)</code> belongs to <a href="https://imagemagick.org/index.php">ImageMagick</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<pre><code> ./try.sh</code></pre>
|
||||
<p>After running the program on a few files it will ask you if you wish to run it
|
||||
@@ -452,9 +452,20 @@ a reasonably experienced user who can parse formats in their mind. :-)</p>
|
||||
<p>The program should be run with the following</p>
|
||||
<pre><code> ./stewart <m> <n> <ifs></code></pre>
|
||||
<p>where:</p>
|
||||
<pre><code> m = The size of the picture (picture will be m X m in size).
|
||||
n = The number of iterations to run (More will make for a clearer picture).
|
||||
ifs = The file to use as input.</code></pre>
|
||||
<ul>
|
||||
<li><code>m</code>
|
||||
<ul>
|
||||
<li>The size of the picture (picture will be m X m in size).</li>
|
||||
</ul></li>
|
||||
<li><code>n</code>
|
||||
<ul>
|
||||
<li>The number of iterations to run (More will make for a clearer picture).</li>
|
||||
</ul></li>
|
||||
<li><code>ifs</code>
|
||||
<ul>
|
||||
<li>The file to use as input.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>The program will spit out an <a href="https://en.wikipedia.org/wiki/X_BitMap">XBM image</a>
|
||||
on standard out. Minimal checking is done on the arguments mainly that there
|
||||
are 3. Wrong arguments will cause the program to bomb out.</p>
|
||||
@@ -500,6 +511,7 @@ another kind of fractal, those from the IFS:
|
||||
<p>Included in my submission will be a tarball of some IFS files,
|
||||
including one that attempts (not very well) to mimic the IOCCC logo
|
||||
(I figure it can’t hurt to attempt to suck up, right?).</p>
|
||||
<p>(<strong>NOTE from Judges</strong>: we extracted the files.)</p>
|
||||
<p>I would try to explain how to create an IFS file but I am not smart
|
||||
enough to condense it down to something that is coherent.</p>
|
||||
<p>Basically the break down is:</p>
|
||||
|
||||
@@ -46,7 +46,7 @@ string actually forms part of the lookup table.
|
||||
|
||||
Intel CC warns about the lack of a declaration for the argument to `main()`.
|
||||
(`gcc` does not notice this though, even with `-Wall`.) But anyway it can
|
||||
easily be declared as int at the expense of 4 more characters.
|
||||
easily be declared as `int` at the expense of 4 more characters.
|
||||
|
||||
I'm not sure of the effects on a hard disk of rewriting the same file
|
||||
multiple times per second for a long time. Run at your own risk!
|
||||
|
||||
@@ -432,7 +432,7 @@ of brackets to a minimum, and to keep the character count as low as possible.</p
|
||||
string actually forms part of the lookup table.</p>
|
||||
<p>Intel CC warns about the lack of a declaration for the argument to <code>main()</code>.
|
||||
(<code>gcc</code> does not notice this though, even with <code>-Wall</code>.) But anyway it can
|
||||
easily be declared as int at the expense of 4 more characters.</p>
|
||||
easily be declared as <code>int</code> at the expense of 4 more characters.</p>
|
||||
<p>I’m not sure of the effects on a hard disk of rewriting the same file
|
||||
multiple times per second for a long time. Run at your own risk!</p>
|
||||
<!--
|
||||
|
||||
+63
-36
@@ -147,10 +147,15 @@ by the provided C.BIOS.
|
||||
To get a complete [CP/M](https://en.wikipedia.org/wiki/CP/M) system, you will need the following files
|
||||
from the `SOURCE` directory:
|
||||
|
||||
```
|
||||
ASM.COM DDT.COM DUMP.COM ED.COM LOAD.COM
|
||||
PIP.COM STAT.COM SUBMIT.COM XSUB.COM
|
||||
```
|
||||
- `ASM.COM`
|
||||
- `DDT.COM`
|
||||
- `DUMP.COM`
|
||||
- `ED.COM`
|
||||
- `LOAD.COM`
|
||||
- `PIP.COM`
|
||||
- `STAT.COM`
|
||||
- `SUBMIT.COM`
|
||||
- `XSUB.COM`
|
||||
|
||||
To import them, you must run the emulator with an argument, by
|
||||
example:
|
||||
@@ -195,23 +200,26 @@ bit 2) and `C` (Carry, bit 0).
|
||||
It is easy if your platform has `getch()`/`kbhit()` and
|
||||
ANSI terminal:
|
||||
|
||||
```
|
||||
read --> Z=kbhit()?getch():0
|
||||
write --> putchar(7[o])
|
||||
system --> nothing
|
||||
```
|
||||
- `read`
|
||||
- `Z=kbhit()?getch():0`
|
||||
- `write`
|
||||
- `putchar(7[o])`
|
||||
- `system`
|
||||
- nothing
|
||||
|
||||
|
||||
Notice that you'll have to do `#include <conio.h>` as well.
|
||||
|
||||
Also add the following to trap Ctrl-C:
|
||||
|
||||
#include <signal.h>
|
||||
signal(SIGINT, SIG_IGN);
|
||||
``` <!---c-->
|
||||
#include <signal.h>
|
||||
signal(SIGINT, SIG_IGN);
|
||||
```
|
||||
|
||||
NOTE: this is what the [alternate code](#alternate-code) is for!
|
||||
**NOTE**: this is what the [alternate code](#alternate-code) is for!
|
||||
|
||||
NOTE from the judges: in Unix like systems `getch()` is part of curses but this
|
||||
**NOTE from the Judges**: in Unix like systems `getch()` is part of curses but this
|
||||
is not what is needed.
|
||||
|
||||
On PC/DOS you need to add `ANSI.SYS` to `CONFIG.SYS`.
|
||||
@@ -238,35 +246,54 @@ main loop reads every [opcode](https://en.wikipedia.org/wiki/Opcode) and
|
||||
separates them in one of three common forms. A lot of ternary operators selects
|
||||
the instruction.
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
- `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
|
||||
|
||||
The following instructions do peripheral operation:
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
- `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
|
||||
|
||||
Memory addresses:
|
||||
|
||||
```
|
||||
FBFA = Low source/target direction
|
||||
FBFB - High source/target direction
|
||||
FBFC - Sector
|
||||
FBFD - Low cylinder
|
||||
FBFE - High cylinder
|
||||
FBFF - Drive.
|
||||
```
|
||||
- `FBFA`
|
||||
- Low source/target direction
|
||||
- `FBFB`
|
||||
- High source/target direction
|
||||
- `FBFC`
|
||||
- Sector
|
||||
- `FBFD`
|
||||
- Low cylinder
|
||||
- `FBFE`
|
||||
- High cylinder
|
||||
- `FBFF`
|
||||
- Drive.
|
||||
|
||||
The BIOS is tailor made for this emulator, and helps to simplify it.
|
||||
|
||||
|
||||
+119
-26
@@ -502,8 +502,17 @@ two files on A: drive, <code>HALT.COM</code> to stop the emulator (so it closes
|
||||
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>
|
||||
<ul>
|
||||
<li><code>ASM.COM</code></li>
|
||||
<li><code>DDT.COM</code></li>
|
||||
<li><code>DUMP.COM</code></li>
|
||||
<li><code>ED.COM</code></li>
|
||||
<li><code>LOAD.COM</code></li>
|
||||
<li><code>PIP.COM</code></li>
|
||||
<li><code>STAT.COM</code></li>
|
||||
<li><code>SUBMIT.COM</code></li>
|
||||
<li><code>XSUB.COM</code></li>
|
||||
</ul>
|
||||
<p>To import them, you must run the emulator with an argument, by
|
||||
example:</p>
|
||||
<pre><code> ./toledo2 DDT.COM</code></pre>
|
||||
@@ -530,15 +539,26 @@ 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 --> Z=kbhit()?getch():0
|
||||
write --> putchar(7[o])
|
||||
system --> nothing</code></pre>
|
||||
<ul>
|
||||
<li><code>read</code>
|
||||
<ul>
|
||||
<li><code>Z=kbhit()?getch():0</code></li>
|
||||
</ul></li>
|
||||
<li><code>write</code>
|
||||
<ul>
|
||||
<li><code>putchar(7[o])</code></li>
|
||||
</ul></li>
|
||||
<li><code>system</code>
|
||||
<ul>
|
||||
<li>nothing</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Notice that you’ll have to do <code>#include <conio.h></code> as well.</p>
|
||||
<p>Also add the following to trap Ctrl-C:</p>
|
||||
<pre><code>#include <signal.h>
|
||||
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
|
||||
<pre><code> #include <signal.h>
|
||||
signal(SIGINT, SIG_IGN);</code></pre>
|
||||
<p><strong>NOTE</strong>: this is what the <a href="#alternate-code">alternate code</a> is for!</p>
|
||||
<p><strong>NOTE from the Judges</strong>: 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
|
||||
@@ -555,25 +575,98 @@ counter</a> is the <code>c</code> pointer and
|
||||
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>
|
||||
<ul>
|
||||
<li><code>o[0]</code>
|
||||
<ul>
|
||||
<li>B register</li>
|
||||
</ul></li>
|
||||
<li><code>o[1]</code>
|
||||
<ul>
|
||||
<li>C register</li>
|
||||
</ul></li>
|
||||
<li><code>o[2]</code>
|
||||
<ul>
|
||||
<li>D register</li>
|
||||
</ul></li>
|
||||
<li><code>o[3]</code>
|
||||
<ul>
|
||||
<li>E register</li>
|
||||
</ul></li>
|
||||
<li><code>o[4]</code>
|
||||
<ul>
|
||||
<li>H register</li>
|
||||
</ul></li>
|
||||
<li><code>o[5]</code>
|
||||
<ul>
|
||||
<li>L register</li>
|
||||
</ul></li>
|
||||
<li><code>o[6]</code>
|
||||
<ul>
|
||||
<li>Flags</li>
|
||||
</ul></li>
|
||||
<li><code>o[7]</code>
|
||||
<ul>
|
||||
<li>A or accumulator</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<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>
|
||||
<ul>
|
||||
<li><code>76</code>
|
||||
<ul>
|
||||
<li>Quits emulator</li>
|
||||
</ul></li>
|
||||
<li><code>DB 00</code>
|
||||
<ul>
|
||||
<li>Reads key pressed status</li>
|
||||
</ul></li>
|
||||
<li><code>DB 01</code>
|
||||
<ul>
|
||||
<li>Reads key</li>
|
||||
</ul></li>
|
||||
<li><code>DB 02</code>
|
||||
<ul>
|
||||
<li>Reads byte from file (Carry=EOF)</li>
|
||||
</ul></li>
|
||||
<li><code>D3 xx</code>
|
||||
<ul>
|
||||
<li>Writes byte from acc. to console</li>
|
||||
</ul></li>
|
||||
<li><code>ED ED 02</code>
|
||||
<ul>
|
||||
<li>Reads sector</li>
|
||||
</ul></li>
|
||||
<li><code>ED ED 03</code>
|
||||
<ul>
|
||||
<li>Writes sector</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<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>
|
||||
<ul>
|
||||
<li><code>FBFA</code>
|
||||
<ul>
|
||||
<li>Low source/target direction</li>
|
||||
</ul></li>
|
||||
<li><code>FBFB</code>
|
||||
<ul>
|
||||
<li>High source/target direction</li>
|
||||
</ul></li>
|
||||
<li><code>FBFC</code>
|
||||
<ul>
|
||||
<li>Sector</li>
|
||||
</ul></li>
|
||||
<li><code>FBFD</code>
|
||||
<ul>
|
||||
<li>Low cylinder</li>
|
||||
</ul></li>
|
||||
<li><code>FBFE</code>
|
||||
<ul>
|
||||
<li>High cylinder</li>
|
||||
</ul></li>
|
||||
<li><code>FBFF</code>
|
||||
<ul>
|
||||
<li>Drive.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>The BIOS is tailor made for this emulator, and helps to simplify it.</p>
|
||||
<h3 id="other-notes">Other notes</h3>
|
||||
<ul>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
make
|
||||
```
|
||||
|
||||
NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
|
||||
**NOTE**: this entry requires the `X11/Xlib.h` header file and the X11 library to
|
||||
compile. For more information see the
|
||||
FAQ on "[X11](../../faq.html#X11)".
|
||||
|
||||
The author provided two alternate versions, one which adds a status bar and
|
||||
another that makes it text only. The author also provided a version that they
|
||||
tested with Windows. See [alternate code](#alternate-code) below.
|
||||
tested with Windows. See [Alternate code](#alternate-code) below.
|
||||
|
||||
|
||||
## To use:
|
||||
@@ -140,10 +140,12 @@ play stronger?
|
||||
|
||||
### UPGRADES
|
||||
|
||||
Using [toledo3-sbar.c](%%REPO_URL%%/2006/toledo3/toledo3-sbar.c) (which is too large for this IOCCC size
|
||||
rules) creates a status display about gameplay on the window title bar.
|
||||
Using [toledo3-sbar.c](%%REPO_URL%%/2006/toledo3/toledo3-sbar.c) (which is too
|
||||
large for this IOCCC's size rules) creates a status display about gameplay on
|
||||
the window title bar.
|
||||
|
||||
Using [toledo3-txt.c](%%REPO_URL%%/2006/toledo3/toledo3-txt.c) turns this into being purely text based.
|
||||
Using [toledo3-txt.c](%%REPO_URL%%/2006/toledo3/toledo3-txt.c) turns this into
|
||||
being purely text based.
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
@@ -410,12 +410,12 @@ Location: <a href="../../location.html#MX">MX</a> - <em>United Mexican States</e
|
||||
<!-- BEFORE: 1st line of markdown file: 2006/toledo3/README.md -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<pre><code> make</code></pre>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
<p><strong>NOTE</strong>: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
|
||||
compile. For more information see the
|
||||
FAQ on “<a href="../../faq.html#X11">X11</a>”.</p>
|
||||
<p>The author provided two alternate versions, one which adds a status bar and
|
||||
another that makes it text only. The author also provided a version that they
|
||||
tested with Windows. See <a href="#alternate-code">alternate code</a> below.</p>
|
||||
tested with Windows. See <a href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<pre><code> ./toledo3 [1 | 2 | 3 [b]]</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
@@ -492,9 +492,11 @@ graphical interface. Can you do it?</p>
|
||||
<p>Can the evaluation function be enhanced to make the program
|
||||
play stronger?</p>
|
||||
<h3 id="upgrades">UPGRADES</h3>
|
||||
<p>Using <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3/toledo3-sbar.c">toledo3-sbar.c</a> (which is too large for this IOCCC size
|
||||
rules) creates a status display about gameplay on the window title bar.</p>
|
||||
<p>Using <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3/toledo3-txt.c">toledo3-txt.c</a> turns this into being purely text based.</p>
|
||||
<p>Using <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3/toledo3-sbar.c">toledo3-sbar.c</a> (which is too
|
||||
large for this IOCCC’s size rules) creates a status display about gameplay on
|
||||
the window title bar.</p>
|
||||
<p>Using <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2006/toledo3/toledo3-txt.c">toledo3-txt.c</a> turns this into
|
||||
being purely text based.</p>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
Reference in new issue
Block a user