improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+132
-133
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Christopher_Mills">Christopher Mills</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,35 +141,35 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>If you wish to save state so that you can run the program and keep files changed
|
||||
(for instance you don’t want to compile <code>mullender.c</code> again) you can compile it
|
||||
like:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber SAVE=1 all</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber SAVE=1 all</span></code></pre></div>
|
||||
<p>Make sure that if you do add a file (including by compiling code) that before
|
||||
you exit (ctrl-e) you type in <code>sync</code>! Otherwise the file might not exist or it
|
||||
will be corrupt if it does.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<pre><code> STATUS: known bug - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2018_mills">2018 mills bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</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">./prog</span></span></code></pre></div>
|
||||
<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">./prog</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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">./prog</span></span></code></pre></div>
|
||||
<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">./prog</span></span></code></pre></div>
|
||||
<p>At the <code>>boot</code> prompt, type return.</p>
|
||||
<p>At the <code>:</code> prompt, type <code>rk(0,0)rkunix</code> and wait for it to initialise itself.
|
||||
Now try typing:</p>
|
||||
<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">cat</span> <span class="op">></span> prog.c</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">main()</span><span class="kw">{</span> <span class="bu">printf</span><span class="er">(</span><span class="st">"Hello, world!\n"</span><span class="kw">);</span> <span class="kw">}</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">^D</span></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> prog.c</span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">a.out</span></span></code></pre></div>
|
||||
<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">cat</span> <span class="op">></span> prog.c</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">main()</span><span class="kw">{</span> <span class="bu">printf</span><span class="er">(</span><span class="st">"Hello, world!\n"</span><span class="kw">);</span> <span class="kw">}</span></span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">^D</span></span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> prog.c</span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">a.out</span></span></code></pre></div>
|
||||
<p>where <code>^D</code> is EOF.</p>
|
||||
<p>Next try:</p>
|
||||
<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="fu">cc</span> mullender.c</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">a.out</span></span></code></pre></div>
|
||||
<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="fu">cc</span> mullender.c</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">a.out</span></span></code></pre></div>
|
||||
<p>… and enjoy the classic <a href="../../1984/mullender/index.html">1984/mullender</a> entry as
|
||||
it would have been in 1984 with a VAX-11/PDP-11! Once it reaches the end of the
|
||||
line, hit enter and see what happens again. When you’re tired of it hit ctrl-c.</p>
|
||||
@@ -181,18 +180,18 @@ line, hit enter and see what happens again. When you’re tired of it hit ctrl-c
|
||||
3636 bytes, which is considerably lighter than the original machine it can replace.</p>
|
||||
<p>This program can take you back to the start of everything, it is possible to
|
||||
run v0. Just type:</p>
|
||||
<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">./v0</span></span></code></pre></div>
|
||||
<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">./v0</span></span></code></pre></div>
|
||||
<p>NOTE: To quit v0, press Control-E.</p>
|
||||
<p>You will be greeted with a familiar prompt of “login”. The username and
|
||||
password are “dmr” and “dmr”. To make things more familiar you’ll need to
|
||||
create ‘.’ as it hasn’t been invented yet on this image!</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">@</span> ln dd dmr .</span></code></pre></div>
|
||||
<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">@</span> ln dd dmr .</span></code></pre></div>
|
||||
<p>An <code>ls</code> will reveal that C hasn’t been invented yet! IOBCC anyone? The
|
||||
compiler is <code>bc</code>. It produces assembly, which will then need to be assembled
|
||||
together like <code>ops.s bl.s hello.s bi.s</code> (in that order) to produce a.out!</p>
|
||||
<p>But wait, we said this was the start of it all! This program can also run a
|
||||
program that replaces an even larger machine that can run BSD 2.9. To start this,</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span></span></code></pre></div>
|
||||
<p>At the <code>>boot</code> prompt, type return.</p>
|
||||
<p>At the “:” prompt, type <code>rk(0,0)rkunix</code>.</p>
|
||||
<p>NOTE: To quit prog, press Control-E.</p>
|
||||
@@ -200,7 +199,7 @@ program that replaces an even larger machine that can run BSD 2.9. To start this
|
||||
the very first IOCCC entries <a href="../../1984/mullender/index.html">1984/mullender</a>, as
|
||||
shown earlier.</p>
|
||||
<p>But wait, there is even more! Try:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./v6</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./v6</span></span></code></pre></div>
|
||||
<p>At the <code>@</code> prompt, type <code>rkunix</code>. You might want to type <code>stty -lcase</code> as
|
||||
otherwise the output will be in all caps.</p>
|
||||
<p>NOTE: To quit v6, press Control-E.</p>
|
||||
@@ -225,42 +224,42 @@ can build versions that can run each of the following:</p>
|
||||
<h3 id="building-and-running-bsd-2.9">Building and Running BSD 2.9:</h3>
|
||||
<p>To run BSD 2.9, do <code>make</code> to build <code>prog</code> and then <code>./prog</code> to run it.</p>
|
||||
<p>You should see a prompt from the first-stage bootloader that looks like</p>
|
||||
<pre><code>>boot</code></pre>
|
||||
<pre><code> >boot</code></pre>
|
||||
<p>Hit enter/return at this point and you will get to the second-stage boot loader
|
||||
that looks like</p>
|
||||
<pre><code>40Boot
|
||||
:</code></pre>
|
||||
<pre><code> 40Boot
|
||||
:</code></pre>
|
||||
<p>The 40 in the prompt indicates that the bootloader has correctly determined
|
||||
that we are running on a PDP-11/40.</p>
|
||||
<p>At this point, type the rather cryptic command <code>rk(0,0)rkunix</code> – this tells
|
||||
the system to look at the first partition on the first <code>RK05</code> fixed disk, find
|
||||
the <code>rkunix</code> file and load it. You should eventually see the following:</p>
|
||||
<pre><code>>boot
|
||||
<pre><code> >boot
|
||||
|
||||
40Boot
|
||||
: rk(0,0)rkunix
|
||||
40Boot
|
||||
: rk(0,0)rkunix
|
||||
|
||||
Berkeley UNIX (Rev. 2.9.1) Sun Nov 20 14:55:50 PST 1983
|
||||
mem = 135872
|
||||
Berkeley UNIX (Rev. 2.9.1) Sun Nov 20 14:55:50 PST 1983
|
||||
mem = 135872
|
||||
|
||||
CONFIGURE SYSTEM:
|
||||
xp ? csr 176700 vector 254 skipped: No CSR
|
||||
rk 0 csr 177400 vector 220 attached
|
||||
hk ? csr 177440 vector 210 skipped: No CSR
|
||||
rl ? csr 174400 vector 160 skipped: No CSR
|
||||
rp ? csr 176700 vector 254 skipped: No CSR
|
||||
ht 0 csr 172440 vector 224 skipped: No CSR
|
||||
tm 0 csr 172520 vector 224 skipped: No CSR
|
||||
ts 0 csr 172520 vector 224 skipped: No CSR
|
||||
dh ? csr 160020 vector 370 skipped: No CSR
|
||||
dm ? csr 170500 vector 360 skipped: No autoconfig routines
|
||||
dz ? csr 160110 vector 320 skipped: No CSR
|
||||
dz ? csr 160110 vector 320 skipped: No CSR
|
||||
dn 0 csr 175200 vector 300 skipped: No autoconfig routines
|
||||
vp ? csr 177500 vector 174 skipped: No autoconfig routines
|
||||
lp ? csr 177514 vector 200 skipped: No CSR
|
||||
Erase=^?, kill=^U, intr=^C
|
||||
#</code></pre>
|
||||
CONFIGURE SYSTEM:
|
||||
xp ? csr 176700 vector 254 skipped: No CSR
|
||||
rk 0 csr 177400 vector 220 attached
|
||||
hk ? csr 177440 vector 210 skipped: No CSR
|
||||
rl ? csr 174400 vector 160 skipped: No CSR
|
||||
rp ? csr 176700 vector 254 skipped: No CSR
|
||||
ht 0 csr 172440 vector 224 skipped: No CSR
|
||||
tm 0 csr 172520 vector 224 skipped: No CSR
|
||||
ts 0 csr 172520 vector 224 skipped: No CSR
|
||||
dh ? csr 160020 vector 370 skipped: No CSR
|
||||
dm ? csr 170500 vector 360 skipped: No autoconfig routines
|
||||
dz ? csr 160110 vector 320 skipped: No CSR
|
||||
dz ? csr 160110 vector 320 skipped: No CSR
|
||||
dn 0 csr 175200 vector 300 skipped: No autoconfig routines
|
||||
vp ? csr 177500 vector 174 skipped: No autoconfig routines
|
||||
lp ? csr 177514 vector 200 skipped: No CSR
|
||||
Erase=^?, kill=^U, intr=^C
|
||||
#</code></pre>
|
||||
<p>Congratulations, you are running BSD UNIX 2.9 in single-user mode as root.</p>
|
||||
<p>On the other hand, if you did a typo somewhere, the boot loader has probably
|
||||
crashed and halted – if so, type Control-E to quit the emulator and try
|
||||
@@ -270,15 +269,15 @@ If so, consider a <code>make clean</code> to start from scratch.</p>
|
||||
root prompt. Most of the commands you are familiar with work here (this was
|
||||
only a quarter of a century ago – how much could things have changed?).
|
||||
Let’s try some:</p>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="co"># ls</span></span>
|
||||
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="ex">.cshrc</span> .profile boot hkunix mnt tmp</span>
|
||||
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="ex">.login</span> 2.9stamp dev lib mullender.c unix</span>
|
||||
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="ex">.msgsrc</span> bin etc lost+found rkunix usr</span>
|
||||
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="co"># df</span></span>
|
||||
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="ex">Filesystem</span> Mounted on kbytes used free % used</span>
|
||||
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true" tabindex="-1"></a><span class="ex">/dev/rk0</span> / 1958 1688 270 86%</span>
|
||||
<span id="cb15-8"><a href="#cb15-8" aria-hidden="true" tabindex="-1"></a><span class="co"># bin/cc mullender.c</span></span>
|
||||
<span id="cb15-9"><a href="#cb15-9" aria-hidden="true" tabindex="-1"></a><span class="co"># ./a.out</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a> <span class="co"># ls</span></span>
|
||||
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">.cshrc</span> .profile boot hkunix mnt tmp</span>
|
||||
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">.login</span> 2.9stamp dev lib mullender.c unix</span>
|
||||
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">.msgsrc</span> bin etc lost+found rkunix usr</span>
|
||||
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a> <span class="co"># df</span></span>
|
||||
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">Filesystem</span> Mounted on kbytes used free % used</span>
|
||||
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">/dev/rk0</span> / 1958 1688 270 86%</span>
|
||||
<span id="cb15-8"><a href="#cb15-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># bin/cc mullender.c</span></span>
|
||||
<span id="cb15-9"><a href="#cb15-9" aria-hidden="true" tabindex="-1"></a> <span class="co"># ./a.out</span></span></code></pre></div>
|
||||
<p>The program you’ve just run was the [winning entry of the first IOCCC contest from
|
||||
1984] <a href="../../1984/mullender/mullender.c" title="mullender.c">1</a> (or was it 1894?), a personal favorite of mine. It is rather
|
||||
tightly bound to running on either a PDP-11 or a VAX-11. Now you have one.</p>
|
||||
@@ -300,51 +299,51 @@ possible, but I didn’t get around to it… As the Judges can no doubt attest,
|
||||
<p>Research UNIX v6 and BSD 2.9 use the same executable, but require a different
|
||||
disk image. Type <code>make v6</code> to build it, then type <code>./prog</code> to run it.</p>
|
||||
<p>You should see the boot loader prompt which is a single <code>@</code>:</p>
|
||||
<pre><code>@</code></pre>
|
||||
<pre><code> @</code></pre>
|
||||
<p>At this point, you again must type a special incantation: <code>rkunix</code>. After that
|
||||
you should see:</p>
|
||||
<pre><code>@rkunix
|
||||
mem = 1035
|
||||
RESTRICTED RIGHTS
|
||||
<pre><code> @rkunix
|
||||
mem = 1035
|
||||
RESTRICTED RIGHTS
|
||||
|
||||
Use, duplication or disclosure is subject to
|
||||
restrictions stated in Contract with Western
|
||||
Electric Company, Inc.
|
||||
#</code></pre>
|
||||
Use, duplication or disclosure is subject to
|
||||
restrictions stated in Contract with Western
|
||||
Electric Company, Inc.
|
||||
#</code></pre>
|
||||
<p>You are now running a single-user session of v6 UNIX. You might want to start
|
||||
with <code>stty -lcase</code> because otherwise everything will be IN ALL CAPS.</p>
|
||||
<p>Again, if you failed typing seven characters without making a mistake, you
|
||||
may need to use Control-E to quit the emulation.</p>
|
||||
<p>Assuming you’re more careful than that, we can try a few commands:</p>
|
||||
<pre><code>@rkunix
|
||||
mem = 1035
|
||||
RESTRICTED RIGHTS
|
||||
<pre><code> @rkunix
|
||||
mem = 1035
|
||||
RESTRICTED RIGHTS
|
||||
|
||||
Use, duplication or disclosure is subject to
|
||||
restrictions stated in Contract with Western
|
||||
Electric Company, Inc.
|
||||
# STTY -LCASE
|
||||
# ls
|
||||
bin
|
||||
dev
|
||||
etc
|
||||
hpunix
|
||||
lib
|
||||
mnt
|
||||
rkunix
|
||||
rpunix
|
||||
tmp
|
||||
unix
|
||||
usr
|
||||
# cat > foo.c
|
||||
main()
|
||||
{
|
||||
printf("Hello, World!\n");
|
||||
}
|
||||
^D
|
||||
# cc foo.c
|
||||
# ./a.out
|
||||
Hello, World!</code></pre>
|
||||
Use, duplication or disclosure is subject to
|
||||
restrictions stated in Contract with Western
|
||||
Electric Company, Inc.
|
||||
# STTY -LCASE
|
||||
# ls
|
||||
bin
|
||||
dev
|
||||
etc
|
||||
hpunix
|
||||
lib
|
||||
mnt
|
||||
rkunix
|
||||
rpunix
|
||||
tmp
|
||||
unix
|
||||
usr
|
||||
# cat > foo.c
|
||||
main()
|
||||
{
|
||||
printf("Hello, World!\n");
|
||||
}
|
||||
^D
|
||||
# cc foo.c
|
||||
# ./a.out
|
||||
Hello, World!</code></pre>
|
||||
<p>Why is Version 6 interesting? Well, it was the oldest version that I could
|
||||
find a boot image of that had a C compiler… This C compiler is recognizably
|
||||
C, but not quite the same syntax as we have today. It’s much closer to the
|
||||
@@ -387,13 +386,13 @@ it hadn’t been named that yet).</p>
|
||||
<p>You can try out this version by typing <code>make v0</code>. Since this version is a
|
||||
native PDP-7 emulation, it gets its own binary. Type <code>./v0</code> to run it. You
|
||||
should see the login prompt.</p>
|
||||
<pre><code>login:</code></pre>
|
||||
<pre><code> login:</code></pre>
|
||||
<p>There are two user accounts <code>ken</code> and <code>dmr</code>, with the passwords <code>ken</code> and <code>dmr</code>
|
||||
respectively. Let’s try the Dennis Richie’s <code>dmr</code> account:</p>
|
||||
<pre><code>login: dmr
|
||||
password: dmr
|
||||
@ ls
|
||||
. ?</code></pre>
|
||||
<pre><code> login: dmr
|
||||
password: dmr
|
||||
@ ls
|
||||
. ?</code></pre>
|
||||
<p>Even though this is not Ken’s doing, I feel this gives me licence to
|
||||
include this quote from the BSD <code>fortune</code> program:</p>
|
||||
<blockquote>
|
||||
@@ -415,51 +414,51 @@ directory doesn’t have that yet, but we can make it, because the home
|
||||
directory has a hard link to <code>dd</code>, which is the directory that holds all
|
||||
of the user home directories (this will eventually become <code>/</code>, the root
|
||||
path). We can do</p>
|
||||
<pre><code>@ ln dd dmr .</code></pre>
|
||||
<pre><code> @ ln dd dmr .</code></pre>
|
||||
<p>To make the new link (note that <code>ln</code> doesn’t support paths either, so you have
|
||||
to give it three arguments – a directory in the current dir, a file in that
|
||||
directory, and the new name).</p>
|
||||
<p>Now <code>ls</code> will work, and we can try some other things while we are here:</p>
|
||||
<pre><code>login: dmr
|
||||
password: dmr
|
||||
@ ln dd dmr .
|
||||
@ ls
|
||||
dd
|
||||
system
|
||||
as.s
|
||||
b_readme
|
||||
bi.s
|
||||
bl.s
|
||||
db.s
|
||||
hello.b
|
||||
ops.s
|
||||
.
|
||||
@ cat b_readme
|
||||
Here is how to compile and run hello.b:
|
||||
<pre><code> login: dmr
|
||||
password: dmr
|
||||
@ ln dd dmr .
|
||||
@ ls
|
||||
dd
|
||||
system
|
||||
as.s
|
||||
b_readme
|
||||
bi.s
|
||||
bl.s
|
||||
db.s
|
||||
hello.b
|
||||
ops.s
|
||||
.
|
||||
@ cat b_readme
|
||||
Here is how to compile and run hello.b:
|
||||
|
||||
@ bc hello.b hello.s
|
||||
@ as ops.s bl.s hello.s bi.s
|
||||
I
|
||||
II
|
||||
ops.s
|
||||
bl.s
|
||||
hello.s
|
||||
bi.s
|
||||
@ a.out
|
||||
Hello, World!
|
||||
@ bc hello.b hello.s
|
||||
@ as ops.s bl.s hello.s bi.s
|
||||
I
|
||||
II
|
||||
ops.s
|
||||
bl.s
|
||||
hello.s
|
||||
bi.s
|
||||
@ a.out
|
||||
Hello, World!
|
||||
|
||||
|
||||
@ bc hello.b hello.s
|
||||
@ as ops.s bl.s hello.s bi.s
|
||||
I
|
||||
II
|
||||
ops.s
|
||||
bl.s
|
||||
hello.s
|
||||
bi.s
|
||||
@ a.out
|
||||
Hello, World!
|
||||
@</code></pre>
|
||||
@ bc hello.b hello.s
|
||||
@ as ops.s bl.s hello.s bi.s
|
||||
I
|
||||
II
|
||||
ops.s
|
||||
bl.s
|
||||
hello.s
|
||||
bi.s
|
||||
@ a.out
|
||||
Hello, World!
|
||||
@</code></pre>
|
||||
<p>The last command is invoking the compiler for an extremely early version of
|
||||
the [B programming language] <a href="https://www.bell-labs.com/usr/dmr/www/kbman.html" title="B Language">3</a>, the predecessor to C. Thompson missed the
|
||||
convenience of writing code in a high-level language – Multics was written
|
||||
|
||||
Reference in new issue
Block a user