flat assembler
Message board for the users of flat assembler.
Index
> Windows > convert dq to asc integer |
Author |
|
Goplat 13 Sep 2011, 17:30
Windows's printf function can do this; the %I64u format prints an unsigned 64-bit integer.
|
|||
13 Sep 2011, 17:30 |
|
magicSqr 13 Sep 2011, 17:39
thanks for the quick reply
can it do this to file ? I don't know the syntax of printf in fasm If my value was stored in dq mVal and the file was myFile how would I write it? thanks again |
|||
13 Sep 2011, 17:39 |
|
magicSqr 13 Sep 2011, 18:41
It's ok now.
Think I had brain-freeze. Couldn't think how I could divide qword, lol Code: myVal dq 0x5943DD1690A03A14 ; 6432227781800638996 buff db 30 dup ? mov eax, dword [myVal+4] mov ebx, dword [myVal] mov ecx, 10 xor edx, edx mov edi, buff+28 mov byte [edi+1], 0 ;zero terminator @@: div ecx xchg eax, ebx div ecx xchg eax, ebx add dl, 0x30 mov [edi], dl xor dl, dl dec edi or eax, eax jnz @b or ebx, ebx jnz @b inc edi int3 I'm sure you can all write it more succinctly, but it works for my needs :O) |
|||
13 Sep 2011, 18:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.