Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 29, 2024, 07:32:05 07:32


Login with username, password and session length


Pages: [1]
Print
Author Topic: Bootstrap loader in c?  (Read 3291 times)
0 Members and 1 Guest are viewing this topic.
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« on: February 08, 2007, 04:25:39 16:25 »

Hi!
Has anybody seen a bootstrap loader for x86 in C? There's a discussion wether a first stage bootstrap could be written in any other language but Assembly. Maybe only Award and Microsoft knows...
Logged

Code Warrior
bluex
Junior Member
**
Offline Offline

Posts: 83

Thank You
-Given: 10
-Receive: 39


« Reply #1 on: February 08, 2007, 10:06:39 22:06 »

It's not so difficult to write it in asm ... so what's the problem. The bootstrap do only load the first boot block using bios routines ... and give it the hand. Why try to write it in a high level language since the full bootstrap takes only about 200 line in X86 asm. It's only 1/2hour of work for anybody having good knowlege in asm and PC hardware. And since writing bootstrap is only needed for people with such knowledge ... I think it's not a problem.
Using a compiler is problematic since you have to find a compiler that can deal with 16bit code and 32Bit code, since the PC boots in 16bit mode and the os switch it to 32 bit protected mode!
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #2 on: February 12, 2007, 06:11:51 18:11 »

Yeah, of course You're right. Since I'm interested in finding my own way of writing a file system with different geometry(e.g. flash memory) with a more linear way of addressing, it's interesting to find out wether it's possible to write real low-level C.
All contemporary OS relies on rotating media(floppy, CD-ROM, tape and hard drives)
Logged

Code Warrior
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC