comp.lang.ada
 help / color / mirror / Atom feed
From: nickroberts@ukf.net (Nick Roberts)
Subject: Re: Ada's Slide To Oblivion ...
Date: Fri, 08 Feb 2002 13:08:43 GMT
Date: 2002-02-08T13:08:43+00:00	[thread overview]
Message-ID: <3c63c7a5.398689067@news.cis.dfn.de> (raw)
In-Reply-To: 7vlme4w4ax.fsf@vlinux.voxelvision.no

On Fri, 08 Feb 2002 12:23:48 GMT, Ole-Hjalmar Kristensen
<oleh@vlinux.voxelvision.no> wrote:

>Ian Wild <ian@cfmu.eurocontrol.be> writes:
>
>> David Brown wrote:
>> On, say, a high end PDP-11, or a 68000, or an 8086 (but not its
>> progeny!), code space and data space are physically separate.  There
>> are wires that come out of the processor to say which space to use.  On
>> such a system there's NO WAY to write to code space, and it's not
>> impossible that
>
>??? This is pure fantasy. How do you think the code got into the code
>space in the first place? 

It is not fantasy, but I think factually slightly imperfect.

As far as I recall, neither the 8086 nor the 8088 (nor any of their
progeny) ever had this kind of control signal. I'm not sure, but I don't
think the 68000 did either (and certainly didn't need it, since it had
24-bit physical addressing at the outset). I don't actually know about the
PDPs.

However, I do know that the Zilog Z8002 processor (a typical 16-bit
processor of the 1980s) did indeed have such control signals, which could
be used by onboard circuitry to physically separate instruction space from
data space (and indeed stack space from heap space).

Some configurations merely overlapped them, sticking with the traditional
64KB; others used this as a way of getting 128KB or 192KB address space, at
the expense of much more complex extra decoding logic.

To answer the question:

>How do you think the code got into the code
>space in the first place?

The circuitry also distinguished between normal (user) mode and privileged
(supervisor) mode. It was necessary for a buffer to be provided which
allowed the supervisor (operating system) to gain access to all the
different address spaces, precisely so as to be able to load program code
(and static data) and to prime other spaces.

>> On
>> such a system there's NO WAY to write to code space, and it's not
>> impossible that

It is necessary for processors that do have separate program space to
provide a way for user programs to access data in that space, since static
data associated with the program will also reside there. The Z8000
processors actually had a 'relative address' mode which provided just this
capability, and the capability it provided included writing as well as
reading; however the aforementioned control signals also distinguished
between reads and writes, and so the control circuitry could (and sometimes
did) prevent writing into code space in normal mode.

So it would be better to say that on some targets it would be impossible
(for a user program) to write into code space, but on other targets it
would be possible to do so. (Even considering just targets which have the
differentiation between program space and data space.)

-- 
Nick Roberts



  parent reply	other threads:[~2002-02-08 13:08 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30 23:09 Ada's Slide To Oblivion Volkert
2002-01-30 23:57 ` Marin David Condic
2002-01-31  3:04   ` Richard Riehle
2002-01-31  3:05     ` Eric Merritt
2002-01-31 16:26       ` Richard Riehle
2002-01-31 16:41         ` Larry Kilgallen
2002-02-02 15:51           ` Zach Swanson
2002-02-02 19:18             ` Richard Riehle
2002-02-04  4:43         ` Richard Riehle
2002-01-31 14:37     ` Marin David Condic
2002-01-31 15:14   ` Ted Dennison
2002-01-31 17:16     ` Marin David Condic
2002-01-31 18:32       ` Steve O'Neill
2002-01-31 18:27     ` Warren W. Gay VE3WWG
2002-01-31 19:22       ` Marin David Condic
2002-01-31 20:40       ` Christopher A. Bohn
2002-01-31 21:08         ` Marin David Condic
2002-02-01 14:22           ` [off-topic - to lighten the air] Wes Groleau
2002-02-01  2:31         ` Ada's Slide To Oblivion Richard Riehle
2002-02-04 16:51           ` Jerry Petrey
2002-02-04 17:49             ` Richard Riehle
2002-02-04 18:24               ` Marin David Condic
2002-02-05  9:04                 ` DPH
2002-02-05 14:46                   ` Marin David Condic
2002-02-05 16:37                 ` Wes Groleau
2002-02-05 17:22                   ` Marin David Condic
2002-02-05 18:42                   ` Preben Randhol
2002-02-06 21:37                     ` Warren W. Gay VE3WWG
2002-02-07 11:30                       ` Georg Bauhaus
2002-02-05 13:48               ` Georg Bauhaus
2002-02-06  7:07             ` Anders Wirzenius
2002-02-01  2:26       ` Richard Riehle
2002-02-01 14:27         ` A. Nonny Mouse
2002-02-01 17:18         ` Dale Pontius
2002-02-06  2:37           ` Nick Roberts
2002-02-06  7:31             ` Ole-Hjalmar Kristensen
2002-02-06 21:27               ` Nick Roberts
2002-02-06 22:03                 ` Ian S. Nelson
2002-02-07  1:44                 ` Philip Cummins
2002-02-07 13:56                 ` Ian Wild
2002-02-07 17:25                   ` Ray Blaak
2002-02-07 19:20                     ` Hyman Rosen
2002-02-07 21:36                       ` David Brown
2002-02-08 10:36                         ` Ian Wild
2002-02-08 12:23                           ` Ole-Hjalmar Kristensen
2002-02-08 12:51                             ` Ian Wild
2002-02-08 14:28                               ` Marin David Condic
2002-02-08 15:52                               ` Ole-Hjalmar Kristensen
2002-02-08 13:08                             ` Nick Roberts [this message]
2002-02-08 21:28                               ` Matthew Woodcraft
2002-02-08 21:45                               ` Nick Roberts
2002-02-08 22:44                                 ` Darren New
2002-02-09  0:39                           ` David Brown
2002-02-18  3:54                 ` David Thompson
2002-02-06 14:59             ` Ian S. Nelson
2002-01-31 18:28     ` Warren W. Gay VE3WWG
2002-01-31  2:37 ` Jim Rogers
2002-01-31 15:02   ` Marin David Condic
2002-01-31 18:28     ` Steve O'Neill
2002-01-31 19:41       ` Larry Kilgallen
2002-01-31 19:53         ` martin.m.dowie
2002-01-31 20:06         ` Marin David Condic
2002-01-31 21:06         ` Steve O'Neill
2002-01-31 22:28           ` Marin David Condic
2002-01-31 19:42       ` Marin David Condic
2002-01-31 18:41     ` Warren W. Gay VE3WWG
2002-01-31 19:52       ` Marin David Condic
2002-02-01 18:31         ` Warren W. Gay VE3WWG
2002-02-01 12:28     ` David Gillon
2002-02-01 21:02       ` Marin David Condic
2002-02-02  4:05         ` Adrian Hoe
2002-02-02 12:51           ` Jeffrey Creem
2002-02-04 15:58           ` Marin David Condic
2002-02-02  4:02       ` Adrian Hoe
2002-02-02 17:35         ` tmoran
2002-02-01  1:42 ` Randy Brukardt
2002-02-01 16:56   ` Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
2002-02-06  7:02 Christoph Grein
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox