Page 2 of 2
Re: Boot Loader Don't Boot
Posted: Sat Aug 29, 2009 2:02 pm
by ehenkes
I'm learning Assembly and i'm trying to develop my own boot loader for my OS that is only a test to build something big ...
Programming bootloaders is not easy. Hence, you should use GRUB (an easy way) or look at some existing bootloaders. I have adapted the two stages of
http://www.brokenthorn.com to my own OS:
http://www.henkessoft.de/OS_Dev/OS_Dev3 ... ocId119944
http://www.henkessoft.de/OS_Dev/OS_Dev3 ... ocId575832
Re: Boot Loader Don't Boot
Posted: Sun Aug 30, 2009 9:43 pm
by kop99
Think of famous people like Bill Gates et al. (MS DOS, MS Windows), Linus Torvalds (Linux), Andrew Tanenbaum (Minix <== famous).
Does Bill Gates develop MS Windows?????

Re: Boot Loader Don't Boot
Posted: Mon Aug 31, 2009 3:04 pm
by PatrickV
Nathan wrote:
Code: Select all
> DEBUG os-test.asm
-w 100 0 0 1
-q
What i'm doing wrong?
Here is the problem. The bootloader is surpose to be on the first sector or something pointing 2 it. what you have written is -w 100 0 0 1 which is not the first sector. The first sector is address at -w 0 0 0 1. That might of been the proble which your booloader doesn't work
Patrick
Re: Boot Loader Don't Boot
Posted: Mon Aug 31, 2009 4:52 pm
by neon
Hello,
Here is the problem. The bootloader is surpose to be on the first sector or something pointing 2 it. what you have written is -w 100 0 0 1 which is not the first sector. The first sector is address at -w 0 0 0 1. That might of been the proble which your booloader doesn't work
w 100 0 0 1 is fine. Debug loads the program binary to offset 0x100 (typical of COM programs).
w 100 0 0 1 tells debug to copy a sector from 0x100 (where the loaded file is) into disk 0 (floppy disk) sector 1 (bootsector).
Probably the bigger problem is that he has debug load
os-test.asm as the "assembled" bootsector.
Re: Boot Loader Don't Boot
Posted: Tue Sep 01, 2009 8:34 am
by quanganht
Nathan wrote:And here is the process to that i use to write in the floppy:
Code: Select all
> DEBUG os-test.asm
-w 100 0 0 1
-q
What i'm doing wrong?
I nearly had to shout: "OMFG! WTF ?". Can't you guys see an serious mistake here?
He
have to compile that os-test.asm to something like os-test.bin and then
Code: Select all
> DEBUG os-test.bin
-w 100 0 0 1
-q
EDIT: Oh I forgot, and he
must compile it to binary format (NASM default anyway)
Re: Boot Loader Don't Boot
Posted: Sun Sep 06, 2009 6:27 pm
by PatrickV
Another thing that cause this if you don't write it correctly which i found out can be a problem. I personly copy the cmd program and put it in the code directory. When you write the code to the disk you should have something like this:
C:\CodeDir>
C:\CodeDir> DEBUG os-test.asm
-w 100 0 0 1
-q
You must have the cmd program inside the CodeDir or pointing to that which if don't do so my bootloaders or code won't be written to disk. Try that if it works problem solve if not, i don't know.
Re: Boot Loader Don't Boot
Posted: Sun Sep 06, 2009 9:18 pm
by Troy Martin
What the crap does having CMD.EXE in his directory have to do with that? He tried to write his unassembled source file to the bootsector, no more, no less.