LongToStrW PROC Uses edi ecx,vr_:QWORD, lpstr_:DWORD, fld_:DWORD
           Local lc1:QWORD, lc5:DWORD
           Local lc2:DWORD, lc4:DWORD
           Local lc3:WORD, oldcw:WORD
           mov lc5,null
l2sW::     mov lc4,null
           push dword ptr vr_
           push dword ptr vr_+4
           pop dword ptr lc1+4
           pop dword ptr lc1
;           movq MM0,vr_
;           movq lc1,MM0
;           emms
           finit
           mov edi,lpstr_
           cmp dword ptr vr_+4,80000000h
           jb @F
           cmp dword ptr vr_+4,80000000h
           ja l4
           cmp dword ptr vr_,null
           jne l4
           mov ,word ptr '0'
           inc edi
           inc edi
           jmp exit
l4:        mov ,word ptr '-'
           inc edi
           inc edi
           not dword ptr lc1
           not dword ptr lc1+4
           add dword ptr lc1,1
           adc dword ptr lc1+4,null
@@:        fstcw oldcw
           mov ax,oldcw
           or ah,RC_TO_NULL
           mov lc3,ax
           fldcw lc3
           mov lc2,10
           fild lc2
           push 'x'
l1:        fild lc1
           fprem
           fistp lc2
           inc lc4
           cmp lc5,null
           jz @F
           test lc4,3
           jnz @F
           push "'"-'0'
           inc lc4
@@:        push lc2
           fild lc1
           fdiv st,st(1)
           fistp lc1
           cmp dword ptr lc1,null
           je l2
           jmp l1
l2:        fldcw oldcw
           mov ecx,fld_
           sub ecx,lc4
           jc @F
           jcxz @F
l3:        push ' '-'0'
           inc lc4
           loop l3
@@:        pop eax
           cmp eax,'x'
           je exit
           add al,'0'
           mov ,ax
           inc edi
           inc edi
           jmp @B
exit:      mov eax,lc4
           mov ,bx
           shl eax,1
           ret
LongToStrW ENDP
;--------------------------------------------------------
LongToStrA PROC Uses edi ecx,vr_:QWORD, lpstr_:DWORD, fld_:DWORD
           Local lc1:QWORD, lc5:DWORD
           Local lc2:DWORD, lc4:DWORD
           Local lc3:WORD, oldcw:WORD
           mov lc5,null
l2sA::     mov lc4,null
           push dword ptr vr_
           push dword ptr vr_+4
           pop dword ptr lc1+4
           pop dword ptr lc1
;           movq MM0,vr_
;           movq lc1,MM0
;           emms
           finit
           mov edi,lpstr_
           cmp dword ptr vr_+4,80000000h
           jb @F
           cmp dword ptr vr_+4,80000000h
           ja l4
           cmp dword ptr vr_,null
           jne l4
           mov ,byte ptr '0'
           inc edi
           jmp exit
l4:        mov ,byte ptr '-'
           inc edi
           not dword ptr lc1
           not dword ptr lc1+4
           add dword ptr lc1,1
           adc dword ptr lc1+4,null
@@:        fstcw oldcw
           mov ax,oldcw
           or ah,RC_TO_NULL
           mov lc3,ax
           fldcw lc3
           mov lc2,10
           fild lc2
           push 'x'
l1:        fild lc1
           fprem
           fistp lc2
           inc lc4
           cmp lc5,null
           jz @F
           test lc4,3
           jnz @F
           push "'"-'0'
           inc lc4
@@:        push lc2
           fild lc1
           fdiv st,st(1)
           fistp lc1
           cmp dword ptr lc1,null
           jne l1
           cmp dword ptr lc1+4,null
           je l2
           jmp l1
l2:        fldcw oldcw
           mov ecx,fld_
           sub ecx,lc4
           jc @F
           jcxz @F
l3:        push ' '-'0'
           inc lc4
           loop l3
@@:        pop eax
           cmp eax,'x'
           je exit
           add al,'0'
           mov ,al
           inc edi
           jmp @B
exit:      mov eax,lc4
           mov ,bl
           ret
LongToStrA ENDP
This message was edited by Hiroshimator, on 4/19/2001 9:09:47 AM
Posted on 2001-04-19 07:25:00 by alex
Hey, heres a free tutorial :)

A)  Click the edit icon on your above message.. (looks like a pencil).
B)  Click anywhere and hit CTRL-A.  Hit the Delete Key.
C)  Type: 
 (then hit enter)
D)  Copy and paste your code you have to show us again.
E)  Type: 
Thanx, I would really like to see what you got to offer, but i can't read code like the CPU can.. ;) Legal statement: In light of past discussions, I am in no way trying to give or suggest your abilities are less than qualified. My comments are soley to provide constructive critisizm alone. :D :D :D NaN
Posted on 2001-04-19 08:53:00 by NaN
Nan... Would you? a) Hit that little pencil on your message b) Add the words "Hold SHIFT and " at point b) in front of the sentence: "Hit the Delete Key." I'm just having fun... :D and I don't want this fella to loose all his precious data *g* Peace & Harmony (JimmyClif)
Posted on 2001-04-19 09:11:00 by JimmyClif
or use the code-start/code-end buttons. I've edited your message so it includes the code tags without these tags
:DWORD
becomes :DWORD
Posted on 2001-04-19 09:11:00 by Hiroshimator