What C compilers have non-zero null pointers?

Clarke Thacher thacher at unx.sas.com
Fri Jul 20 09:10:38 AEST 1990


Actually the Prime 50 series has both types of pointers.
The older (PL1) style of pointer uses segment 7777 (octal) in their
NULL pointers (there can never be a segment 7777), dereferencing
this type of pointer would raise a NULL_POINTER condition.  
The newer C compiler uses a pointer with a segment of 0 and an 
offset of 0.  This pointer is still not bit equal to an integer 0
there are two extra bits (for the ring number) that may or may not
be set.  To solve this, Prime added a TCNP (test c null pointer) 
instruction to the instruction set.  They also added a bunch of other
instructions for the C compiler (mostly having to do with character
operations).

Clarke Thacher        PRIMOS Host developer          SAS Institute, Inc.
sasrer at unx.sas.com    (919) 677-8000 x7703          Box 8000, Cary, NC 27512
-- 
Clarke Thacher        PRIMOS Host developer          SAS Institute, Inc.
sasrer at unx.sas.com    (919) 677-8000 x7703          Box 8000, Cary, NC 27512



More information about the Comp.lang.c mailing list