flat assembler
Message board for the users of flat assembler.
Index
> Windows > 64bit(2x32bit division) |
Author |
|
revolution 28 Jul 2010, 00:55
Code: proc format_time locals time FILETIME milliseconds dd ? seconds dd ? minutes dd ? hours dd ? days dd ? endl invoke GetSystemTimeAsFileTime,addr time mov eax,[time.dwLowDateTime] mov edx,[time.dwHighDateTime stdcall divide_64_by_32,eax,edx,10000 stdcall divide_64_by_32,eax,edx,1000 ;get milliseconds mov [milliseconds],ecx stdcall divide_64_by_32,eax,edx,60 ;get seconds mov [seconds],ecx stdcall divide_64_by_32,eax,edx,60 ;get minutes mov [minutes],ecx stdcall divide_64_by_32,eax,edx,24 ;get hours mov [hours],ecx mov [days],eax ;... ;print something here ;... ret endp proc divide_64_by_32 numerator_low,numerator_high,denominator ;return edx:eax = 64-bit result ; ecx = remainder cmp [denominator],0 jz .overflow xor edx,edx mov eax,[numerator_high] div [denominator] mov ecx,eax mov eax,[numerator_low] div [denominator] xchg edx,ecx ret .overflow: mov ecx,[denominator] or edx,-1 or eax,-1 ret endp |
|||
28 Jul 2010, 00:55 |
|
jumpex 28 Jul 2010, 13:51
Too bad you're from Narnia. :D
I would surely buy you a drink otherwise. Thanks again. |
|||
28 Jul 2010, 13:51 |
|
revolution 28 Jul 2010, 14:57
jumpex wrote: Too bad you're from Narnia. |
|||
28 Jul 2010, 14:57 |
|
asmfan 28 Jul 2010, 15:04
revolution wrote:
Lol) will Taser fit?*) __ *) Watch the next fasmcon for the answers)) _________________ Any offers? |
|||
28 Jul 2010, 15:04 |
|
Tyler 28 Jul 2010, 15:49
Dude, I would definitely get drunk with revolution. That would be awesome. As long as it's in Italy... I can't legally get drunk with anyone in the US.
|
|||
28 Jul 2010, 15:49 |
|
jumpex 28 Jul 2010, 19:03
A glass of water for revolution in Sahara.
My 4KB alarm clock (I know it's big) is now working. |
|||
28 Jul 2010, 19:03 |
|
Tyler 28 Jul 2010, 22:48
I wanna see. Can you post the exe? Just add .txt to the end.
|
|||
28 Jul 2010, 22:48 |
|
jumpex 29 Jul 2010, 01:24
Optimizing.
Will post when polished. |
|||
29 Jul 2010, 01:24 |
|
jumpex 31 Jul 2010, 20:24
After all said and done, it came out at 16KB.
I just added a lot more stuff that I didn't plan. (it was originally meant to work with command line arguments, for one) Hope somebody finds something wrong with it AND tells me about it. Any comments appreciated, actually. (the "application" sucks, but it would be nice anyway) Attachment is a renamed .EXE, as suggested.
|
|||||||||||
31 Jul 2010, 20:24 |
|
Tyler 31 Jul 2010, 20:40
I was going to try it, but Norton removed it. I know I was the one who suggested renaming it to a .txt, maybe if you zipped it, Norton wouldn't be suspicious.
Note: I'm not saying it's a virus, AVs get false hits all the time. There's actually a few thread accusing Fasm of being a virus. |
|||
31 Jul 2010, 20:40 |
|
jumpex 31 Jul 2010, 21:12
Zipped versions of TXT and EXE file.
Should you get to the point of starting it and have an error message displayed, please post it, if you have the time. (whole error message in MessageBox body)
|
|||||||||||||||||||||
31 Jul 2010, 21:12 |
|
revolution 31 Jul 2010, 22:18
Why no source?
|
|||
31 Jul 2010, 22:18 |
|
jumpex 31 Jul 2010, 22:27
Tyler wanted the EXE.
I guess that's why. Do you want the source? |
|||
31 Jul 2010, 22:27 |
|
revolution 31 Jul 2010, 22:56
Posting exe's can be troublesome (as you have seen). At least with source we don't have to worry about AVs getting paranoid. And people are better able to point out any improvements in algorithms or techniques, or to learn from others some new things.
|
|||
31 Jul 2010, 22:56 |
|
Madis731 02 Aug 2010, 11:04
Server 2008 R2 x64 says:
"An attempt was made to reference a token that does not exist. cntdnt: SetDlgItemTextA(1008)" when its docked to tray. It doesn't crash, but says it every single time. I guess its some Windows 7 thingy |
|||
02 Aug 2010, 11:04 |
|
jumpex 03 Aug 2010, 22:49
I got this one.
(I removed the error checking for the function and the program works) But it was tested on Windows 7. The lanugage of the OS wasn't english, though. So maybe that's the problem - what's yours? |
|||
03 Aug 2010, 22:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.