Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax
- .data
- .globl _x
- .globl _y
- _x: .long 0
- _y: .long 0
- .globl_mult #_mult is publicly visible
- _mult:
- push ebp
- mov ebp,esp
- mov eax, 0 #prod = 0 ;
- mov edx, _y
- mov ecx, _x
- LOOP:
- cmp ecx, 0
- jg done
- test ecx,01h
- je is_zero
- add eax,edx
- is_zero:
- shr,eax
- shl,edx
- DONE:
- pop ebp
- ret
Add Comment
Please, Sign In to add comment