Page 1 of 1

I can not get the expected result.

PostPosted: Mar 9, 2006 @ 1:44pm
by flashyou

PostPosted: Mar 9, 2006 @ 8:26pm
by refractor

PostPosted: Mar 10, 2006 @ 6:02am
by flashyou
Yes, It is a test code.

I want to pass more than 4 parameters to assemble code, so I need to pass them by stack. And I want to use R4-R8 , so I should protect save them before I change its value , and I push them into stack with code below:

mov R12,SP
STMDB SP!,{R4-R7}
STR R1, [R0] ,#4
STR R2, [R0] ,#4
STR R3, [R0] ,#4
mov pc,lr
END

what can I do? Thanks in advance!

Bye the way, it will corrupt when I stmdb more register and write back to sp. Such as
STMDB SP!,{R4-R11}

PostPosted: Mar 10, 2006 @ 6:55am
by refractor

PostPosted: Mar 13, 2006 @ 4:48am
by flashyou