Motorola DSP56305 Manuel d'utilisateur Page 92

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 112
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 91
Compact Opcode Use
Peripheral Addressing
MOTOROLA Optimizing DSP56300/DSP56600 Applications 7-7
7.2.5 Register Addressing
The register addressing can also be used to decrease the total cycle
count. The next example is an implementation of a jump table that
uses register addressing. The code is used when exiting reset to
jump to a location that corresponds to the specific mode that was
chosen at power up:
org p:$400
move omr,a
and #<$7,a
move #j_table,r0
move a,n0
move p:(r0+n0),r0
jmp (r0)
j_table ;jump table starting address
dc 1ST_R ;If MC:MB:MA=000, goto 1st routine
dc 2ND_R ;If MC:MB:MA=001, goto 2nd routine
dc 3RD_R ;If MC:MB:MA=010, goto 3rd routine
dc 4TH_R ;If MC:MB:MA=011, goto 4th routine
dc 5TH_R ;If MC:MB:MA=100, goto 5th routine
dc 6TH_R ;If MC:MB:MA=101, goto 6th routine
dc 7TH_R ;If MC:MB:MA=110, goto 7th routine
dc 8TH_R ;If MC:MB:MA=111, goto 8th routine
7.2.6 Word Count
Some instructions have single word versions that should be used
when possible. It is advisable to consult the Family Manuals for
details on the word count of the various instructions.
7.3 PERIPHERAL ADDRESSING
The on-chip peripherals have special addressing modes. Moving
data to/from an on-chip peripheral can be done by a MOVEP
instruction, where the address of the peripheral is defined by very
few address bits as part of the opcode.
The use of MOVEP usually does not save execution time, but makes
it possible to put two MOVEP instructions in an interrupt vector,
instead of only one if a long absolute addressing mode is used.
Vue de la page 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 111 112

Commentaires sur ces manuels

Pas de commentaire