public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jody" <jbruchon@nc.rr.com>
To: Linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: Future of ELKS
Date: Fri, 21 May 2004 14:38:59 -0400	[thread overview]
Message-ID: <00a901c43f62$e18bb1b0$0101a8c0@vash> (raw)
In-Reply-To: 200405211730.45239.dg@cowlark.com

*snip*

> On Friday 21 May 2004 15:15, Jody wrote:
> [...]
> > The 8086/88's biggest limitation has to be the segmented memory model
to
> > retain compatibility with some old CPU (8085?) and these compatibility
> > efforts have hindered Intel CPUs for a long time...
>
> Segmentation is also what makes ELKS work at all on the 8086. It acts as
a
> poor-man's MMU. Without segmentation, you wouldn't be able to have
> relocatable processes; you wouldn't be able to do any kind of swapping or
> move code around at run time.
>
> (Remember that a 64/64 process is using 16-bit points for everything. It
never
> touches its segment registers. If you copy the process onto disk, reload
it
> elsewhere, restore its registers but make sure that the segment registers
> point to its new location in memory, it'll never even notice.)
>
> Yes, we *could* use some kind of larger memory model with bigger
pointers, but
> I wouldn't recommend it. Using multiple segments makes stuff far more
> complicated --- particularly as ints and pointers will now be different
sizes
> --- and any 8086 program that needs more than 128kB is probably too big
> anyway.

Disclaimer:  I don't know a ton about low-level 8086 programming, only
pieces, please correct me if I am wrong as it will benefit myself as well
as the community.

I was trying to hint that we should try to use less than 64KB per process
in another unquoted snippet...I don't know everything about 8086's but I do
know that there are PLENTY of operating systems from the past that have
done "a lot of stuff" in what we now see as a miniscule space.  I've seen a
program in less than 256 bytes (1 page in 6502 memory space) of 6502 asm
that would do a dual-algorithm decompression of the data it was attached
to.  I myself wrote an RLE decompressor to be attached to a BASIC program
that took up 110 bytes of code and about six bytes of data.  It's not
8086-related per se, but it does show that it can very well be done.  Also,
remember that good old DOS ran on PCs with 256KB of RAM or *less*
sometimes, and still did a lot of useful things.  Eventually, even when DOS
was rewritten in C (MS-DOS 3.0?) it STILL ran on ancient and "modern"
configurations.

Anyone who thinks we should eat one or two entire segments for a program
like cp, mv, rm, mkdir, or kill, is in my opinion self-limiting to the
segmentation of the architecture.  Please "think outside the box" on this.
If we write a good memory manager and programs honor the allocations of
that memory manager, there is no reason we can't break processes down into
smaller pages.  A relocatable executable format rather than dependency on
segments to do everything for us would probably help.

> If you think 128kB of RAM is too small to do anything useful, I strongly
urge
> you to go out and look into CP/M. Your average CP/M system had about 60kB
> free for user applications, shared between code and data. 8080 and Z80
code
> is significantly more verbose than 8086 code. But look at all those
> applications...

I certainly believe that 128KB is more than enough for a lot of things, and
that we're so used to inherent code bloat in both Linux and Windows that we
don't remember the "old ways" of coding sometimes...it's all about
squeezing that last 64 bytes, no?
What can I do in 64 bytes?  With my favorite CPU (6502) I can write a
routine that'll clear the entire contents of the C64's 320x200x1-bit screen
so it can be used for something, like a GUI.  I can write something that
will act as a supplementary buffer for my serial port.  I can store a small
icon (say a 2-bit color 16x16 icon for a CGA screen) for my simple
GUI...why use 64KB per process when we're already so limited and you don't
need all that?  Simplified versions of stuff like cp and mv could take only
a few kilobytes at most if written strategically.

I'm too lazy to type more, please respond to my comments ASAP so hopefully
I get them before work.  Everyone take care, and good hacking!

Jody


  parent reply	other threads:[~2004-05-21 18:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 20:55 Future of ELKS Miguel Bolanos
2004-05-20  3:39 ` I'm in Void
2004-05-20 14:47   ` Miguel Bolanos
2004-05-20 11:42 ` Javier Sedano
2004-05-20 15:15   ` Miguel Bolanos
2004-05-20 15:37     ` Eduardo Pereira Habkost
2004-05-20 16:06       ` Andrey Romanenko
2004-05-21  5:51         ` Dan Olson
2004-05-20 17:30       ` Javier Sedano
2004-05-21  8:32         ` Gábor Lénárt
2004-05-21 14:15           ` Jody
2004-05-24  9:29             ` Gábor Lénárt
2004-05-24 18:20               ` Alan Cox
2004-05-20 23:43       ` David Given
2004-05-21  1:04         ` Stefan de Konink
2004-05-21  3:39           ` Chad Page
2004-05-29 16:58             ` Gregg C Levine
2004-05-21  5:55         ` Dan Olson
2004-05-21  6:08         ` Jody
2004-05-21 13:24         ` Eduardo Pereira Habkost
2004-05-21 16:30           ` David Given
2004-05-21 16:59             ` Michael McConnell
2004-05-22 12:12               ` David Given
2004-05-22 17:29                 ` Chad Page
2004-05-21 18:38             ` Jody [this message]
2004-05-22  8:53               ` jb1
2004-05-22 17:00                 ` Chad Page
2004-05-24  9:42               ` Gábor Lénárt
2004-05-20 16:54     ` Javier Sedano
2004-05-21  5:50     ` Dan Olson
2004-05-21  9:08       ` Arnaldo Carvalho de Melo
2004-05-21 10:24         ` Alan Cox
2004-05-24 12:20         ` Gábor Lénárt
  -- strict thread matches above, loose matches on Subject: below --
2004-05-20 13:40 Pat Gilliland
2004-05-21 17:53 ` Miguel Bolanos
2004-05-20 20:18 Tommy McCabe
2004-05-24 13:17 BODRATO Stefano

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='00a901c43f62$e18bb1b0$0101a8c0@vash' \
    --to=jbruchon@nc.rr.com \
    --cc=linux-8086@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