[fpc-pascal](no subject)

Marco van de Voort marcov at stack.nl
Sun Dec 3 12:35:29 CET 2000


> So in 32 bit architecture a pointer is only a 32 bit offset, isn't it?
> Adressed from 0 to XXXX Bytes...

A pointer INSIDE the application, and only if all selectors are the 
same ((cs?=)ds=es=ss)

If ds<>ss then

type xx=^char;		{32-bit pointer}

var s : char;
	y : xx;

begin
  y:=@s;
end.

For outside the application you need 48-bit pointers (not in the 
language, all 48-bit access should go through the OS)

> But how does the OS and the CPU handle the "protected" memory blocks? In 16
> bit with selectors, the selectors were a value to an table that stored data
> of the blocks, how they were protected, if its a code segment or a data
> segment, etc. etc.
> how is this done in 32 bit?

Same, only the protection is more definite, and there are some more 
attributes.


Marco van de Voort (MarcoV at Stack.nl or marco at freepascal.org)






More information about the fpc-pascal mailing list