assembly - ARM ASM + array -


i need write arm assembly language routines initialize array x of size n constant value v, using 2 different approaches: indices, pointers

i have no idea how in asm.

thanks jj

the simplest (not fastest) way implement function in arm assembly language:

 .global foo @ @ call c void foo(uint32 *array, uint32 size, uint32 value); @ @ standard calling convention: @ values passed in register r0=*array, r1=size, r2=value @ foo:   str r2,[r0],#4   @ store value , increment pointer   subs r1,r1,#1    @ decrement count   bne foo          @ branch until count 0   bx lr            @ return caller 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -