Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #int konverzija(int rez, char* string_rez)
- .section .text
- .global konverzija
- konverzija:
- pushl %ebp
- movl %esp, %ebp
- pushl %ebx
- pushl %esi
- pushl %edi
- movl 8(%ebp), %eax
- movl 12(%ebp), %edi
- movl $10, %ebx
- petlja:
- xorl %edx, %edx
- divl %ebx
- addb $'0', %dl
- movb %dl, (%edi)
- incl %edi
- andl %eax, %eax
- jnz petlja
- movl $0, (%edi)
- decl %edi
- movl 12(%ebp), %esi
- obrni:
- cmpl %edi, %esi
- jae kraj
- movb (%esi), %ah
- movb (%edi), %al
- movb %al, (%esi)
- movb %ah, (%edi)
- incl %esi
- decl %edi
- jmp obrni
- kraj:
- popl %edi
- popl %esi
- popl %ebx
- movl %ebp, %esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement