Deutsch   English   Français   Italiano  
<ve58vq$2igvr$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.arch
Subject: Re: 80286 protected mode
Date: Wed, 9 Oct 2024 08:48:26 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <ve58vq$2igvr$1@dont-email.me>
References: <2024Oct6.150415@mips.complang.tuwien.ac.at>
 <memo.20241006163428.19028W@jgd.cix.co.uk>
 <2024Oct7.093314@mips.complang.tuwien.ac.at>
 <7c8e5c75ce0f1e7c95ec3ae4bdbc9249@www.novabbs.org>
 <ve2inb$23gqs$1@dont-email.me>
 <8a762db010cecdc24bf7631b8f39b839@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 09 Oct 2024 08:48:27 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4ad84ebeba927b1850d052c9a649762c";
	logging-data="2704379"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19euvbWBANk0KKbeyWksWbIE+3lXPgP/7M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:/18AeDxpV+CxYRG110CzJEsLcqE=
Content-Language: en-GB
In-Reply-To: <8a762db010cecdc24bf7631b8f39b839@www.novabbs.org>
Bytes: 2535

On 08/10/2024 22:53, MitchAlsup1 wrote:
> On Tue, 8 Oct 2024 6:16:12 +0000, Lawrence D'Oliveiro wrote:
> 
>> On Mon, 7 Oct 2024 23:13:25 +0000, MitchAlsup1 wrote:
>>
>>> Is protected mode not "how Pascal" thinks of memory and objects in
>>> memory ??
>>
>> How is that different from C?
> 
> In pascal you cannot subtract pointers to different objects,
> in C you can.

No, you can't - unless the pointers are of compatible types, and each 
points to a sub-object within the same encompassing object.  So if you 
have two pointers that point within the same array, you can subtract 
them.  If they point to different objects, trying to subtract them is 
undefined behaviour.

> 
>>> Whereas by the time 286 got out, everybody was wanting flat memory ala
>>> C.
>>
>> When did they not want that?
> 
> The Algol family of block structure gave the illusion that flat
> was less necessary and it could all be done with lexical address-
> ing and block scoping rules.
> 
> Then malloc() and mmap() came along.

malloc() does not need a flat memory space.  C does not need a flat 
memory space.  Indeed, people use C all the time on systems where memory 
is disjoint.