[TUHS] speaking of early C compilers

random832 at fastmail.us random832 at fastmail.us
Mon Oct 27 23:40:36 AEST 2014

On Mon, Oct 27, 2014, at 09:34, Ronald Natalie wrote:
> Yep, the kernel was littered with funky memory constants using ->  to
> point at various registers.   Probably the most ubuiqtous was
> #define PS 0177776
> struct { 
>     int integ;
> };
> yielding the PS->integ access to the Processor Status Register.

Is there any reason this is superior to *(int *)0177776 [and e.g.
#define integ(x) (*(int *)(x))]? Did casting not exist back then?

More information about the TUHS mailing list