flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Goplat
Windows's printf function can do this; the %I64u format prints an unsigned 64-bit integer.
|
|||
![]() |
|
magicSqr
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 |
|||
![]() |
|
magicSqr
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) |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.