Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Do the division
- mov rbx, [rsp] ;Copy the top of the stack into rbx
- pop r8 ;Temporarily move the top value off to copy the 2nd value
- mov r10, [rsp] ;Copy the second value off the stack
- push r8 ;Put the first value back on
- mov rax, r10 ;Copy the second value into rax to do the math
- idiv rbx ;Divide
- push rax ;Push the two values from the multiplication on the stack
- push rdx
- ;
- mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
- mov rdi, specifierforstringdata ;Prepares printf for strange data
- mov rsi, multiplymessage
- call printf
- pop rbx
- mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
- mov rdi, specifierforhexinteger ;Prepare for printf to output one 64-bit integer to the standard output device in hex
- mov rsi, rbx ;rsi must hold the integer being passed to printf
- call printf
- pop rbx
- mov qword rax, 0 ;No vector registers used, zero is the number of variant parameters
- mov rdi, specifierforhexinteger ;Prepare for printf to output one 64-bit integer to the standard output device in hex
- mov rsi, rbx ;rsi must hold the integer being passed to printf
- call printf
- ;
Add Comment
Please, Sign In to add comment