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!)


Home
Boot Sectors
FAT32X
Utility Programs
Site Map

Boot Sectors

Windows NT 4.0 Boot Record

This boot record boots Windows NT 4.0 from a FAT12 or FAT16 partition. This boot record is located in the first sector of a physical primary DOS partition on a hard disk drive. Technically, this boot sector is designed to load the NTLDR program, which in turn will boot Windows NT or another operating system.

WNTPBR.ZIP

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

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

WNTPBR.ASM

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

MAKEFILE.BAT

This batch file assembles, links, and extracts the boot code. WNTPBR.ASM is assembled with MASM version 6.11d into WNTPBR.OBJ, WNTPBR.OBJ is linked with LINK version 5.31 into into WNTPBR.EXE, WNTPBR.EXE is extracted by BOOTEXE into WNTPBR.BIN.

VERCODE.BAT

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.

There was one oddity with this code. At 7D60, there was a JNB instruction using a 16-bit offset instead of an 8-bit offset. None of the assemblers I used would assemble this correctly from the source code - they all did an 8 bit jump. I suppose there's a way to force it? Anyway, I just added a couple of NOP's to align the code. The VERCODE script gives these known differences:
D:\PC\BOOTSEC\WINNT>vercode

bootsect - read/write/etc master/partition boot record

Reading master boot record from drive 0
Reading partition boot record from drive 0 partition 0
Reading verify record from 'wntpbr.bin'
Comparing records
0160  disk=0F  file=73
0161  disk=83  file=07
0162  disk=05  file=90
0163  disk=00  file=90

WNTRAW.BAT, WNTRAW.CMD

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

WNTPBR.ASM

Click on the heading to view the file.

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]