i was asked to create my own boot disk that would just display my name in the screen. I was told that i am not allowed to use the files from microsoft and that i should create all the files.

I've read some articles on the net and most of them just tells me to either copy a code or use an already defined boot program while some of them just adds to my confusion. Im trying hard but im really new to this and I really need help.

questions:
-How does the computer know that a bootdisk is in the drive to be loaded?
-What files are required to run in a boot disk?
-What do i need to initialize or define?

all help will be appreciated. thanks.

> How does the computer know that a bootdisk is in the drive to be loaded?
You go into the BIOS, and you tell it which devices ( Eg. A: C: ) to attempt to load boot information from. The first one with a valid boot record boots the machine.

The rest is explained here.
http://www.nondot.org/~sabre/os/articles

ORG 0

            jmp 07C0h:start     ; Goto segment 07C0

    MsgLoad     db "Hello from me",0

    start:
            ; Update the segment registers
            mov ax, cs
            mov ds, ax
            mov es, ax

            mov si, MsgLoad              ; display load message
            call putstr

    hang:                       ; Hang!
            jmp hang

putstr:     ; SI = address of string to display
            lodsb
            or al,al
            jz short putstrd
            mov ah,0x0E
            mov bx,0x0007
            int 0x10
            jmp putstr

putstrd:    retn 

    times 510-($-$$) db 0
    dw 0AA55h

from what ive read ive come up with this code...
unfortunately it doesnt work..

comments? suggestions? am i too far off? help me please...

and btw, i compiled it with nasm

thanks

well , I'm using somwhat new computer with a intel main bord . I got the problem when I write it to the boot disk , the message not displayed . I really does not know why , but I wrote a program to wait until I press a key , using the BIOS calls . That works , means that some calls are do not supports on the new machines , really new machines I think !

The solve to this problem is make a disk image file ( *.img) file and run it under a emulator , like qemu . I really using the qemu to do the experiments with these boot sector programming . there are more advantages when you using a emulator to do boot sector experiments .
1. you do not needs to reboot your computer every time you test the program
2. you will get off the fear that inside in your mind ( if this damage my computer hardware !)
3. you will be find some debugging information rahter than the death screen of death .
4. you don't need to administrator priviledges to do these experiments under a emulator
5. You may really limited to the x86 , why bother that ! without buying hardware you can download the different hardware ( i mean a emulator for Atmel ,ARM, apple like also ) , without spending money you can do experments .).Think how much you will cost if you really buying physical computer only for learn boot sector programming on that machine ?

beacuse of these reasons , I suggest you to do your boot sector experiments with a emulator , for x86 or x64 you can download qemu free ! If you google it and cannot find where to download qemu please ask again ,
and again I saying you I strongly recommand to you use a emulator first and let your mind to be smater ! ( even I not comes to that level ) , and then comes to play with the real hardware . But after that you will find that there is no difference between running it on a emulator or a real hardware ! ,

This article has been dead for over six months. Start a new discussion instead.