ah… BootJFS and the process

I’m going to plagiarize from www.osfree.org and modify the text to fit my adventures with BootJFS.

At the end of POST procedure the ROM BIOS initializes devices and gives control to int 19h interrupt routine, which loads 1st sector of the 1st boot device (a floopy, HDD or another). If the device was the HDD, then the Master boot record (MBR) is loaded from the 1st sector. The ROM BIOS loads it at address 07C0:0000. The MBR has a Non-System Bootstrap (NSB) routine in it, and the Partition Table (PT). The NSB code relocates MBR to 07E0:0000, jumps to 07E0:0020 and checks for a Boot Manager partition, and checks for a bootable partition on the first or second disk if present. Next the bootsector of boot HDD partition is loaded at 07C0:0000.

One of the interesting things that happens is the following:

1. Find the top continuous low memory (conventional 640k), number of 1K blocks. On my Bochs drive 639 is returned.

2. Calculate a load segment. The result of #1 – 54h, AND result with FFF0h, and then shifted left 6 bits. This will be the load segment and with the Bochs drive equates to 8800.

3. The bootsector of boot HDD plus an additional 31 sectors are loaded at the address (segment) calculated in #2, approximately 16K.

4. A jump to the segment from #2 offset 199Ch is made.

Now things have and continue to divert from IBM documentation. The code loaded in #3 contains MicroFSD. It loads os2boot and os2ldr using MicroFSD functions, which look like C code. Finally, the structure and registers are setup for entry into os2ldr.

One of my issues is that the structure I am finding does not seem to match documentation:

124A ft_cfiles dw 0
124C ft_ldrseg dw 0
124E ft_ldrlen dd 0
1252 ft_museg dw 0
1254 ft_mulen dd 0
1258 ft_mfsseg dw 0
125A ft_mfslen dd 0
125E ft_ripseg dw 0
1260 ft_riplen dw 0
1262 db 0
1263 db 0

; microFSD vector table
12641264 ft_muOpen_OFF dw 0
1266 ft_muOpen_SEG dw 0
1268 ft_muRead_OFF dw 0
126A ft_muRead_SEG dw 0
126C ft_muClose_OFF dw 0
126E ft_muClose_SEG dw 0
1270 ft_muTerminate_OFF dw 0
1272 ft_muTerminate_SEG dw 0

Notice 1262h and 1263h, I do not know what they are used for…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.