Advertisement
_takumi

nsm

Sep 30th, 2022
1,493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io64.inc"
  2.  
  3. extern scanf
  4. extern printf
  5.  
  6. section .rodata
  7.     fstr db '%ll', 0
  8.    
  9. section .bss
  10.     n resq 1
  11.  
  12. section .text
  13. global CMAIN
  14. CMAIN:
  15.     mov rbp, rsp; for correct debugging
  16.     push rbp
  17.     mov rbp, rsp; for correct debugging
  18.     and rsp, -16
  19.     xor eax, eax
  20.     lea rdi, [fstr]
  21.     lea rsi, [n]
  22.     call scanf
  23.     xor eax, eax
  24.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement