Renesas H8S/2138 Series Manuel Page 28

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 148
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 27
Microcomputer Technical Q&A
20
Q&A No.: QAH8S-018
Category: Instruction
Subject: BOR and BIAND Instructions
Question
How are bit-manipulation instructions such as BOR and BIAND used?
Answer
These instructions are used to branch after looking at a number of flags. An example of their use is
shown below.
START
NEXT L1
Bit n of IN1 = 0?
Bit n of IN2 = 0?
No
No
Yes
Yes
Example: To branch to L1 when IN1 flag = 1 and IN2 flag = 0
Using BOR/BIAND Not Using BOR/BIAND
BLD #n,@IN1
BIAND #m,@IN2
BCS L1
BTST #n,@IN1
BNQ NEXT
BSET #m,@IN2
BNE NEXT
BRA L1
NEXT:
10 bytes/8 states 14 bytes/10 states
Vue de la page 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 147 148

Commentaires sur ces manuels

Pas de commentaire