
PIC18F2480/2580/4480/4580
DS39637A-page 406
Preliminary
2004 Microchip Technology Inc.
MOVSS
PUSHL
Move Indexed to Indexed
Syntax:
Operands:
MOVSS [z
s
], [z
d
]
0
≤
z
s
≤
127
0
≤
z
d
≤
127
((FSR2) + z
s
)
→
((FSR2) + z
d
)
None
Operation:
Status Affected:
Encoding:
1st word (source)
2nd word (dest.)
Description
1110
1111
1011
xxxx
1zzz
xzzz
zzzz
s
zzzz
d
The contents of the source register are
moved to the destination register. The
addresses of the source and destination
registers are determined by adding the
7-bit literal offsets ‘z
s
’ or ‘z
d
’,
respectively, to the value of FSR2. Both
registers can be located anywhere in
the 4096-byte data memory space
(000h to FFFh).
The
MOVSS
instruction cannot use the
PCL, TOSU, TOSH or TOSL as the
destination register.
If the resultant source address points to
an indirect addressing register, the
value returned will be 00h. If the
resultant destination address points to
an indirect addressing register, the
instruction will execute as a
NOP
.
2
2
Words:
Cycles:
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Determine
source addr
Determine
dest addr
Determine
source addr
Determine
dest addr
Read
source reg
Write
to dest reg
Decode
Example:
MOVSS [05h], [06h]
Before Instruction
FSR2
Contents
of 85h
Contents
of 86h
After Instruction
FSR2
Contents
of 85h
Contents
of 86h
=
80h
=
33h
=
11h
=
80h
=
33h
=
33h
Store Literal at FSR2, Decrement FSR2
Syntax:
PUSHL k
Operands:
0
≤
k
≤
255
k
→
(FSR2),
FSR2 – 1
→
FSR2
Operation:
Status Affected: None
Encoding:
1111
1010
kkkk
kkkk
Description:
The 8-bit literal ‘k’ is written to the data
memory address specified by FSR2. FSR2 is
decremented by 1 after the operation.
This instruction allows users to push values
onto a software stack.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read ‘k’
Process
data
Write to
destination
Example:
PUSHL 08h
Before Instruction
FSR2H:FSR2L
Memory (01ECh)
=
=
01ECh
00h
After Instruction
FSR2H:FSR2L
Memory (01ECh)
=
=
01EBh
08h