flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Multiboot Header

Author
Thread Post new topic Reply to topic
HujinXerox



Joined: 28 Nov 2005
Posts: 5
Location: Sweden
HujinXerox
if I want to boot a flat binary file how should my multiboot header look?
in fasm of course...

_________________
/Nemo
Post 28 Nov 2005, 20:20
View user's profile Send private message Reply with quote
Nikso



Joined: 20 Oct 2003
Posts: 9
Location: Italy
Nikso
Following documentation at: http://www.gnu.org/software/grub/manual/multiboot/multiboot.html

Multiboot_Magic equ 0x1BADB002
Multiboot_Flags equ 0x10007

align 4
Multiboot:
.Magic DD Multiboot_Magic
.Flags DD Multiboot_Flags
.Checksum DD 0-Multiboot_Magic-Multiboot_Flags
;
.HeaderAddr DD Kernel.Multiboot
.LoadAddr DD <kernel origin address>
.LoadEndAddr DD <kernel end address>
.BSSEndAddr DD 0
.EntryAddr DD <kernel entry point>
;
.ModeType DD 0
.Width DD 0
.Height DD 0
.Depth DD 0

this is a basic version with few flags enabled. refere to the official documentation for full format.

hope this help
Nikso
Post 23 Dec 2005, 17:43
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
HujinXerox



Joined: 28 Nov 2005
Posts: 5
Location: Sweden
HujinXerox
Thanks for the answer got it working Cheers

_________________
/Nemo
Post 16 Jan 2006, 00:38
View user's profile Send private message Reply with quote
HujinXerox



Joined: 28 Nov 2005
Posts: 5
Location: Sweden
HujinXerox
ok this is what i came up with works with fasm and flat binary format:::::

org 0x00100000
use32
Header:
dd 0x1badb002
dd 0x00010003
dd 0-(0x1badb002+0x00010003)
dd Header
dd 0x00100000
dd KernelEnd
dd KernelEnd
dd KernelStart


hope someone finds it usefull.......

_________________
/Nemo
Post 16 Jan 2006, 05:09
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.