|
| ||||
|
|
|
|
|
|
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.
From an abstract point of view, number-type data are integers modulus 65536, that is, elements of the ring of the residual classes of integers modulus 65536; using this ring-theoretic characterization, there are well-defined operations to add, subtract and multiply two number-type data, and also to change sign to a single number-type datum. On the other hand, division and arithmetic comparison cannot be defined in this way, because the ring of integers modulus 65536 is neither a field (65536 is far from being prime!) nor an ordered ring. For this reason it is more convenient to regard a number-type datum as an integer between 0 and 65535; arithmetic operations are then performed on this data as if they were unsigned integers, and the result is subsequently reduced modulus 65536. For addition, subtraction and multiplication this gives exactly the abstract ring-theoretic definition, but division is defined only in this ``concrete'' way.
Integers modulus 65536 are perfect to be used as addresses: we have seen in Section 1 that the 68000 has an addressing space of 65536 locations, and the addresses ``wrap around'' in such a way that location number 65536 and location number 0 coincide. This is the reason for which number-type data (of which addresses are a particular case) were defined in that way. All calculations involving addresses are performed following the rules for arithmetic operation on number-type data, since (let me say it once again) addresses are number-type data.
The set of number-type data can be represented as a circle, in which 0 = 65536 comes next to 65535. Thus, there is no obvious notion of ordering within number-type data. In order to satisfy the needs of 68000 programs, two conventional orderings are defined:
These two kinds of ordering are illustrated in fig. 9.
The descriptions of instructions that perform arithmetic comparisons explicitly specify the kind of ordering they use.
|
|
|
|
|
|