Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global main
- main:
- movl $0, %ebx
- movl $0, %esi
- LoopBegin:
- call readi32
- jc LoopEnd
- testl $1, %eax
- jnz LoopMid
- addl %eax, %esi
- subl %eax, %ebx
- LoopMid:
- addl %eax, %ebx
- jmp LoopBegin
- LoopEnd:
- movl %esi, %eax
- call writei32
- call nl
- movl %ebx, %eax
- call writei32
- call nl
- call finish
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement