문제

I have a number 8 717 809 4592 that is stored in the registers edx, eax. The values are as such edx = x14 eax = 4c382800 So basically edx has the high order and eax has the low order. How do I save this number as an ascii string '87178094592' without using function calls?

도움이 되었습니까?

해결책

Use div to divide edx:eax by 10 and repeat.

다른 팁

You can divide an extended precision dividend by a 32 bit divisor. Start with edx = 0, eax = high order dividend, divide by 10, high order dividend = eax, eax = low order dividend, divide by 10, low order dividend = eax, least significant digit = remainder = edx. Repeat until dividend = 0. You get the digits in reverse order, so you may want to push them onto a stack, the pop them off to get the digits in forward order, or store the digits into to a string array, starting at the end of the string (leaving room for a trailing zero).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top