R.O.M.E.68000 Home
Prev. Table of Cont. Help Cont. of This Ch.

This is the R.O.M.E.68000 Manual version 0.51.
This is an experimental version.
Copyright © 1997 by G. Mezzetti; last update: January 1, 1999.


4. Registers

Besides the traditional ones, the 68000 has many other addressing modes, some of which are rather complicated and involve up to three components (a base address, an index and a displacement) in the computation of the effective address. Something needs to be done to compress all the information required by these complex modes into the 16 bits reserved for the address field of each operand; for instance, displacements are limited to 8 bits, but of course this is not enough. In order to exploit more effectively the width of the 68000's machine word, the concept of register page is introduced; this is similar to the ``zero page'' of some processors, but is adapted to the context of relative addressing. Programmers may reserve an area of up to 16 locations in the memory array, called precisely the register page, to hold number-type data that are frequently accessed. Within the code of each instruction, 16 bits can be used to address (directly or indirectly, but always, of course, with relative addressing) the base of the register page, which can thus lie anywhere in the memory array (because 16 bits can reach any location of the core); then, only 4 bits are needed in the address field of each operand to identify a particular location (a particular ``register'') among the others. In principle, different instructions can have different register pages, and also addressed in different modes (one directly, one indirectly), but you'll find that there is no need of this added generality (and complication!). The assembler will let you define, if you wish, a base for the register page that will be used in all instructions.

As I have said, the register page can be addressed in two modes; the first one, called fixed registers mode, corresponds to direct addressing of the base of the register page, while the second, called movable registers mode, corresponds to indirect addressing of the base of the register page (see Chapter II).


Prev. Table of Cont. Help Cont. of This Ch.

Gustavo MEZZETTI  /  mezzetti@math.unipd.it