Intel i960 Jx Developer's Manual page 45

Microprocessor
Table of Contents

Advertisement

st
g4,xyz
ldob
(r3),r4
stl
g6,xyz(g5)
ldq
(r8)[r9*4],r4
st
g3,xyz(g4)[g5*2]
ldis
xyz[r12*2],r13
st
r4,xyz(ip)
Example 2-2. Addressing Mode Mnemonics
array_op:
mov
g0,r4
subi
1,g1,r3
b
.I33
.I34:
st
g2,(r4)[r3*4]
st
g2,0x30(r4)[r3*4] # Fill element at index+constant offset
subi
1,r3,r3
.I33:
cmpible
0,r3,.I34
ret
Example 2-3. Scaled Index and Scaled Index Plus Displacement Addressing Modes
DATA TYPES AND MEMORY ADDRESSING MODES
# Absolute; word from g4 stored at memory
# location designated with label xyz.
# Register indirect; ordinal byte from
# memory location given in r3 loaded
# into register r4 and zero extended.
# Register indirect with displacement;
# double word from g6,g7 stored at memory
# location xyz + g5.
# Register indirect with index; quad-word
# beginning at memory location r8 + (r9
# scaled by 4) loaded into r4 through r7.
# Register indirect with index and
# displacement; word in g3 stored to mem
# location g4 + xyz + (g5 scaled by 2).
# Index with displacement; load short
# integer at memory location xyz + r12
# into r13 and sign extended.
# ip with displacement; store word in r4
# at memory location IP + xyz + 8.
# Pointer to array is copied to r4.
# Calculate index for the last array
# element to be filled
# Fill element at index
# Decrement index
# Store next array elements if
# index is not 0
2
2-9

Advertisement

Table of Contents
loading

Table of Contents