Jump to content

  • Log In with Google      Sign In   
  • Create Account


Basic operating system development


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   Crossbones+   -  Reputation: 4848

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

Sponsor:



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.



PARTNERS