Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.sys.m68k Subject: Re: cast (char *) to (int *) ? Keywords: 68000 C Message-ID: <21062@grebyn.com> Date: 8 Aug 90 17:49:10 GMT References: <1990Aug7.183302.26585@cbnewsl.att.com> Reply-To: ckp@grebyn.UUCP (Checkpoint Technologies) Organization: Grebyn Timesharing, Vienna, VA, USA Lines: 16 In article <1990Aug7.183302.26585@cbnewsl.att.com> rl@cbnewsl.att.com (roger.h.levy) writes: >casted character pointers to integer pointers in some situations and >then dereferenced the pointer. Although this works OK with a 68008, >it will result in a bus error on our 68000 target if the address of >the data is odd. I could swear that the 68008 also enforced even alignment of word and long data objects; at least that's what my 68000/68008/68010 manual says. (I don't have it handy, or I'd look it up.) If that's truly the case then you can go ahead and run the same code; if it was wrong then it would have caused address-error exceptions on the 68008 too. -- First comes the logo: C H E C K P O I N T T E C H N O L O G I E S / / \\ / / Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o Now for the witty part: I'm pink, therefore, I'm spam! \/