Advertisement
Guest User

Untitled

a guest
Dec 5th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .L5: #function 51
  2.     subq $16,%rsp # get space in the stack
  3.     pushq %rdx # save the second pointer
  4.     pushq %rsi # save the first pointer
  5.  
  6.     leaq -1(%rbp), %rsi # here it's sacnf just for the \n
  7.     movl $dummyIn, %edi # deuumyIn = %c
  8.     xor %rax, %rax # make eax zero
  9.     call scanf # scanf
  10.  
  11.     leaq -1(%rbp), %rsi # set the first argument to be in rsi
  12.     leaq -2(%rbp), %rdx # set the seconde argument to be in rdx
  13.     xor %rdi, %rdi # make rdi zero (for using edi)
  14.     movl $twoChars, %edi # tow chars = %c %c
  15.     xor %rax, %rax # make rax zero
  16.     call scanf # sacnf
  17.     movb -2(%rbp), %dl # put the new char in dl
  18.     movb -1(%rbp), %sil # put the old char in sil
  19.  
  20.     popq %rdi # get the frist string
  21.     call replaceChar # call the replaceChar function
  22.     leaq 4(%rax), %rcx # put the pointer to the string in rcx
  23.     popq %rdi # pop the pointer to the second string
  24.     call replaceChar # call the replaceChar function
  25.     leaq 4(%rax), %r8 # put the pointer to the string in r8
  26.  
  27.     movq $fun52string, %rdi # put the string stractur in rdi
  28.     xor %rax, %rax # make rax zero
  29.     call printf # call printf
  30.     jmp .TheEnd # jump to the end :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement