Intel Computer Hardware 80200 Instrukcja Użytkownika Strona 241

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 289
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 240
Developers Manual March, 2003 B-13
Intel
®
80200 Processor based on Intel
®
XScale
Microarchitecture
Optimization Guide
B.3.2 Bit Field Manipulation
The Intel
®
80200 processor shift and logical operations provide a useful way of manipulating bit
fields. Bit field operations can be optimized as follows:
;Set the bit number specified by r1 in register r0
mov r2, #1
orr r0, r0, r2, asl r1
;Clear the bit number specified by r1 in register r0
mov r2, #1
bic r0, r0, r2, asl r1
;Extract the bit-value of the bit number specified by r1 of the
;value in r0 storing the value in r0
mov r1, r0, asr r1
and r0, r1, #1
;Extract the higher order 8 bits of the value in r0 storing
;the result in r1
mov r1, r0, lsr #24
Przeglądanie stron 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 288 289

Komentarze do niniejszej Instrukcji

Brak uwag