USBboot   2013 Feb 12


The USBboot system is designed to make it easy to make any USB disk drive bootable.


This allows you to run your choice of operating system on your computer, from a USB drive.


Program execution is in Real Mode on an 80x86 PC, 80386 32 bit or higher is required.


Download  :


USBboot2013Feb12release.exe  self extracting zip file or


Disclaimer : using USBboot.exe to make a USB drive bootable should not affect the other files on the drive.

Use it at your own risk, and backup up everything on your drive, or use a brand new one, just in case…


Go to the directory where you unzipped the files and follow the instructions in the readme.txt file, or below :


How To

1.      Double-click * on USBboot.exe , insert a USB drive to be made bootable, press Q and Y .

2.      Copy the file kernel.img onto the USB drive using Windows or DOS.

3.      Restart the computer – it will now boot from the program kernel.img on the USB drive.


The computer’s BIOS must be configured to boot from a USB drive – please see

or Google for how to do this.


* Note : for Windows 7 you must right-click on USBboot.exe and select “Run as administrator”  to allow access to the USB drive.


The USBboot system consists of three files :

1.      USBboot.exe     a Windows program to read and write USB disk drives

2.      FAT32ldr.img      a binary image of a FAT32 bootloader program

3.      kernel.img          a binary image of a “Hello World” test program

If a computer is powered up with a bootable USB drive connected, and if the computer’s BIOS has been configured to allow booting from a USB drive, the bootloader program (FAT32ldr.img) on the USB drive will be run.

The supplied bootloader program FAT32ldr.img will then run the file kernel.img from the USB drive.

The supplied demonstration program kernel.img will display a “Hello World” string and sequence of characters, but it can be replaced by any program that is designed to be run on a PC, simply by copying the new file to the USB drive using Windows or DOS .

Press any key when running kernel.img  to step through the display sequence.



USBboot.exe waits for a USB disk drive to be inserted, analyses its contents, and gives the option to copy the file FAT32ldr.img to the USB drive’s boot sector.


USBboot.exe is a Windows program compiled using SwiftForth from .


The following files are used to create USBboot.exe :

1.       USBboot.f                                         main load file

2.       CapturedMBRsectors.f                                      some real MBR sectors, used to name your MBR

3.       DirectoryDisplay.f                           defines the FAT32 directory structure

4.       LogToFile.f                                                           saves screen output to a file

5.       md5.f                                                                    the MD5 hash calculation, used to describe binary files

6.       NumName.f                                                         displays and MD5 hash as an English word-pair

7.       ReadFileFAT32.f                              defines how to read a file in a FAT32 file system

8.       NumName.f also uses NumName.txt for the list of English words.

To recompile USBboot.exe run SwiftForth, change to the USBboot directory and type

Include USBboot



FAT32ldr.img is a FAT32 file system boot loader program.


FAT32ldr.img is an assembler program compiled using NASM from


The batch file go.bat will run nasm.exe ( provided ) and assemble FAT32ldr.nasm to create FAT32ldr.img .

It also copies the new FAT32ldr.img up one directory level to USBboot, for use by USBboot.exe .

Open a Windows command window ( run cmd.exe ), change directory to USBboot\FAT32ldr and type


FAT32ldr.img scans the FAT32 file system on the USB drive that it is on, for the file kernel.img and if found, copies it into memory at 0x10000 and executes it.




Kernel.img is a demonstration program for an 80x86 based PC.

It must run from segment 0x1000 offset 0x0000 ( address 0x10000 ) in memory in Real Mode.


Kernel.img is an assembler program compiled using NASM from


The batch file go.bat will run nasm.exe ( provided ) and assemble Kernel.nasm to create Kernel.img .

It also copies the new Kernel.img up one directory level to USBboot.

The user must copy the file Kernel.img to the USB drive using Windows or DOS.

Open a Windows command window ( run cmd.exe ), change directory to USBboot\kernel and type


Kernel.img displays a version string, “Hello World” text then a sequence of 36 K characters. This is to test that a second cluster is loaded into memory ( clusters are no more than 32K bytes ).

If you see many z’s , “The End” and a smiley face, the entire system has worked correctly.


USBboot is designed to allow colorForth or another operating system to be run from a USB drive.



Howerd Oakford