Jump to content

View more

Image of the Day

New ninja for my game.
#screenshotsaturday #gamedev #indiedev #IndieDevHour
https://t.co/sJdnPuiVgh
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Basic operating system development

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
20 replies to this topic

#21 Bregma   Members   

8935
Like
2Likes
Like

Posted 20 September 2012 - 07:22 PM

What do you mean by a "basic API"? Syscalls to support libc, for example?

i mean like a basic graphical library, like curses or allegro. Should of clarified that.

And i am not planning a "GUI" as such, more of a command line interface, a la DOS or the (as far as i know) the original Unix.

Well, Unix preceded DOS by a couple of decades, and yes DOS did kind of copy the idea of a simple kernel API and a command-line shell from it, because it was a good design.

The way an OS like Unix or DOS works is that they have a simple basic API that userspace makes calls into the kernel to perform I/O and process control. Sitting on top of that is generally a set of more portable language bindings; on Unix that's a C library (often called "libc") but there was no such thing on the original DOS and you had to make kernel calls using interrupts from your higher-level language.

I would recommend you go with the Unix way: there are a number of small libc implementations (eg. newlib, ulibc) in which you just have to provide some 5 or 6 basic kernel API calls and the rest just appears. You can then build a cross-development GCC toolchain using that runtime and start building an entire POSIX system, including the classic Unix shell. All the heavy lifting is already done, all you have to do is write the kernel.

It's just that easy.

Edited by Bregma, 20 September 2012 - 07:24 PM.

Stephen M. Webb
Professional Free Software Developer




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.