flat assembler
Message board for the users of flat assembler.
Index
> Windows > SSE Convert numbers to string. |
Author |
|
pabloreda 28 Jul 2020, 12:34
here the oposite, but perhaps some ideas
https://kholdstare.github.io/technical/2020/05/26/faster-integer-parsing.html |
|||
28 Jul 2020, 12:34 |
|
Tomasz Grysztar 28 Jul 2020, 13:35
I would recommend first checking out this old thread: Binary number to decimal ASCII string conversion.
|
|||
28 Jul 2020, 13:35 |
|
Roman 28 Jul 2020, 15:03
I try on 999998 and 9999997
9999998 get me text 9999999 Code: mov eax,999998; or 9999997 cvtsi2ss xmm1,eax mov eax,0.1 movd xmm0,eax mov eax,1.0 movd xmm2,eax sub eax,eax .22: mulss xmm1,xmm0 inc eax comiss xmm1,xmm2 jae .22 sub edx,edx mov ebx,10.0 ;inc eax xorps xmm2,xmm2 movd xmm0,ebx mov ebx,Status22 .33: cvtsi2ss xmm2,edx subss xmm1,xmm2 mulss xmm1,xmm0 ;cvtss2si edx,xmm1 roundss xmm3,xmm1,9 cvtss2si edx,xmm3 mov [ebx],dl add byte [ebx],48 inc ebx dec eax test eax,eax jnz .33 invoke MessageBox,0,Status22,0,0 |
|||
28 Jul 2020, 15:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.