Samsung S3C2440A User Manual Page 120

  • Download
  • Add to my manuals
  • Print
  • Page
    / 560
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 119
S3C2440A RISC MICROPROCESSOR ARM INSTRUCTION SET
3-63
LOADING A WORD FROM AN UNKNOWN ALIGNMENT
; Enter with address in Ra (32 bits) uses
; Rb, Rc result in Rd. Note d must be less than c e.g. 0,1
BIC Rb,Ra,#3 ; Get word aligned address
LDMIA Rb,{Rd,Rc} ; Get 64 bits containing answer
AND Rb,Ra,#3 ; Correction factor in bytes
MOVS Rb,Rb,LSL#3 ; ...now in bits and test if aligned
MOVNE Rd,Rd,LSR Rb ; Produce bottom of result word (if not aligned)
RSBNE Rb,Rb,#32 ; Get other shift amount
ORRNE Rd,Rd,Rc,LSL Rb ; Combine two halves to get result
Page view 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 559 560

Comments to this Manuals

No comments