Motorola M68000 User's Guide Page 88

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 87
74 Assembly Language Programming for the 68000 Family
word. This is similar to the technique used with immediate addressing,
but these words are an address and not the data itself.
The absolute short mode only provides a single extension word to the
instruction. This word has a range of from 0 to FFFF in hexadecimal.
The 68000 takes this word and sign-extends it to 32 bits. This means that
the sign bit is copied into the high-order 16 bits. Therefore the range of
an absolute short address is
0000000016 - 00007FFF16 and
FFFF800016 - FFFFFFFF16
An address between 0000800016 and FFFF7FFF16 does not lie in this range
and can not be accommodated by the absolute short addressing mode.
If you have a smart assembler and are specifying an address in the
short range, the assembler can use this mode and save a word of memory.
Some assemblers always use the long absolute mode. I should mention
that on the majority of systems, even with a smart assembler, absolute
short mode may never be used. This is because you will normally be
specifying addresses by their symbolic names. These addresses are not
really absolute in the sense that they are pinned down to specific memory
locations. Most programming environments use some form of program
relocation. This can be accomplished at the time of linking, or at the
time the program is loaded for execution, or at both times. Therefore,
the assembler cant guarantee that the final address will be in range of
the short addressing mode. Your only chance to use this mode is if you
specify a numeric address explicitly such as
MOVE.L $100,DO
If your assembler is smart, it will use absolute short. One way to find out
is to look at the assembly listing and count the total number of words
generated for that instruction. If there are two, then absolute short was
used.
Address Register Indirect
This is an addressing mode that has not been introduced in earlier
chapters. When we write an assembly language program, we normally
use a symbol to specify the location of data in memory. It is the job of
the assembler to assign memory locations to each of these symbols. The
68000 CPU doesnt operate with symbolic addresses; rather, it requires
the actual memory address. If we somehow had a method of obtaining
Page view 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 255 256

Comments to this Manuals

No comments