Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. Multiply:
  2.  
  3. /*r4 = base exp..*/
  4. /*r5 = foe’s level*/
  5. /*This multiplies the base exp. by the opponent’s level*/
  6. /*Then it multiplies the result by 20*/
  7. /*Then it divides the whole thing by 100*/
  8. /*This is the same as dividing it by 5*/
  9. /*r0 is the top number, r1 is the bottom number*/
  10.  
  11. mul r4, r5
  12. mov r1, r4 /*r1 is B x L*/
  13. mov r0, #0x14
  14. mul r0, r1 /*r0 = B x L*/
  15. mov r1, #0xFA /*r1 = 100*/
  16. bl Divide /*divides by 100*/
  17. mov r3, r0
  18.  
  19. LevelStuff:
  20.  
  21. /*This multiplies the foe’s level by 2*/
  22. /*Then adds 10 to the result*/
  23. /*Then it multiplies that result by itself to square it*/
  24. /*This is the top part of the level ratio*/
  25.  
  26. mov r2, #0x2
  27. mov r1, r5 /*move foe level to r1*/
  28. mul r1, r2 /*multiply foe level by 2*/
  29. mov r2, #0xA
  30. add r1, r1, r2 /*add 10 to 2 x Foe Level*/
  31. mul r1, r1 /*multiply (2L+10) by itself*/
  32.  
  33. BottomLevel:
  34.  
  35. /*r5 = foe’s level*/
  36. /*r6 = your level*/
  37. /*This add your level to the opponent’s level*/
  38. /*Then adds ten to that sum*/
  39. /*multiplies by itself to square it*/
  40.  
  41. add r5, r5, r6
  42. add r5, r5, r2
  43. mul r5, r5
  44.  
  45. DivideAgain:
  46.  
  47. /*r1 = (2L+10)^2*/
  48. /*r5 = (L+Lp+10)^2*/
  49. /*r6 = (B x L) / 5*/
  50. /*Stores answer to r0*/
  51. /*Then moves answer to r2*/
  52.  
  53. mov r0, r1
  54. mov r1, r5
  55. mov r6, r3 /*move BL/5 to r6*/
  56. mov r3, #0x64 /*multiply top by 100*/
  57. mul r0, r3
  58. bl Divide /*Divide top by bottom*/
  59. mov r2, r0
  60.  
  61. DivideSomeMore:
  62.  
  63. /*r6 = BL/5*/
  64. /*r2 = Level Ratio*/
  65. /*Multiplies the 2nd term by 100*/
  66. /*Then divides whole thing by 100*/
  67.  
  68. mul r6, r2 /*multiply BL/5 by (100*2ndTerm)*/
  69. mov r0, r6
  70. mov r1, #0xFA
  71. bl Divide /*Divides (BL/5)*(100*2ndTerm) by 100*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement