[LispM-Hackers] load band help

Dave Richards dave@synergy.org
Tue, 5 Mar 2002 09:16:58 -0800


Ah...  Recognition sets in.  The load band is really nothing more than a
memory dump!

The key is to use the system-communication-area (SCA) which is location at
byte offset 0x800 (word offset 0x100) to boot-strap.  The magic 2k+9 is
really obtained by:

	Go to SCA offset 0.  This is the address of the area origin table.  The
10th element is the address of the DPMT (encoed as a fix).  In fact, this
area-origin table provides us 99% of what is needed to get rolling.  It
points to our page table (absolutely necessary if there are non-identity
mapped pages, which the comments indicate that there are).

I think the basic bootstrap process should go something like:

	1. Read the first page.
	2. Inside the SCA within the first page is the number of words to read.
	3. Read up to the max number of words into memory.  (Now we have all the
memory filled that is necessary).
	4. Initialize pointers to the DPMT, the page table, etc. from the
area-origin table.
	5. Find our starting address (I don't know how to do this yet).

Also, it looks like the constant words 0x06000000 and 0x06000005 correspond
to NIL and T respectively.  Those probably will need to be emulator
constants, since I do not see any indirection that would tell us this, shy
of actually comparing symbol names (as strings), which might be elegant but
probably doesn't add much value.

I will start a document when I get home tonight,
unlambda.com/~dave/load-band.html which lays all of this out.  I think
everything makes sense up to finding that first instruction, which I have
not figured out how to do yet.

	Dave