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
Post a Comment