Advertisement
Guest User

Untitled

a guest
May 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. .386
  2. PUBLIC Digits
  3. PUBLIC @isArmstrong@4
  4. PUBLIC Find
  5. .model flat
  6. .data
  7. ans DD ?
  8. m DD ?
  9. q DD ?
  10. count DD ?
  11. .code
  12.  
  13. Digits proc stdcall, n:dword
  14. pushad
  15. mov ecx,1
  16. cmp n,0
  17. je _ex
  18. mov eax,n
  19. cdq
  20. mov ebx,10
  21. xor ecx,ecx
  22. _cycle:
  23. cmp eax,0
  24. je _ex
  25. cdq
  26. idiv ebx
  27. inc ecx
  28. jmp _cycle
  29. _ex:
  30. mov ans, ecx
  31. popad
  32. mov eax,ans
  33. ret 4
  34. Digits endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement