This site is no longer active and is available for archival purposes only. Registration and login is disabled.

I can not get the expected result.


I can not get the expected result.

Postby flashyou » Mar 9, 2006 @ 1:44pm

flashyou
pm Member
 
Posts: 8
Joined: Feb 26, 2006 @ 10:54am


Postby refractor » Mar 9, 2006 @ 8:26pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby flashyou » Mar 10, 2006 @ 6:02am

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}
flashyou
pm Member
 
Posts: 8
Joined: Feb 26, 2006 @ 10:54am


Postby refractor » Mar 10, 2006 @ 6:55am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby flashyou » Mar 13, 2006 @ 4:48am

flashyou
pm Member
 
Posts: 8
Joined: Feb 26, 2006 @ 10:54am


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron