Electronic Components Datasheet Search |
|
ARM-610 Datasheet(PDF) 84 Page - Zarlink Semiconductor Inc |
|
ARM-610 Datasheet(HTML) 84 Page - Zarlink Semiconductor Inc |
84 / 173 page Instruction Set - Examples ARM610 Data Sheet 4-56 4.16 Instruction Set Examples The following examples show ways in which the basic ARM610 instructions can combine to give efficient code. None of these methods saves a great deal of execution time (although they may save some), mostly they just save code. 4.16.1 Using the conditional instructions Using conditionals for logical OR CMP Rn,#p ; If Rn=p OR Rm=q THEN GOTO Label. BEQ Label CMP Rm,#q BEQ Label This can be replaced by CMP Rn,#p CMPNE Rm,#q ; If condition not satisfied try ; other test. BEQ Label Absolute value TEQ Rn,#0 ; Test sign RSBMI Rn,Rn,#0 ; and 2's complement if necessary. Multiplication by 4, 5 or 6 (run time) MOV Rc,Ra,LSL#2 ; Multiply by 4, CMP Rb,#5 ; test value, ADDCS Rc,Rc,Ra ; complete multiply by 5, ADDHI Rc,Rc,Ra ; complete multiply by 6. Combining discrete and range tests TEQ Rc,#127 ; Discrete test, CMPNE Rc,#” ”-1 ; range test MOVLS Rc,#”.” ; IF Rc<=” ” OR Rc=ASCII(127) ; THEN Rc:=”.” Division and remainder A number of divide routines for specific applications are provided in source form as part of the ANSI C library provided with the ARM Cross Development Toolkit, available from your supplier. A short general purpose divide routine follows. ; Enter with numbers in Ra and Rb. ; MOV Rcnt,#1 ; Bit to control the division. Div1 CMP Rb,#0x80000000 ; Move Rb until greater than Ra. CMPCC Rb,Ra MOVCC Rb,Rb,ASL#1 MOVCC Rcnt,Rcnt,ASL#1 BCC Div1 MOV Rc,#0 |
Similar Part No. - ARM-610 |
|
Similar Description - ARM-610 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |