MBR,C++ and system booting

S

shahoo

Hi there everyone .I have a problem:
I want to run my C/C++ program on a PC with no operating system.I mean
a boot programm written in C/C++.How should I do that ?
 
T

TB

shahoo skrev:
Hi there everyone .I have a problem:
I want to run my C/C++ program on a PC with no operating system.I mean
a boot programm written in C/C++.How should I do that ?

Read the documentation for the system. Intel has complete free huge pdf
volumes on their site which covers all steps during booting and beyond.
 
B

Bob Hairgrove

Hi there everyone .I have a problem:
I want to run my C/C++ program on a PC with no operating system.I mean
a boot programm written in C/C++.How should I do that ?

There is no such language: C/C++.
There is C, and there is C++.

The open source Linux operating system would be a good place to look
to see how this can be done for a PC (i.e. for PC's with an Intel x86
CPU). Most of Linux is written in C (not C++). However, there is also
a lot of code which is necessarily written in assembler because at
boot time, you have no way of executing any C runtime functions or
otherwise interfacing with the hardware.

http://www.linux.org
 
S

shahoo

Hi
First, thanks for your help.
And by C/C++ I mean both languages C and C++ because of their
similarity.
 
B

Ben Pope

shahoo said:
Hi
First, thanks for your help.
And by C/C++ I mean both languages C and C++ because of their
similarity.

That's usually a bad thing, due to their dissimilarities.

Ben Pope
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top