[TUHS] Had a crack at assembling the Unix v1 kernel

Noel Chiappa jnc at mercury.lcs.mit.edu
Tue May 5 07:48:19 AEST 2015


    > From: Dave Horsfall <dave at horsfall.org>

    >> In V6, the bootstrap in block 0 prompts for a file name, and when that
    >> is entered, it loads that file into memory and starts it. (It doesn't
    >> have to be in the root directory, IIRC - I'm pretty sure the bootstrap
    >> will accept full path names.)

    > I'm pretty sure that it didn't have the full namei() functionality, so
    > all files had to be in the root directory.

It depends on what you mean by the first "it" above - if you meant 'V6', then
no. From the Distribution V6's /src/mdec/fsboot.s:
		
  / read in path name
  / breaking on '/' into 14 ch names

The process of breaking the name up into segments, and then later finding
each name in the appropriate directory, can be seen. The code is kind of
obscure, but if you look at the RL bootstap I dis-assembled:

  http://ana-3.lcs.mit.edu/~jnc/tech/unix/rlboot.s

it's pretty much the same code, and a little better commented in the 'read
in directories' part.

	Noel



More information about the TUHS mailing list