From: Rob Landley <landley@trommello.org>
To: samson swanson <intellectcrew@yahoo.com>, linux-kernel@vger.kernel.org
Subject: Re: prog for no OS. language?
Date: Mon, 31 Dec 2001 17:43:48 -0500 [thread overview]
Message-ID: <20020101064531.GXBC23819.femail43.sdc1.sfba.home.com@there> (raw)
In-Reply-To: <20011231075235.66176.qmail@web14309.mail.yahoo.com>
In-Reply-To: <20011231075235.66176.qmail@web14309.mail.yahoo.com>
On Monday 31 December 2001 02:52 am, samson swanson wrote:
> hello,
>
> I had a quick question. Say I want to write a program
> to run without an OS, what language/tools do i need?
The first thing you have to write is a boot sector. On Intel, this will be
written in 16 bit assembler.
> linus (if you read this) what language/means did you
> use to make your terminal emulation program before
> linux?
Linus wrote a book, you know. "Just for fun". Amazon should have it...
Or, if you don't have the patience, you could read this:
http://www.li.org/linuxhistory.php
Basically, if you're writing code without ANY OS behind it, you'll be doing
it in assembler, and in order to use 32 bit assembler, you first have to set
up the page tables and interrupt handlers (and know what the A20 line is for,
although you do NOT have to know why the heck it seems to live on the
keyboard controller...), set up your own scheduler (or pretty much disable
interrupts), and basically re-implement a small operating system in order to
get to the point where you can write in some other language (like C).
Linus did it because he was bored, and a college student. It took him 3
months (summer off from school). Why write a term program you boot into?
Becaue he was using minix as his os, and minix sucks at handling interrupts.
You try doing serial IO (to talk to the school's unix box through a modem)
when your serial port drops characters left and right. (I don't think he
even had a 16550a uart at the time... :)
To see what's involved when Linux boots up, read
http://www.moses.uklinux.net/patches/lki.html
You could also go look at the freedos project...
Just getting to 32 bit mode is a bit of an accomplishment, actually. Booting
modern intel hardware recapitulates phylogeny...
Rob
next prev parent reply other threads:[~2002-01-01 6:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-31 7:52 samson swanson
2001-12-31 9:41 ` brian
2001-12-31 11:17 ` Gábor Lénárt
2001-12-31 15:22 ` M. Edward Borasky
2001-12-31 22:43 ` Rob Landley [this message]
2002-01-03 2:04 Taavo Raykoff
2002-01-03 2:25 ` J.A. Magallon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020101064531.GXBC23819.femail43.sdc1.sfba.home.com@there \
--to=landley@trommello.org \
--cc=intellectcrew@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®