Compile to run on computer without windows

Let's say I want to write a hello world program that runs on a machine without a operacional system. What I have to know about?
I don't expect you guys to teach me this but at least say some things I must learn to do this, and what I would need.
It's like I want to program something that runs directly, like an OS.


Thanks!
closed account (o3hC5Di1)
The most direct way would be to use assembly language, which allows you to provide direct instructions to the CPU.

Hopefully one of the experts around here can give you a more in depth answer.

To get you started, this article, and many pages linked on it, should give you an idea:
http://en.wikipedia.org/wiki/Machine_code

Hope that helps.

All the best,
NwN
But can I compile C++ to assembly? How could I do to 'install' this like an OS or just run it, I don't know... Like booting it
Let's say I want to write a hello world program that runs on a machine without a operacional system. What I have to know about?

If you're going to write it in C++ (or in C), you have to know about "freestanding environment" which is how C and C++ describe the environment without an operating system. That's how bootloaders and kernels are compiled, for example.
Either way, you would need to pick up on some of OS development concepts, start at: http://wiki.osdev.org
Topic archived. No new replies allowed.