It was thus said that the Great Jim Brain once stated:
Tony Duell wrote:
I wasn't aware that this was a requirement of C, or any other language.
If someone deferenced (void*)0, most systems like to return something
(or preferably, trap the access and throw an exception). If you deref
NULL, I think many implementations return 0.
It really depends upon the implementation. Under MS-DOS, it would return
whatever was in location DS:0, or if dereferenced as a far pointer, 0:0,
would give you the address of the Divide-by-0 exception routine. On the
68000, it would give you the initial stack pointer upon reset. Modern
systems with memory protection usually mark location 0 as protected and no
allow read/write access. I think the default action on VMS (or maybe the
Unix varients on the VAX) allowed one to read from location 0, which always
returned 0.
No it
doesn't, given that a PDP11 address to a program is always 16 bits.
The 18 or 22 bit phuysicall addresses were created by the MMU.
Did an MMU exist for the 8086?
If such a think existed, it would have been an external circuit, and would
have been very hard to support since the 8086 did not include support for
restartable instructions (same situation on the 68000).
-spc (Well ... a paged-type memory protection would have been difficult on
the 8086. A segmented virtual protection system might have been
easier to support)