Jump to content

Making my source code bootable

- - - - -

  • Please log in to reply
8 replies to this topic

#1
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Yo folks. I was just reading the history of Linux(cause I'm switching to it and I like to know what I use), and it said something about MINIX - an OS with 12,000 lines of code written in C and Assembly. Then that idea hit me like a lightning - who needs game programming when you can create operating systems from scratch?!

So... Is there a way I can make HelloWorld.C bootable?

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
  • Location:New York, NY
Read Operating Systems Design and Implementation (3rd Edition) by Andrew S. Tanenbaum and Expanded Main Page - OSDev Wiki

#3
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
I'll try it after school, thanks.

#4
artificial

artificial

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 624 posts

AdvMutant said:

So... Is there a way I can make HelloWorld.C bootable?

You cannot boot a "normal" Hello-Word-program. The problem is that your PC doesn't know commands like printf() or cout. You have to write your own printf() by using the BIOS interrupts.

Take a look at these links if you're interested in OS development:
BrokenThorn Entertainment - Operating System Development Series
OSDev Wiki

Greets,
artificial
Sometimes words ain't enough to express something. That's why computer scientists use double words.

#5
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Oh my god.
Is it that hard?

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#6
artificial

artificial

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 624 posts

AdvMutant said:

Oh my god.
Is it that hard?

It's not hard... it's just more difficult than writing an ordinary Hello-World-program.
Sometimes words ain't enough to express something. That's why computer scientists use double words.

#7
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Haha... I'll probably learn Assembler after C and I'll see what I can get.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#8
artificial

artificial

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 624 posts
Don't worry. I couldn't program a bootable application too when I was 13. ;)
Sometimes words ain't enough to express something. That's why computer scientists use double words.

#9
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
:)
I'll bookmark these links for later.

Posted Image
There is no problem that cannot be solved by the use of high explosives.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users