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

BOOTEXE

Extract Boot Code

Download

BOOTEXE.ZIP or BOOTEXE.EXE

Description

This program extracts the raw boot code from a COM file.

Help

C:>bootexe -?

BOOTEXE (01.01, 03/15/98) - Extract boot sector from .EXE, write to .BIN

usage: BOOTEXE [-L (SIZE)] [(INPUTFILE)] [(OUTPUTFILE)]

BOOTEXE (01.01, 03/15/98)

BOOTEXE extracts the boot code from a EXE file.

-L (SIZE) specifies the size in bytes of the file.
  If not specified, the size defaults to 8000h (32768) bytes.
  (The standard size for a 512 byte boot record at 7C00h)

(INPUTFILE) defaults to BOOT.EXE
  The EXE file must be (SIZE) bytes long.
  The EXE file must be zeros from 0020h to 7DFFh.
  The EXE file must only contain code in 7E00h to 7FFFh.
  The EXE file must be zeros from 8000h to (SIZE).

(OUTPUTFILE) defaults to (INPUTFILE).BIN
  The BIN file will be 200h (512) bytes long.

Sample Execution

C:>BOOTEXE newboot.com newboot.bin

Functionality

Parse parameters. Open (INPUT) file. Check (INPUT) filesize, must be (SIZE) bytes. Check (INPUT), bytes 0020h..7DFFh, must be 00. Read (INPUT), bytes 7E00h to 7FFFh, save in buffer. Check (INPUT), butes 8000h to (SIZE), must be 00. Close (INPUT) file. Open (OUTPUT) file. Write buffered bytes into (OUTPUT). Close (OUTPUT) file.

Notes

I was originally extracting code from a .COM file. Once the boot code was assembled and linked into a COM file, I had to get it out into a separate 512 byte file so that BOOTSECT could use it. This required an extra step in some cases to convert an EXE to COM (EXE2BIN), so this program was written to extract the boot code directly from am EXE file.
Lance Costanzo, [email protected]