Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. function count_of_digits_asm(n: Integer): Cardinal;
  2. asm
  3. cdq
  4. xor eax,edx
  5. sub eax,edx
  6.  
  7. xor ecx, ecx
  8. mov ebx, 10
  9.  
  10. @L1:
  11. add ecx, 1
  12. xor edx, edx
  13. idiv ebx
  14. test eax, eax
  15. jne @L1
  16.  
  17. mov @result, ecx
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement