From mboxrd@z Thu Jan 1 00:00:00 1970 From: random832@fastmail.us (random832@fastmail.us) Date: Mon, 27 Oct 2014 09:40:36 -0400 Subject: [TUHS] speaking of early C compilers In-Reply-To: <5BDD9EB6-4F00-4C28-BC7F-4A264996A625@ronnatalie.com> References: <0F0B9BFC06289346B88512B91E55670D2F86@EXCHANGE> <255EF9E2-2BA3-4928-8664-7C7B08FB48D4@coraid.com> <5BDD9EB6-4F00-4C28-BC7F-4A264996A625@ronnatalie.com> Message-ID: <1414417236.2834739.183752501.006CD61F@webmail.messagingengine.com> 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?