Texas-instruments MSP50C6xx Manuel d'utilisateur Page 144

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 390
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 143
Lookup Instructions
4-58
Lookup instructions make use of the data pointer (DP) internally. The DP
stores the address of the program memory location, loads the value to the
destination, and increments it automatically after every load. Thus, the value
of the DP is always the last used program memory address plus one. The
content of DP changes after the execution of lookup instructions. If filter
instructions FIRK and CORK are used, it is required to context save DP in the
interrupt service routine. Since these filter instructions use DP to read
coefficient data (see section 4.10), any interrupt occurring between loading the
first coefficient and the execution of a FIRK/CORK will change the last value
of DP (if the interrupt routine uses a lookup instruction). DP can be stored in
RAM ( MOV {adrs}, DP ), and a restoration is done as follows,
MOV An, {adrs}
SUB An, 0x1
MOV An, *An
Context save and restore of instructions are not required if filter instructions
are not used.
Example 4.9.1
Interrupt
MOV A0, 0x100
MOV A0, *A0
RPT N2
FIRK A2, R0++
...
; DP = 0x101 after execution
; Beginning of interrupt service routine
; context save
MOV *ctx_DP, DP ; ctx_DP stores the present DP = 0x101
...some lookup instructions...
; context restore
MOV *A0, *ctx_DP
SUB A0, 0x1
MOV A0, *A0
...
IRET
; DP = 0x101
; A0 = 0x100 after execution
; DP = 0x101 after execution
Vue de la page 143
1 2 ... 139 140 141 142 143 144 145 146 147 148 149 ... 389 390

Commentaires sur ces manuels

Pas de commentaire