Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- PUBLIC Digits
- PUBLIC @isArmstrong@4
- PUBLIC Find
- .model flat
- .data
- ans DD ?
- m DD ?
- q DD ?
- count DD ?
- .code
- Digits proc stdcall, n:dword
- pushad
- mov ecx,1
- cmp n,0
- je _ex
- mov eax,n
- cdq
- mov ebx,10
- xor ecx,ecx
- _cycle:
- cmp eax,0
- je _ex
- cdq
- idiv ebx
- inc ecx
- jmp _cycle
- _ex:
- mov ans, ecx
- popad
- mov eax,ans
- ret 4
- Digits endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement