Page 1 of 1

Help! Bootloaders 1

Posted: Tue Feb 24, 2009 6:27 am
by Roland
please help!

I assemble my bootloader.

Code: Select all


org		0x7c00				; We are loaded by BIOS at 0x7C00

bits	16					; We are still in 16 bit Real Mode

Start:

	cli					; Clear all Interrupts
	hlt					; halt the system
	
times 510 - ($-$$) db 0				; We have to be 512 bytes. Clear the rest of the bytes with 0

dw 0xAA55					; Boot Signiture
then i compile it with my MakeIt.bat

@echo off
nasm -f bin Boot1.asm -o Boot1.bin
pause

then open VFD, create a virtual floppy and its now on my computer, called 5 1/4 floppy(B).

then i do the partcopy and i think thats fine

@echo off
partcopy boot1.bin 0 200 -f1
pause

then i load up bochs and load these settings below.
then it says must end at 0xffffff and i just go cont
then it crashes saying the drive is not ready... but VFD is open and i copied the bin onto the floppy so i dont know what to do. Help please!


# ROM and VGA BIOS images ---------------------------------------------

romimage: file=BIOS-bochs-latest, address=0xf0000
vgaromimage: file=VGABIOS-lgpl-latest

# boot from floppy using our disk image -------------------------------

floppya: 1_44=a:, status=inserted # Boot from drive A

# logging and reporting -----------------------------------------------

log: OSDev.log # All errors and info logs will output to OSDev.log
error: action=report
info: action=report

Posted: Tue Feb 24, 2009 4:20 pm
by Mike
Hello,

Remove address=0xf0000 from the romimage line in your bochs configuration file so that it looks like this:

Code: Select all

romimage: file=BIOS-bochs-latest
Please try it with this new configuration and let us know what happens.

Posted: Tue Feb 24, 2009 7:50 pm
by Roland
Hey, its working now! getting rid of the address thing stopped the panic. Then i realised floppya: 1_44=a
had to = b since i was using floppy B.
thanks for help and fast reply,
roland

Edit: In bootloaders 3, when i assemble it, it says Error: Program origin already defined, then gives the line which goes to org 0x1000 since there is already an org 0x7c00 at the start. What's wrong?

Posted: Wed Feb 25, 2009 4:09 pm
by Andyhhp
NASM only lets you have a single ORG declaration per file.

you will need to remove the 2nd and adjust any addresses that rely on it.

~Andrew