The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: cowan@mercury.ccil.org (John Cowan)
Subject: [TUHS] Does anybody recall how the TU10 bootstrap code actually operates?
Date: Wed, 23 Dec 2015 10:58:52 -0500	[thread overview]
Message-ID: <20151223155852.GA6677@mercury.ccil.org> (raw)
In-Reply-To: <567AB7B1.2050907@gmail.com>

Will Senn scripsit:

> Actually, after reflecting on your comments and walking through it
> again, this is really elegant code. The guys who thought this up
> were amazing.  

As usual, they were standing on the shoulders of giants.  The OS/8
bootstrap (on the PDP-8) for the RK8E disk controller was even more
elegant, only two instructions long and requiring no further operator
actions but "clear" and "start".  The first instruction simply read
the current block into the current memory address, which because of
the "clear" read block 0 into memory location 0; the second was also
a branch-to-self.

But the real cleverness was that the bootstrap was placed at locations
30 and 31.  As the disk block was read in by DMA, location 30 was
overwritten with the "skip if disk is ready" instruction and location
31 with "branch to previous location".  So first the CPU was idling in
a one-instruction infinite loop, then in a two-instruction loop as long
as the block was still loading, and finally would continue executing at
location 32 when the disk bootstrap was fully loaded.  The code there
loaded the full device driver for the RK8E into reserved memory at
07600-07777 and jumped to the code within it that loaded the Keyboard
Monitor (the shell) at location 0 and jumped into it.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan at ccil.org
A rose by any other name may smell as sweet, but if you called it
an onion you'd get cooks very confused.          --RMS



  reply	other threads:[~2015-12-23 15:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23  6:59 Noel Chiappa
2015-12-23 15:03 ` Will Senn
2015-12-23 15:58   ` John Cowan [this message]
2015-12-24 22:33 ` Ronald Natalie
  -- strict thread matches above, loose matches on Subject: below --
2015-12-23 18:02 Noel Chiappa
2015-12-23 18:06 ` Larry McVoy
2015-12-23 20:29   ` Clem Cole
2015-12-23  6:13 Will Senn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151223155852.GA6677@mercury.ccil.org \
    --to=cowan@mercury.ccil.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).