SHARE
TWEET

Untitled

a guest May 15th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INCLUDE Irvine32.inc
  2.  
  3. .data
  4. matrix DWORD 5,3,4,8,5,5,8,7,3,1,0,9,8,7,5,6
  5. ans DWORD ?
  6. firstNum DWORD ?
  7. secNum DWORD ?
  8. thirdNum DWORD ?
  9. fourthNum DWORD ?
  10. .code
  11. main PROC
  12.  
  13. mov esi , offset [matrix]
  14. mov ans , 0
  15.  
  16.  
  17. mov firstNum , 0
  18. mov secNum , 5
  19. mov thirdNum ,  10
  20. mov fourthNum , 15
  21. call AddToDeter
  22.  
  23. add thirdNum ,  1          ;11
  24. sub fourthNum , 1   ; 14
  25. call subFromDeter
  26.  
  27. add secNum , 1
  28. mov thirdNum ,  9
  29. add fourthNum , 1
  30. call subFromDeter
  31.  
  32. mov thirdNum ,  11
  33. mov fourthNum , 13
  34. call AddToDeter
  35.  
  36. add secNum , 1
  37. mov thirdNum ,  9
  38. add fourthNum , 1
  39. call AddToDeter
  40.  
  41. mov thirdNum ,10
  42. mov fourthNum , 13
  43. call subFromDeter
  44.  
  45. add firstNum , 1
  46.  
  47. mov secNum , 4
  48. mov thirdNum , 10
  49. mov fourthNum , 15
  50. call subFromDeter
  51.  
  52. add thirdNum , 1
  53. sub fourthNum , 1
  54. call AddToDeter
  55.  
  56. mov secNum , 6
  57. mov thirdNum , 8
  58. mov fourthNum , 15
  59. call AddToDeter
  60.  
  61. mov thirdNum , 11
  62. mov fourthNum , 12
  63. call subFromDeter
  64.  
  65. add secNum,1
  66. mov thirdNum,8
  67. mov fourthNum , 14
  68. call subFromDeter
  69.  
  70. mov thirdNum , 10
  71. mov fourthNum , 12
  72. call AddToDeter
  73.  
  74. add firstNum,1
  75.  
  76. mov secNum, 4
  77. mov thirdNum , 9
  78. mov fourthNum , 15
  79. call AddToDeter
  80.  
  81. mov thirdNum, 11
  82. mov fourthNum , 13
  83. call subFromDeter
  84.  
  85.  
  86. mov secNum , 5
  87. mov thirdNum , 8
  88. mov fourthNum , 15
  89. call subFromDeter
  90.  
  91. mov thirdNum ,  11
  92. mov fourthNum , 12
  93. call AddToDeter
  94.  
  95. mov secNum , 7
  96. mov thirdNum , 9
  97. mov fourthNum , 13
  98. call AddToDeter
  99.  
  100. add thirdNum , 1
  101. sub fourthNum , 1
  102. call subFromDeter
  103.  
  104.  
  105. add firstNum , 1
  106.  
  107.  
  108. mov secNum , 4
  109. mov thirdNum , 9
  110. mov fourthNum , 14
  111. call subFromDeter
  112.  
  113. add thirdNum , 1
  114. sub fourthNum  , 1
  115. call AddToDeter
  116.  
  117. add secNum , 1
  118. mov thirdNum , 8
  119. mov fourthNum , 14
  120. call AddToDeter
  121.  
  122. mov thirdNum , 10
  123. mov fourthNum , 12
  124. call subFromDeter
  125.  
  126. add secNum , 1
  127. mov thirdNum , 8
  128. mov fourthNum , 13
  129. call subFromDeter
  130.  
  131. add thirdNum , 1
  132. sub fourthNum ,1
  133. call AddToDeter
  134.  
  135. exit
  136. main ENDP
  137. AddToDeter PROC USES eax esi ecx
  138.     mov eax , type matrix
  139.     mul firstNum
  140.     mov esi , offset [matrix]
  141. add esi , eax
  142. mov eax ,1
  143. mul dword ptr [esi]
  144. push eax
  145.     mov eax , type matrix
  146.     mul secNum
  147.     mov esi , offset [matrix]
  148. add esi , eax
  149. pop eax
  150. mul dword ptr [esi]
  151. push eax
  152.     mov eax , type matrix
  153.     mul thirdNum
  154.     mov esi , offset [matrix]
  155. add esi , eax
  156. pop eax
  157. mul dword ptr [esi]
  158. push eax
  159.     mov eax , type matrix
  160.     mul fourthNum
  161.     mov esi , offset [matrix]
  162. add esi , eax
  163. pop eax
  164. mul dword ptr [esi]
  165. add ans , eax
  166.     mov eax , ans
  167.     call writeint
  168.  
  169. ret
  170. AddToDeter ENDP
  171. subFromDeter PROC USES eax esi ecx
  172. mov eax , type matrix
  173.     mul firstNum
  174.     mov esi , offset [matrix]
  175. add esi , eax
  176. mov eax ,1
  177. mul dword ptr [esi]
  178. push eax
  179.     mov eax , type matrix
  180.     mul secNum
  181.     mov esi , offset [matrix]
  182. add esi , eax
  183. pop eax
  184. mul dword ptr [esi]
  185. push eax
  186.     mov eax , type matrix
  187.     mul thirdNum
  188.     mov esi , offset [matrix]
  189. add esi , eax
  190. pop eax
  191. mul dword ptr [esi]
  192. push eax
  193.     mov eax , type matrix
  194.     mul fourthNum
  195.     mov esi , offset [matrix]
  196. add esi , eax
  197. pop eax
  198. mul dword ptr [esi]
  199.     sub ans , eax  
  200.     mov eax , ans
  201.     call writeint
  202.        
  203. ret
  204. subFromDeter ENDP
  205.  
  206. END main
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top