开发者

questions about writing an operating system [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve this question

I have some very specific questions about writing operating systems that I was hoping could get answered:

  1. How much assembly code would I need to write to load a minimal C Kernel if I use GRUB as a boot loader?

  2. My kernel will be written in C, It will load a command line shell that I wrote in C++, it does not make any API calls only standard library calls, will I need to rewrite the entire C++ Standard library to do so?

  3. Can I write video, keyboard and floppy drivers in C++?

  4. Do GCC and G++ output 16 bit real m开发者_开发百科ode code?

  5. Can I write this all using Mingw on Windows or will I have to write it on Linux?

  6. Do I need to be in real mode in order to write directly to the video memory?

If anyone can answer my questions I will be very thankful


1: You should only need a small amount of assembly to handle the boot process and load the C code. Shouldn't be more than like 20-30 lines I think.

2-4: I haven't really used C++ with OS dev, but I think I remember reading that it takes more work to get it running somewhere. Sorry I can't be of more help.

5: You "can" do it using MinGW, but from my experience it mostly complicates things. I could never really get a Windows environment working, but I also gave up without too much effort.

EDIT: Here is a link to some example assembly. This is all I ever had to use: http://www.jamesmolloy.co.uk/tutorial_html/2.-Genesis.html

The rest of that site is a pretty good tutorial too if you are at all interested in that kind of thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜