volatile: a summary

Wayne A. Christopher faustus at ic.Berkeley.EDU
Tue Jun 21 09:15:27 AEST 1988


Here is a (stupid) program that proves you cannot always infer volatility:

main() {
	int *device_address, i;

	printf("Please input \"0x4f0\", the address of the t-o-d register\n");

	scanf("%x", (int *) &i);
	device_address = (int *) i;

	while (*device_address < 43200)	/* noon */
		;
}

	Wayne



More information about the Comp.lang.c mailing list