Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .global mul2, main, value
- mul2:
- push %ebp
- mov %esp, %ebp
- xor %eax, %eax
- xor %edx, %edx
- mov 8(%ebp), %ecx // address
- mov (%ecx), %eax // value
- mov %eax, %edx
- add %eax, %eax
- jo infty
- fin:
- mov %eax, (%ecx)
- mov %ebp, %esp
- pop %ebp
- ret
- infty:
- mov %edx, %eax
- jmp fin
- /* main:
- call readi32
- mov %eax, value
- mov $value, %ecx
- push %ecx
- call mul2
- mov value, %eax
- call writei32
- pop %ecx
- call finish
- .data
- value:
- .int 0 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement