
	So XFDBOOT must load MS-DOS kernel (IO.SYS), DOS-C kernel or any
other Free DOS kernel. I assume that unmodified IO.SYS and MSDOS.SYS files are
disposed at the same places where MS-DOS utility SYS.COM put them. XFDBOOT
utility MKBOOT.EXE only replace original MS-DOS boot sector with own boot
sector. We can't load IPL.SYS without any modifications because it assumes
that complete kernel image is loaded at 2000h:0, not at 70h:0. We must add
loader leading sector before original DOS-C kernel image which place it at
correct address. You may do it by following way:

         copy/b  krnlhead.sys+ipl.sys  a:\xipl.sys

Now even fragmented XIPL.SYS will be loaded. Other kernels also must contain
special loader leading sector. You may include unique code for concrete kernel
to KRNLOAD.INC. Current demo version of KRNLOAD.INC is destined for loading
DOS-C v. 0.90 kernel IPL.SYS.

More about KRNLHEAD.ASM. This is source code of KRNLHEAD.SYS - loader leading
sector. This sector will be loaded at 70h:0. Code contained in this sector
ask BIOS for size of conventional memory and put kernel image sector map to
the top of it. Sector map will be generated during kernel FAT-chain scanning,
so kernel file may be fragmented. Any entry of kernel map contain CX and DX
values for int 13h Read Sector call. Then code fragment between labels
LOADER_BEG and LOADER_END (upper loader) will be moved just before kernel map,
stack will be switched to last memory segment and control will be passed to
upper loader.

BUGS: Currently XFDBOOT Boot Sector code does not redefine Floppy Drive
      Parameter Table, and can load kernel only from standard (unerstandable
      by BIOS) diskette.

Next versions: Now operator must remember exact names of all kernels on disk.
In following version of XBOOT I'll try to show him root directory files ;-).

------------------------------------------------------------------------------
                                                              APPENDIX A

                 ==  MS-DOS Bootstrap Time Memory Map  ==

0000:0000       Ŀ  Interrupt Vector Table
                                      
                                      
                                      
     0400       Ĵ  BIOS Data
     0500       Ĵ  Directory window
                                      
     0700       Ĵ  First 3 sectors of IO.SYS
                                      
                                      
                                      
                                      
                                      
     0D00       

  ... ... ... ... ... ... ... ... ... ... ... ... ... ...

                                        ^ Bootstrap Stack ^
     7C00       Ĵ  Boot sector
                                      
     7E00       55AA

 IO.SYS entry point: 70h:0
		     Startup Data:
                     [SP]   - far pointer to Int 1e (FD Parameter Table)
                              interrupt table entry
                     [SP+4] - Int 1e vector old value (also far pointer :)
                     CH     - Media Descriptor
                     DL     - Physical Drive
                     AX:BX  - Data Start Sector (usually IO.SYS begins here)
                              counting from the begining of physical drive
                     DS:SI  - ???
 Directory window at 0:500h must contain IO.SYS/MSDOS.SYS entries as first
 two entries
------------------------------------------------------------------------------
                                                              APPENDIX B

            ==  FD alt. kernel Bootstrap Time Memory Map  ==

0000:0000       Ŀ  Interrupt Vector Table
                                      
                                      
                                      
     0400       Ĵ  BIOS Data
     0500       Ĵ  Directory window
                                      
     0700       Ĵ  *First* "leading" sector of
                                        kernel
                ----------------------
                                       (First 3 sectors of IO.SYS)
                                      
                                      
     0D00       

  ... ... ... ... ... ... ... ... ... ... ... ... ... ...

                                        ^ Bootstrap Stack ^
     7C00       Ĵ  Boot sector
                                      
     7E00       55AAĴ  XBoot Dialogue Routines
                 XB                   
     8000       

  ... ... ... ... ... ... ... ... ... ... ... ... ... ...
XXXX:0000       Ŀ  Last 64 k segment (usually at 9000h)
  ... ... ... ... ... ... ... ... ... ... ... ... ... ...
                                      
                                      
                                      
                                      
                                      
                                      
                                          Upper loader stack 
                Ĵ  ^                    ^
                Ĵ  "Upper" loader (very small:)
XXXX:FFF0         Kernel sector map (created by loader)

 Loader entry point: 70h:0
		     Startup Data: coincide with IO.SYS startup data.
 Upper loader must to prepare all registers and data after loading kernel
 image (and maybe to do all fixups) and then jump to kernel entry point.
------------------------------------------------------------------------------
Some features of 1.10 version.

Most changes caused by trying to make loader compatible with Windows'95
IO.SYS kernel.

Now XFDBOOT (and FDAK - for now unpublished, but wait a little) use
following registers:

   ;
   ;	Kernel Initialization.
   ;       Expected register values:
   ;
   ;  DL    : Boot physical drive
   ;  AX:BX : Long number of hidden sectors
   ;  CH    : Media descriptor of Boot drive
   ;  CS    : Kernel Segment
 * ;  SI    : 1st memory pragraph for DOS management or -1
 * ;  DI    : Memory boundary - 1st non-DOS paragraph
 > ;  DI    : Starting kernel cluster
   ;  CL    : EXE-version DOS Flag        (for traditional bootstrap 0)
 > ;  BP    : Pointer to Boot Sector
   ;

Removed register usage lines marked by '*', and new lines marked by '>'
signs. SI and DI registers were reserved in fact for ROM versions, but
(as you can see) such scheme conflicts with Windows'95 one.

Now XFDBOOT use BP, which points to Boot Sector, exactly before Boot Sector
is situated reserved sectors before booted partition dword, and then follows
area for stack. During kernel startup interrupt vector of int 1e and address
of it (i.e. 0:78h) are pushed to stack. DI contains starting cluster of
kernel:

                       0:7c00  [BP]
                       0:7bfe  [BP-2]  == AX
                       0:7bfc  [BP-4]  == BX
                       Int 1e vector
                       Int 1e vector addr
------------------------------------------------------------------------------
