Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!usc!rutgers!mcnc!rti!mozart!thacher From: thacher@unx.sas.com (Clarke Thacher) Newsgroups: comp.lang.c Subject: Re: What C compilers have non-zero null pointers? Message-ID: <1990Jul19.231038.19372@unx.sas.com> Date: 19 Jul 90 23:10:38 GMT References: <422@minya.UUCP> <1990Jul10.141208.24902@uunet!unhd> <13520@softg.uucp> Organization: SAS Institute Inc. Lines: 17 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@unx.sas.com (919) 677-8000 x7703 Box 8000, Cary, NC 27512 -- Clarke Thacher PRIMOS Host developer SAS Institute, Inc. sasrer@unx.sas.com (919) 677-8000 x7703 Box 8000, Cary, NC 27512