Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

ASSEMBLY AND BOOT LOADERS AND SHIT

Name: shit 2011-05-10 6:12

k, so my program needs to boot a hard disk. how the fuck do i do that.
isn't it enough that i read the boot sector to 07c00h, set dl, and jmp there? doesn't seem to work. shit

Name: Anonymous 2011-05-10 6:19

What are you trying to do? Make the next generation LoseThos OS?

Name: Anonymous 2011-05-10 6:26

that i read the boot sector to 07c00h,
That's the BIOS work.
and jmp there?
Nope, you're just looping.

Name: Anonymous 2011-05-10 6:34

>>3
what are you talking about

Name: Anonymous 2011-05-10 7:07

why the fuck aren't you following the multiboot standard

Name: Anonymous 2011-05-10 7:16

>>5
BECAUSE I DON'T FUCKING WANT TO, DYAMIND?

Name: Anonymous 2011-05-10 7:22

>>6
cretin

Name: Anonymous 2011-05-10 7:25

>>7
Now that's just rude is what that is.

Name: Anonymous 2011-05-10 7:26

>>4
The BIOS loads your code to 0000:7c00 (or 7c00:0000 in some BIOSes)
It starts from there.
You jmp to the start.
You are looping.

Name: shit 2011-05-10 7:30

>>8 GOD DAMN IT I'M SO FUCKING TIRED OF THIS BOARD COULD YOU GET TO THE POINT AND HELP ME INSTEAD OF BICKERING OVER POINTLESS SHIT AAAAAAAAAAAAAAAAAAAAAAAAA

Name: Anonymous 2011-05-10 7:35

>>10
Ok, I'll answer.
isn't it enough that i read the boot sector to 07c00h, set dl, and jmp there?
No.
how the fuck do i do that.
See >>9.

Now get out.

Name: Anonymous 2011-05-10 7:38

>>9
oh, that's not how i meant. i guess i should have explained it better.
so, i've got a program on a 1.44 floppy. it boots up and does some shit, but then i want it to load another operating system from another disk, as if it was loaded by the bios. as far as i know, all the bios does after the post is load the boot sector, set dl to the disk number, and transfer control to the program, but when i do that it doesn't seem to work. what else do i need to do? halp

Name: VIPPER 2011-05-10 10:38

halp
NOPE!

Name: Anonymous 2011-05-10 14:50

>>13
Go fuck an autistic nigger.

Name: Anonymous 2011-05-10 18:21

k shit

Name: Anonymous 2011-05-10 18:25

Name: Anonymous 2011-05-10 22:10

MORE LIKE
JMP FFFF:FFF0 AND GTFO
AMIRITE LOLLLLLLLLLLLLLLLLLLLLLLLZzz!!11oNE!!1ONE1!

Name: Anonymous 2011-05-11 8:24

>>16
yes, exactly, that's exactly what i want.

now how do i do it

Name: Anonymous 2011-05-11 8:42

>>18
http://wiki.osdev.org/Bootloader#Booting_multiple_OSes
The easiest way to boot another OS is a mechanism called chainloading. Windows stores something akin to a second-stage bootloader in the boot sector of the partition it was installed in. When installing Linux, writing e.g. LILO or GRUB to the partition boot sector instead of the MBR is also an option. Now, the thing your MBR bootsector can do is to relocate itself (copying from 0x0000:0x7c00 to, traditionally, 0x0060:0x0000), parse the partition table, display some kind of menu and let the user chose which partition to boot from. Then, your (relocated) MBR bootsector would load that partition boot sector to 0x0000:0x7c00, and jump there. The partition boot sector would be none the wiser that there already was a bootsector loaded before, and could actually load yet another bootsector - which is why it's called chainloading.


Thirteen seconds on google.

Name: Anonymous 2011-05-13 7:12

>>19
Perhaps i should have explained the problem with my code, the boot loader loads just fine, but it fails to load the kernel for some reason. I kept getting unexplicable errors, turns out i forgot to reset the ivt for some irq's. Don't know why that should matter, since it shouldn't be generating any irq's anyway. Well, i fixed it now. Thank you all.

Don't change these.
Name: Email:
Entire Thread Thread List