RSS Forums RSS
Please support our Assembly advertiser: Programming Forums

a little assembly app for arm cpu

Join Date: Mar 2007
Posts: 1
Reputation: 8ball is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
8ball 8ball is offline Offline
Newbie Poster

a little assembly app for arm cpu

  #1  
Mar 15th, 2007
I need to create a little assembly app for arm cpu which reads two 32 bit numbers from the address which register r0 points out. Then it compares absolute value of those two numbers and puts them back to those same addresses the way there's number which absolute value is higher in the first address. Finally the app sets 0 as the register r0 value, if the numbers were in the right order and sets 1 if the number orders needed to be changed.

The problem is that my little app isn't workin.
Hope someone can help me solve the problems there. thanks.

  1. ldr r1,[r0,#0]
  2. ldr r2,[r0,#4]
  3. mov r3,#-1
  4. cmp r1, #0
  5. mulmi r4, r1, r3
  6. movpl r4, r1
  7. cmp r2, #0
  8. mulmi r5, r2, r3
  9. movpl r5, r2
  10. subs r3,r4,r5
  11. strmi r1,[r0,#4]
  12. strmi r2,[r0,#0]
  13. strpl r2,[r0,#4]
  14. strpl r1,[r0,#0]
  15. movpl r0,#0
  16. movmi r0,#1
Last edited by 8ball : Mar 15th, 2007 at 5:48 am.
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:20 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC