Making A Bootable Floppy Disk (or, Making A Floppy Disk Bootable): Writing your own bootable floppy disk code will make you appreciate how handy operating systems are to have. You won't be able to use any interrupt functions, so you'll have to make your own. (DOS is, after all, little more than a collection of interrupts to make programming easier.) Actually, you can use interrupts which are supplied by the BIOS (as several are), but you can't use any of the standard INTs which are supplied by DOS. If there is a floppy disk in the drive and the BIOS is set to boot from the floppy drive first, it will boot from the floppy drive if there is anything on the first sector of the floppy. The "Invalid system disk or disk error" message is NOT produced by the BIOS; The BIOS cannot tell if a disk is a system disk or not. In fact, when this message appears, the BIOS really has already booted from the floppy disk, and the reason the message appears is that the disk itself contains code on the first sector that will make the computer display this message. (DOS automatically puts this code on the first sector of every floppy disk it formats.) To make your own bootable floppy, all you have to do is insert some code on the first sector of the disk. This will be normal machine code similar to a compiled assembly language program. In fact, you can write your boot code in assembler and then use the compiled .COM code on the boot sector. Just remember not to use INTs supplied by DOS. Also, one interesting fact to keep in mind when writing boot code: A disk's boot code is loaded into memory location 0000:7C00 before it is run. This means that normal assembler code, which is usually assembled assuming a code offset of 100h (the normal offset for a .COM file) will get messed up unless it is assembled with a code offset of 7C00. To illustrate a simple assembler program to use on a boot sector, here's a short booter program to display an error message and then halt the system: ;(Program begins here)---------------------------------- PUSH CS POP DS ;These two lines make DS the current code segment MOV CX,4Ah ;Number of characters to print is 74, or 4Ah MOV SI,7C15h ;Offset of message looper: LODSB ;Get DS:SI into AL MOV AH,0Eh ;Print character and advance cursor INT 10h DEC CX CMP CX,0 JNE looper JMP $ ;Enter infinite loop which halts system ;The message contains a 0D and 0A (CR/LF) to make a new line on the screen. message db 'Welcome to this disk.', 0Dh, 0Ah, 'This is not meant to be a boot disk. System halted.' ;(Program ends here)------------------------------------ This program, once compiled, is *almost* like a normal .COM program under DOS, except for the use of 7C15h for the offset of the message data. Since the message is 15h bytes from the start of the program, normally SI would be set to 115h. (This is what would be compiled into the .COM file if you used the command "MOV SI,OFFSET message" instead of "MOV SI,7C15h".) Since this code is loaded into memory offset 7C00, we must manually specify the location of 7C15. Otherwise, this is a typical assembler program; You can put the resulting .COM file onto the boot sector of a floppy and boot off that floppy; This will display the error message and halt the system. Congratulations! You've made your own bootable floppy disk.