Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .rodata
- format_out:
- .string "%lu\n"
- .data
- A: .int 0
- B: .int 0
- .text
- .global A, B, process
- process:
- pushl %ebp
- movl %esp, %ebp
- pushl %ebx
- pushl %esi
- pushl %edi
- leal A, %ebx
- movl (%ebx), %ecx
- movl 4(%ebx), %edx
- shl $1, %edx
- shl $1, %ecx
- adcl $0, %edx
- leal B, %ebx
- movl (%ebx), %esi
- movl 4(%ebx), %edi
- movl %edi, %ebx
- andl $1, %ebx
- shl $31, %ebx
- shr $1, %esi
- shr $1, %edi
- addl %ebx, %esi
- subl %esi, %ecx
- sbbl %edi, %edx
- pushl %edx
- pushl %ecx
- pushl $format_out
- call printf
- addl $12, %esp
- popl %edi
- popl %esi
- popl %ebx
- movl %ebp, %esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement