public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: David Given <dg@cowlark.com>
To: linux-8086@vger.kernel.org
Subject: Re: AW: [Fwd: Re: EDE - Personal Suggestions and Ideas]
Date: Wed, 26 May 2004 11:09:41 +0100	[thread overview]
Message-ID: <200405261109.41177.dg@cowlark.com> (raw)
In-Reply-To: <EDECLJGBBDNMPACDPHMCCEKGCCAA.premke@ess-ag.de>

On Wednesday 26 May 2004 07:20, you wrote:
[...]
> What about supporting 286 protected mode in a manner that more than one
> text+data segment per program are possible - still far-pointers were to be
> implmented, but would segment switching not be easier with HW-protection
> (in comparison to 8086)?  I am not familiar with  compiler programming, so
> I have no idea of how much work it would be.
> The last time I looked into the elks sources there was code for
> initializing 286 protected mode - don't know if it works.

The problem with using far pointers is that you end up having to encode 
segment IDs into the pointers themselves, which makes things really painful. 
Particularly, on systems that don't have an MMU, the segment ID controls the 
address of the segment; so on the 8086 and 8088 you won't be able to move 
your application's segments around while the program's running.

(Brief tutorial on segments: the 8086, 8088 and 80286 are *not* 32-bit 
processors. They are 16-bit processors. They can address a total of 64kB of 
memory. However, they have a feature where you can select which 64kB of 
memory you want to use out of a much larger memory region. Each area is 
called a segment, and is referred to by segment ID. The processor can use 
different segments for accessing code, data and stack, so you can put your 
code in a different 64kB area than your data. The 8086 and 8088 have a 
hard-coded MMU where all segments are 64kB long and the physical address of 
each segment is (segmentID * 16); physical memory is 1MB wide. The 286 and 
above have a programmable MMU where you can vary the length and physical 
address of any segment at run time, and physical memory is 16MB wide.)

Also, far pointers are slow and cause bloated and annoying code. One of the 
problems is that now your pointers are 32 bits wide, but your integers are 16 
--- and while this shouldn't affect well-written code, there's a lot of 
badly-written code out there.

I'm of the opinion that a program that won't fit in a 64/64 address space is 
too big to run well on an 8086-class system, anyway.

(Incidentally, I dug out of storage an old laptop of mine: a 386SX/16 with one 
whole megabyte of memory. I installed Minix on it, telling Minix that it was 
a 286, and it runs fine! Recompiled the kernel and everything! It's a bit 
slow, but I wasn't really expecting otherwise.)

-- 
+- David Given --McQ-+ 
|  dg@cowlark.com    | "Two of my imaginary friends reproduced once ...
| (dg@tao-group.com) | with negative results." --- Ben, from a.s.r
+- www.cowlark.com --+ 

  reply	other threads:[~2004-05-26 10:09 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 14:23 [Fwd: Re: EDE - Personal Suggestions and Ideas] Miguel Bolanos
2004-05-25 17:10 ` David Given
2004-05-26  6:20   ` AW: " Mario Premke
2004-05-26 10:09     ` David Given [this message]
2004-05-26 10:30       ` Gábor Lénárt
2004-05-26 11:43         ` AW: " Mario Premke
2004-05-26 11:57           ` Gábor Lénárt
2004-05-26 12:39             ` AW: " Mario Premke
2004-05-26 13:06               ` Gábor Lénárt
2004-05-26 14:17                 ` David Given
2004-05-26 15:10                   ` Gábor Lénárt
2004-05-26 16:00                     ` Andrey Romanenko
2004-05-26 16:49                     ` David Given
2004-05-26 17:19                       ` Eduardo Pereira Habkost
2004-05-27  9:09                         ` Gábor Lénárt
2004-05-26 17:42                       ` Andrey Romanenko
2004-05-26 23:19                         ` David Given
2004-05-27  6:07                           ` EDE - Personal Suggestions and Ideas sandeep
2004-05-27 15:51                             ` Eduardo Pereira Habkost
2004-05-28  8:09                               ` sandeep
2004-05-28  8:10                                 ` Gábor Lénárt
2004-05-28 10:11                                   ` David Given
2004-05-28 11:23                                     ` Andrey Romanenko
2004-05-28 12:14                                       ` David Given
2004-05-29  5:28                                         ` Dan Olson
2004-05-28 10:30                                   ` sandeep
2004-05-26 22:34                       ` AW: [Fwd: Re: EDE - Personal Suggestions and Ideas] Harry Kalogirou
2004-05-27  9:00                       ` Gábor Lénárt
2004-05-27  6:04         ` Dan Olson
2004-05-27  7:14           ` Andrey Romanenko
2004-05-27  9:32             ` David Given
2004-05-27 10:19               ` Gábor Lénárt
2004-05-27 21:07               ` Tommy McCabe
2004-05-28  7:39                 ` Gábor Lénárt
2004-06-01 13:46                 ` Gabucino
2004-06-02  9:03                   ` AW: [Fwd: Re: EDE - Personal Suggestions and Ideas][OT] Javier Sedano
2004-05-26 11:34       ` AW: AW: [Fwd: Re: EDE - Personal Suggestions and Ideas] Mario Premke
2004-05-26 12:09         ` Gábor Lénárt
2004-05-27  5:56     ` Dan Olson
2004-05-26 22:42   ` Harry Kalogirou

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=200405261109.41177.dg@cowlark.com \
    --to=dg@cowlark.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