User’s Manual
C166S V1 SubSystem
Central Processing Unit
User’s Manual
3-82
V 1.6, 2001-08
•
Address Pointer Updating
Indirect addressing modes use a GPR value to generate the address of the source and/
or destination operand. If this GPR is updated explicitly by the preceding instruction, one
NOP instruction is automatically inserted.
I
n
:ADD R0,#0002h
;increment address pointer GPR 0
I
inject
:NOP
;automatically injected NOP
I
n+1
:MOV R2,[R0]
;use GPR 0 for indirect addressing
To improve performance, an instruction not using this new GPR as a destination operand
can be inserted between an explicit GPR-changing and a subsequent instruction using
an indirect addressing mode.
I
n
:ADD R0,#0002h
;increment address pointer GPR 0
I
n+1
:....
;must not be an instruction updating GPR 0
I
n+2
:MOV R2,[R0]
;use GPR 0 for indirect addressing
•
Context Pointer Updating
An instruction that calculates a physical GPR operand address via the CP register is
incapable of using a new CP value that is to be updated by the preceding instruction.
Thus, to make sure that the new CP value is used, at least two instructions must be
inserted between an instruction that changes the CP and a subsequent instruction that
uses the GPR, as shown in the following example:
I
n
:SCXT CP,#0FC00h
;select a new context
I
n+1
:....
;must not be an instruction using a GPR
I
n+2
:....
;must not be an instruction using a GPR
I
n+3
:MOV R0,#dataX
;write to GPR 0 in the new context
•
Data Page Pointer Updating
An instruction that calculates a physical operand address via a particular DPPn (n=0
to n=3) register is not capable of using a new DPPn register value that is to be updated
by the preceding instruction. Thus, to make sure that the new DPPn register value is
used, at least one instruction must be inserted between a DPPn-changing instruction
and a subsequent instruction that implicitly uses DPPn via a long or indirect addressing
mode, as shown in the following example:
I
n
:MOV DPP0,#4
;select data page 4 via DPP0
I
n+1
:....
;must not be an instruction using DPP0
I
n+2
:MOV DPP0:0000H,R1;move contents of R1 to address location 01’0000
H
;(in data page 4) supposed segment. is enabled
Содержание C166S V1 SubSystem
Страница 10: ...User s Manual C166S V1 SubSystem User s Manual I 6 V 1 6 2001 08...
Страница 16: ...User s Manual C166S V1 SubSystem Introduction User s Manual 1 6 V 1 6 2001 08...
Страница 126: ...User s Manual C166S V1 SubSystem Central Processing Unit User s Manual 3 96 V 1 6 2001 08...
Страница 178: ...User s Manual C166S V1 SubSystem Memory Organization User s Manual 4 52 V 1 6 2001 08...
Страница 206: ...User s Manual C166S V1 SubSystem Instruction Set User s Manual 5 28 V 1 6 2001 08...
Страница 306: ...User s Manual C166S V1 SubSystem Detailed Instruction Set User s Manual 6 100 V 1 6 2001 08...
Страница 362: ...User s Manual C166S V1 SubSystem The External Bus Interface User s Manual 8 40 V 1 6 2001 08...
Страница 452: ...User s Manual C166S V1 SubSystem General Purpose Timer Unit User s Manual 12 44 V 1 6 2001 08...
Страница 454: ...User s Manual C166S V1 SubSystem Instruction Index User s Manual 13 2 V 1 6 2001 08...
Страница 459: ......