Steffen hierl 2007-03-30 20:52:17
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?
Kyle.tk 2007-03-31 00:48:51
Here you go: http://www.mega-tokyo.com/osfaq2/index.php/BabyStep
Segin 2007-03-31 04:58:55
don’t even try using windows for doingthis, you’ll never stop hating
yourself, cause Windows makes for a bad build enviroment.
Bill marcum 2007-04-01 09:44:33
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 …