Newsgroups: comp.os.minix
Subject: Re: OS Development Resources?
References: <377231C6.5756F3A@infinet.com>
Organization: Syracuse University, Syracuse
From: mcconnel@hydra.syr.edu (Terry R. McConnell)
NNTP-Posting-Host: hydra.syr.edu
Message-ID: <37724d80.0@news.syr.edu>
Date: 24 Jun 1999 11:23:44 -0500
X-Trace: 24 Jun 1999 11:23:44 -0500, hydra.syr.edu
Lines: 35
Path: star.cs.vu.nl!newsfeed2.nl.uu.net!sun4nl!remarQ-easT!supernews.com!remarQ.com!news.maxwell.syr.edu!news.syr.edu!hydra.syr.edu!mcconnel
Xref: star.cs.vu.nl comp.os.minix:35895

In article <377231C6.5756F3A@infinet.com>,
Don DeHoff  <isdept@infinet.com> wrote:
>
>I'm trying to learn how OSs work, and I'm having a hard time finding
>good information.  I'm hoping to find simple examples of how to write a
>boot loader, a boot loader installer, and a simple kernel, even if the
>kernel does nothing but print a message on the screen.  Any help is
>appreciated.
>
[...]
>3.  Discussion of a SIMPLE kernel, even if it just prints "Hello World"
>

Just a couple of thoughts on this: Such a program would have to compiled
and assembled in a special way. You'd need the entry point at the very
beginning of the program file, which means either assembling with the
code segment first, or putting a jump to the actual entry point at the
beginning. All I/O would have to be done using BIOS calls -- so you can't
link in any library functions like printf that are implemented using OS
services. The program would also need to set up its own stack, if a stack 
is needed.

You would need to write your program file to sector 1 (not sector 0) of the 
filesystem you want to boot. For example, you might use dd (or equivalent
DOS program) to write your program file to a floppy, and then do boot fd0
from a minix monitor. After your program runs (if it does :-), you'll need
the reset button. 

It's a good exercise. 

-- 
************************************************************************
Terry R. McConnell   Mathematics/304B Carnegie/Syracuse, N.Y. 13244-1150
trmcconn@syr.edu                            http://barnyard.syr.edu/~tmc 
************************************************************************
