Guest User

Untitled

a guest
Jun 18th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. ;Do the division
  2. mov rbx, [rsp] ;Copy the top of the stack into rbx
  3. pop r8 ;Temporarily move the top value off to copy the 2nd value
  4. mov r10, [rsp] ;Copy the second value off the stack
  5. push r8 ;Put the first value back on
  6. mov rax, r10 ;Copy the second value into rax to do the math
  7. idiv rbx ;Divide
  8. push rax ;Push the two values from the multiplication on the stack
  9. push rdx
  10. ;
  11. mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
  12. mov rdi, specifierforstringdata ;Prepares printf for strange data
  13. mov rsi, multiplymessage
  14. call printf
  15. pop rbx
  16. mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
  17. mov rdi, specifierforhexinteger ;Prepare for printf to output one 64-bit integer to the standard output device in hex
  18. mov rsi, rbx ;rsi must hold the integer being passed to printf
  19. call printf
  20. pop rbx
  21. mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
  22. mov rdi, specifierforhexinteger ;Prepare for printf to output one 64-bit integer to the standard output device in hex
  23. mov rsi, rbx ;rsi must hold the integer being passed to printf
  24. call printf
  25. ;
Add Comment
Please, Sign In to add comment