Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .text
- .globl inter_to_oct_str
- inter_to_oct_str:
- pushl %ebp
- movl %esp,%ebp
- movl 8(%ebp),%eax
- movl 12(%ebp),%esi
- movl 16(%ebp),%edi
- movl $8,%ebx
- movl $0,%ecx
- andl %eax,%eax
- jns nije
- movb $'-',(%esi)
- incl 12(%ebp)
- incl %esi
- decl %edi
- negl %eax
- nije:
- decl %edi
- cmpl $1,%edi
- jl nemere
- movl $0,%edx
- divl %ebx
- addb $'0',%dl
- movb %dl,(%esi)
- incl %esi
- andl %eax, %eax
- jnz nije
- movb $0,(%esi)
- decl %esi
- movl 12(%ebp),%edi
- petlja:
- cmpl %esi,%edi
- jae kraj
- movb (%esi),%ah
- movb (%edi),%al
- movb %al,(%esi)
- movb %ah,(%edi)
- decl %esi
- incl %edi
- jmp petlja
- nemere:
- incl %ecx
- kraj:
- movl %ecx,%eax
- movl %ebp,%esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement