Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .L5: #function 51
- subq $16,%rsp # get space in the stack
- pushq %rdx # save the second pointer
- pushq %rsi # save the first pointer
- leaq -1(%rbp), %rsi # here it's sacnf just for the \n
- movl $dummyIn, %edi # deuumyIn = %c
- xor %rax, %rax # make eax zero
- call scanf # scanf
- leaq -1(%rbp), %rsi # set the first argument to be in rsi
- leaq -2(%rbp), %rdx # set the seconde argument to be in rdx
- xor %rdi, %rdi # make rdi zero (for using edi)
- movl $twoChars, %edi # tow chars = %c %c
- xor %rax, %rax # make rax zero
- call scanf # sacnf
- movb -2(%rbp), %dl # put the new char in dl
- movb -1(%rbp), %sil # put the old char in sil
- popq %rdi # get the frist string
- call replaceChar # call the replaceChar function
- leaq 4(%rax), %rcx # put the pointer to the string in rcx
- popq %rdi # pop the pointer to the second string
- call replaceChar # call the replaceChar function
- leaq 4(%rax), %r8 # put the pointer to the string in r8
- movq $fun52string, %rdi # put the string stractur in rdi
- xor %rax, %rax # make rax zero
- call printf # call printf
- jmp .TheEnd # jump to the end :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement