The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: will.senn@gmail.com (Will Senn)
Subject: [TUHS] v6 RK05 bootloader question
Date: Wed, 30 Dec 2015 01:29:51 -0600	[thread overview]
Message-ID: <568387EF.6010407@gmail.com> (raw)
In-Reply-To: <685C2CB4-B23B-4A9C-833D-EE27B37B7ECF@mailbox.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2899 bytes --]



On 12/30/15 1:14 AM, Wolfgang Helbig wrote:
> What went wrong with simh? It worked fine with examples that I entered. Find working “simh”-Programs at
> 	http://wwwlehre.dhbw-stuttgart.de/~helbig/os/pdp11/progs/
>
> They might help to narrow in the problem.
>
> Greetings,
> Wolfgang
Wolfgang,

Nothing is wrong with SimH's handling of the machine code programs that 
I know of. It is when you try to modify the device registers directly 
using deposit to effect the boot loading that the simulator doesn't 
operate as would a real PDP-11. For example, Norman Wilson's example:

1.  Halt/Enable to Halt
2.  System reset (also sends a reset to the UNIBUS)
3.  Load address 777404
4.  Deposit 5.
(watch lights blink for a second or so)
5.  Load address 0
6.  Halt/Enable to Enable
7.  Continue

This doesn't work in SimH. I asked Mark Pizzolato about why, and he suggested the following:

The reason is that on real hardware, when an I/O activity
is initiated via some register probing, the device will then perform the commanded
activity in parallel to the simulator's execution of instructions.  A device driver will
either wait for an interrupt to know when to proceed or it will read some device
status register periodically or in a tight loop to determine completion.  With hand
entered boot code, the goal is to minimize typing of boot code and since
operations will complete (from a human perspective) as soon as the user is done
typing, instructions which wait for I/O completion are not provided as  part of the
hand typed boot code.

Simh devices don't actually operate in parallel with the CPU.  The concept of
parallel operation is simulated by the devices performing their activities in
between the execution of simulated instructions.  The simh framework has
the ability to allow a device simulation to schedule its activation in between
some future number of instructions executed.  This allows programs in the
simulated system to see that some time has elapsed from when a device
operation is initiated to when it completes.  A hand entered bootstrap program
without any loops to wait for completion status generally won't execute
enough instructions to allow the desired operation to actually complete

Which makes sense, but doesn't sound like a brick wall. Yes, the console 
method leverages side effects, granted, but the console method worked on 
a real PDP, just not on the simulator. It will with some 
modifications... To be honest, I really liked the idea of making 
Norman's method work in SimH because it's fun and feels historic, and if 
I can provide other similar examples along with some supporting text, 
the modification can probably be made. Then I can write another blog 
entry for posterity that's a little more fun and a little less 
technical, well that depends on the reader's perspective, but certainly 
light on technical details :).

Thanks,

Will







  reply	other threads:[~2015-12-30  7:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 20:32 Norman Wilson
2015-12-29 20:55 ` Will Senn
2015-12-29 21:37   ` Ronald Natalie
2015-12-30  7:14   ` Wolfgang Helbig
2015-12-30  7:29     ` Will Senn [this message]
2015-12-30 18:06       ` Erik E. Fair
2015-12-30 18:33         ` John Cowan
2015-12-31  8:06       ` Wolfgang Helbig
  -- strict thread matches above, loose matches on Subject: below --
2015-12-31 13:45 Noel Chiappa
2015-12-26 18:34 Will Senn
2015-12-26 19:15 ` Ronald Natalie
2015-12-26 19:26 ` Ronald Natalie
2015-12-26 20:34   ` 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=568387EF.6010407@gmail.com \
    --to=will.senn@gmail.com \
    /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).