Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Compiling a boot program
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 30th March 20:52
steffen hierl
External User
 
Posts: 1
Default Compiling a boot program


Hi,

I would like to write a short c program displaying the text "hello" on
the screen when booted. Suppose I had a program making no use of any
library functions but addressing the processor itself:

a) How do I compile this program with gcc (I am using mingw for
windows)? If I compile without any flags the program is about 25000
bytes large. I suppose there is some "header" required by windows. How
do I get rid of this header?

b) How do I write the program on the boot sector of a floppy?

Thanks, Steffen.
  Reply With Quote


  sponsored links


2 31st March 00:48
kyle.tk
External User
 
Posts: 1
Default Compiling a boot program


Here you go: http://www.mega-tokyo.com/osfaq2/index.php/BabyStep
  Reply With Quote
3 31st March 04:58
segin
External User
 
Posts: 1
Default Compiling a boot program


don't even try using windows for doingthis, you'll never stop hating
yourself, cause Windows makes for a bad build enviroment.
  Reply With Quote
4 1st April 09:44
bill marcum
External User
 
Posts: 1
Default Compiling a boot program


On 2 Feb 2006 07:34:48 -0800, Steffen Hierl


To write a boot sector you don't use gcc, you use assembler in 16-bit
mode. To put text on the screen use int 10h. See Ralf Brown's
Interrupt List. Look at the minix boot sector code, /usr/src/boot/*.s.


--
I'm QUIETLY reading the latest issue of "BOWLING WORLD" while my wife
and two children stand QUIETLY BY ...
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666