Address error quietly fixed on 680x0 systems

Bob Larson blarson at skat.usc.edu
Sun Jan 29 08:22:51 AEST 1989


[note re-directed folloups, this isn't a C issue.]

In article <302 at puivax.UUCP> ian at puivax.UUCP (Ian Wilson) writes:
>A piece of code I inherited recently contained the fragment:
>	*((INT_16 *) charbuf_p) = x; charbuf_p += sizeof(INT_16);
>where charbuf_p had no alignment restrictions enforced, including
>no restriction on being an odd address. To my surprise, this turns
>out to work on 680x0 systems, both Sun3 and a vanilla Mac.

The 680n0, with n>=2 does handle this by doing multiple bus cycles.
Thus, the Sun3 (68020) would not need any trap handler to run this
non-portable code.

-- 
Bob Larson	Arpa: Blarson at Ecla.Usc.Edu	blarson at skat.usc.edu
Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson
Prime mailing list:	info-prime-request%ais1 at ecla.usc.edu
			oberon!ais1!info-prime-request



More information about the Comp.lang.c mailing list