# Motorola DSP56000 Manual: Modulo Modifier Example

24-bit digital signal processor.

The MOVE instruction in Figure 4-13 takes the contents of the X0 register and moves it
to a location in the X memory pointed to by (R2), and then (R2) is updated modulo 21. The
new value of R2 is not 90 (75+ 15), which would be the case if linear arithmetic had been
used, but rather is 69 since modulo arithmetic was used.
4.4.2.2.2
Mn=\$8001 to \$BFFF
In this range, the modulo (M) equals (Mn+1)-\$8000, where Mn is the value in the modi-
fier register (see Table 4-2). This range firmly restricts the address register to the same
buffer, causing the address register to wrap around within the buffer. This multiple wrap-
interpolation, and waveform generation.
The address modification is performed modulo M, where M may be any power of 2 in the
1
14
range from 2
to 2
within an address range of size M defined by a lower and upper address boundary. The
value M-1 is stored in the modifier register Mn least significant 14 bits while the two most
significant bits are set to '10'. The lower boundary (base address) value must have zeroes
in the k LSBs, where 2
is the lower boundary plus the modulo size minus one (base address plus M-1).
MOTOROLA
EXAMPLE: MOVE X0,X:(R2)+N
LET:
M2
00.....0010100
N2
00.....0001111
R2
00.....1001011
(90)
+
(75)
R2
(69)
0..010 00000
k=5
Figure 4-13 Modulo Modifier Example
. Modulo M arithmetic causes the address register value to remain
k
= M, and therefore must be a multiple of 2
MODULUS=21
OFFSET=15
POINTER=75
(84)
N2
XD BUS
21
X0
(64)
k
. The upper boundary
4 - 21