Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .bss
  4. side_a resd 4
  5. side_b resd 4
  6. side_c resd 4
  7. vol resd 4
  8. tmp1 resd 4
  9. tmp2 resd 4
  10. tmp3 resd 4
  11.  
  12. section .text
  13. global CMAIN
  14. CMAIN:
  15.     GET_DEC 4, eax
  16.     mov dword[side_a], eax
  17.     GET_DEC 4, eax
  18.     mov dword[side_b], eax
  19.     GET_DEC 4, eax
  20.     mov dword[side_c], eax
  21.     GET_DEC 4, eax
  22.     mov dword[vol], eax
  23.     mov eax, dword[side_a]
  24.     mul dword[side_b]
  25.     mov dword[tmp1], edx
  26.     mul dword[side_c]
  27.     mov dword[tmp2], eax
  28.     mov dword[tmp3], edx
  29.     mov eax, dword[tmp1]
  30.     mul dword[side_c]
  31.     mov edx, eax
  32.     mov eax, dword[tmp2]
  33.     add edx, dword[tmp3]
  34.     div dword[vol]
  35.     PRINT_DEC 4, eax
  36.     xor eax, eax
  37.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement