Page 384 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 384

12,4 The 68300 Series                                               361

































                       Table 12.4. Addressing Modes for the 68300 Series

            The addressing modes listed in Table 12.4 can be used with almost all instructions.
        We will note those that are essentially the same as 6812 modes first, and then we will
        examine those that are significantly different.
            Moving a byte, or word, into a 32-bit data register will result in replacing only the
        low byte, or word, in the register, leaving the other bits of the register untouched.
        Moving a word to an address register results in filling the high sixteen bits with the sign
        bit of the word that was moved, and moving a byte to or from an address register is not
        permitted. Immediate addressing can provide 16- or 32-bit operands. (Long) direct
        addressing uses a 32-bit address and can therefore address any word in memory. Pointer,
        postincrement, and predecrement are the same as in the 6812; a postincrement read of a
        word increments the pointer by 2, and a postincrement read of a long word increments the
        pointer by 4. Predecrement works similarly and write works similarly. Your experience
        with the 6812 should facilitate learning these modes.
            The remaining modes consistently use sign extension to expand 8- or 16-bit
        instruction offsets to 32 bits before using them in address calculations. (Short) direct
        addressing is somewhat like direct page addressing, requiring a short 16-bit instruction
        offset; but, using sign extension, it can access locations 0 to $7FFF and $FFFF8000 to
        $FFFFFFFF. Similarly, index addressing uses sign extension, so if AO contains
        $10000000, AO index addressing accesses locations $QFFF8000 to $10007FFFF.
            In Tables 12.5 and 12.6, Dn is any data register; An or Am is an address register;
        Xn is any An or Dn; nnnnnnnn is any 32-bit number; nnnn is any 16-bit number; nn is
        any 8-bit number; and n is a number 0 to 7. rrrr is any 16-bit offset for which PC+rrrr =
        LI; and IT is any 8-bit offset for which PC + rr = LI. Re —SFC, DFC, VBR, or USP—
   379   380   381   382   383   384   385   386   387   388   389