CompuServe Messages

GURU TABLES

    05-Mar-95 14:18:01
Sb: #45984-GURU TABLES
Fm: Jim Butterfield 73624,14
To: Syndesis 76004,1763
Right, John. The 68000 assumes that if you go for a word, you want it in one chunk; and that means the address must be EVEN so that the two bytes can be accessed in one dip from memory. The 68020 and up will work if you give an odd address, but it will slow the operation, since two memory dips (and a little bit-juggling) are called for; eventually, the sixteen bits (or 32 if you're doing longword) starting from the specified odd address will be delivered. So you won't get a GURU #3 from a 68020 and up. However, due to the loss of speed, it's a heckuva good idea to try to code your word (and longer) accesses to work on even boundaries. Might even be an idea, where practical, to run a test phase with a 68000 just to check that's so. By the time you get into 32-bit memory architecture, some programmers are anxious to make sure that longword accesses are always made with addresses that divide evenly by 4 (quad boundaries? don't know the term for sure). This sounds like a straightforward objective, but there's a curve they have to watch for if they are serious: they have to try to make sure that the stack pointer, too, notches along in multiples of four so that you don't lose extra clock cycles with interrupts, subroutine calls, and whatever. If you're not a CCC (clock cycle counter), you can ignore most of this. But it doesn't hurt to be sure word/doubleword values are indeed on even boundaries. It will work better on the 68000, and you'll get faster operation on other machines. –Jim