Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!spool.mu.edu!snorkelwacker.mit.edu!stanford.edu!neon.Stanford.EDU!kaufman From: kaufman@neon.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Can I count on any alignment from NewHandle or NewPtr? Message-ID: <1991Mar21.042326.947@neon.Stanford.EDU> Date: 21 Mar 91 04:23:26 GMT References: <23706@well.sf.ca.us> <1991Mar20.231935.27113@eng.umd.edu> <50569@apple.Apple.COM> Organization: Computer Science Department, Stanford University, Ca , USA Lines: 16 In article <50569@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes: >In reply to the general discussion on heap block and stack alignment: >Since we know that both heap blocks and elements on the stack are at least >word-aligned on every Macintosh, then perhaps it's best to just assume that >alignment for all Macs (whether 68000 or '020,'030) so that one's software >is compatible with all Macs. Unless one knows one is runing on an '020 or >'030. I presume the original question was to determine if it was legal to use longword moves, beginning at the origin of the block. From the responses, the answer is YES, in all cases. The 68000 can do a longword move from any word (16-bit) aligned address. [so can the 68020, but it takes two cycles, so that is not very efficient]. Marc Kaufman (kaufman@Neon.stanford.edu)