Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!deimos!ksuvax1!kuhub.cc.ukans.edu!dougm From: dougm@kuhub.cc.ukans.edu (Douglas Miller) Newsgroups: comp.sys.ibm.pc Subject: Re: Boot sector of harddisk? Message-ID: <2462@kuhub.cc.ukans.edu> Date: 25 Dec 88 19:19:28 GMT Organization: University of Kansas Academic Computing Services Lines: 20 You are on the right track using INT13h. The sector at Cylinder 0, Head 0, Sector 1 is something you do need to find the boot record you're looking for. Contained in that sector is something called the Partition Table. It begins at offset 1BEh. The BYTE at that location is the Boot Indicator which must be 80h for a bootable partition. The next three (3) BYTES contain the stuff you want, namely the Head, Sector and Cylinder address of the DOS boot record of the first partition. (Incidentally, the other three partition records start at 1CE, 1DE, and 1EE). Anyway, the Head is offset 1BF, the Sector is offset 1C0, and the Cylinder is at 1C1. Cylinder contains the low-order 8 bits of the cylinder number and the sector byte contains the sector address plus the high-order two bits of the cylinder number. This happens (strictly by chance, mind you) to be exactly what the BIOS routine needs in its registers. Thus, only two MOV instructions are needed to set up DX and CX. Have fun, but be VERY VERY SURE that AH has a 2 in it when you do this.