Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR ASSEMBLY

ARM assembly divide by 2

/*
 * divides r0 by 2
 */
 
 _start:
 	mov r0, 10 @ Set r0 to the value you want to divide by 2.
    mov r0, r0, ASR 1 @ divides value by 2
    _exit
    
_exit:
    mov r7, 1
    swi 0
    
 
PREVIOUS NEXT
Tagged: #ARM #assembly #divide
ADD COMMENT
Topic
Name
9+8 =