Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. .386
  2. .model flat
  3.  
  4. .code
  5. _toUnsigned proc
  6. mov ecx, [esp + 4]
  7.  
  8. mov eax, 0
  9. _while:
  10. cmp byte ptr[ecx], 0
  11. je _end
  12. mov edx, 10
  13. mul edx
  14. mov bl, byte ptr[ecx]
  15. sub bl, '0'
  16. movsx esi, bl
  17. add eax, esi
  18. inc ecx
  19. jmp _while
  20. _end:
  21. ret
  22. _toUnsigned endp
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement