Path: utzoo!attcan!uunet!decwrl!ucbvax!agate!linus!linus!gwr From: gwr@linus.mitre.org (Gordon W. Ross) Newsgroups: comp.os.minix Subject: Re: Shoelace, Boot sector, Partition sector Summary: See IBM DOS 3.3 Tech. Ref. Message-ID: <124439@linus.mitre.org> Date: 25 Oct 90 18:45:32 GMT References: <34243@nigel.ee.udel.edu> <3275@bruce.cs.monash.OZ.AU> Reply-To: gwr@linus.mitre.org (Gordon W. Ross) Organization: The MITRE Corporation, Bedford, MA. Lines: 39 In article <3275@bruce.cs.monash.OZ.AU> of comp.os.minix, cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes: > When I wrote the code, I got the information for this part by > disassembling the partition table code from a TI machine running > Dos < 3.3. Does anyone know if the parameter passing protocol for > the partition boot is written down somewhere? Yes. See the "IBM DOS 3.3 Technical Reference" manual, page 9-9. Among other details, it specifies: "When a partition's boot record is given control, it is passed its partition table entry address in the DS:SI registers." There is no mention of any other registers being initialized by the primary boot program. (In article <34243@nigel.ee.udel.edu>, Michael Temari mentioned that bootlace expected "the drive in register dl" to be passed too.) The partition table is laid out to make it easy to load the cx and dx registers for the BIOS call to read the secondary boot sector. Presumably the Minix assembler code should look like this: mov ax,#0x0201 | BIOS read 1 sector mov bx,#0x7c00 | transfer address mov cx,2(si) | cylinder/sector mov dx,(si) | drive/head int 0x13 By the way, neither MS-DOS nor UNIX (Sys.V/386) make any use of the address passed in DS:SI but use alternative, less friendly methods to find the active partition. For UNIX, this also means it will refuse to boot unless its partition is marked as active. Probably the author of that boot program couldn't find the above information either! -- Gordon W. Ross (M/S E095) internet: gwr@linus.mitre.org The MITRE Corporation uucp: {decvax|philabs}!linus!gwr Burlington Road office phone: 617-271-3205 Bedford, MA 01730 (U.S.A.)