Ink Blot welcomes you to Lance's Web Site!

I've decided to resurrect my web site on a limited basis; mainly to discuss FAT32X, but also to test a new site build process. LC

(best viewed at 800x600 full screen!)

Boot Sectors
Utility Programs
Site Map

Boot Sectors

Master Boot Record, Extended Read

This is the master boot record loaded by the BIOS on powerup/reset/reboot. This boot record is located in the first physical sector of the disk drive (i.e. cylinder 0, head 0, sector 1).

This MBR appeared with Windows 95B, and is only used if the BIOS is using the Int 13 extensions for a disk drive. If a FAT32X or FAT16X partition is detected, it will use the Int 13 extensions to read the disk, otherwise it will use standard CHS addressing to read the disk. If the partition is FAT32 or FAT32X, it will attempt to boot from the backup PBR if the primary PBR fails.

This MBR contains a very questionable coding practice - self modifying code. Since there appears to be enough free space in the boot record to make the logic clearer, I really wonder why anybody would resort to such measures.


This is a ZIP archive that contains the master boot record source code and some batch files to construct the boot record.

This contents of this ZIP archive are:
  • MBRX.ASM - Master boot record source code (see below)
  • MAKEFILE.BAT - Batch file to assemble/link/extract
  • VERCODE.BAT - Batch file to verify the code
  • MBRXRAW.BAT - Batch file to extract and dasm the boot code using DEBUG
  • MBRXRAW.CMD - DEBUG commands used by MBRRAW.BAT


This source file can be assembled, linked, extracted, and written to your hard drive as real working boot code. Click on the heading to view the source code.


This batch file assembles, links, and extracts the boot code. MBRX.ASM is assembled with MASM version 5.10 into MBRX.OBJ. MBRX.OBJ is linked with LINK version 5.31 into MBRX.EXE. MBRX.EXE is processed by the BOOTEXE utility to extract the boot record into MBR.BIN.


This batch file verifies the new boot code with what's in the actual boot record, or what's in a file. Customize to your preference. Note that not all assemblers work the same - some add slack bytes (nop's), other's don't.


This batch file uses DEBUG to disassemble the raw boot code. The DEBUG commands are in the file MBRXRAW.CMD. The DEBUG output is then processed by the DBLFIX utility to clean it up.

Utility Programs

Utility programs used by this archive are: You can get more info on these utilities and others by following the above links.

See Also

Lance Costanzo, [email protected]