flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Tray Defrag

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 20 Dec 2007, 17:56
bitRAKE wrote:
Will windows always restore the process EBX before calling other threads within the process, and WndProcs?
EBX, ESI, EDI and EBP are all safe to use without fear of corruption in Windows API calls.
Post 20 Dec 2007, 17:56
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4073
Location: vpcmpistri
bitRAKE 20 Dec 2007, 17:58
But you are assuming EBX will be zero at the start of a callback routine.

Edit: this is not true - my mistake. Embarassed


Last edited by bitRAKE on 20 Dec 2007, 18:09; edited 1 time in total
Post 20 Dec 2007, 17:58
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 20 Dec 2007, 18:02
bitRAKE wrote:
But you are assuming EBX will be zero at the start of a callback routine.
Oh, callbacks are not included in the above. EBX could be anything during a callback.
Post 20 Dec 2007, 18:02
View user's profile Send private message Visit poster's website Reply with quote
codegrinder



Joined: 12 Dec 2005
Posts: 20
Location: Moldova
codegrinder 20 Dec 2007, 21:30
bitRAKE wrote:
I noticed you use EBX for 0 throughout the program. I don't know if this is a good assumption. Will windows always restore the process EBX before calling other threads within the process, and WndProcs? It is not my understanding that this is true, nor does the calling convention imply it would be so.

Windows preserves ebx, esi and edi registers (edit: and ebp of course). Don't know why is this, but this is true even for Win95. Don't have 64 bit Windows (and 64 bit machine) to test this, almost sure it also does this thing (after seeing Win64 examples from fasm packages). I think this is some C/C++ compiler internal agreement.
Post 20 Dec 2007, 21:30
View user's profile Send private message ICQ Number Reply with quote
codegrinder



Joined: 12 Dec 2005
Posts: 20
Location: Moldova
codegrinder 21 Dec 2007, 00:34
I asked my friend who have got 64 bit PC to help me and we made something like ICQ debugging Smile. Looks like we found where the CPU time is consumed (this was in a loop of testing if file is fragmented), but the problem with exiting still exists. Here is version.


Description:
Download
Filename: defrag.zip
Filesize: 10.69 KB
Downloaded: 899 Time(s)

Post 21 Dec 2007, 00:34
View user's profile Send private message ICQ Number Reply with quote
Dopefish



Joined: 18 Nov 2007
Posts: 10
Dopefish 11 Feb 2008, 12:58
This is actually pretty cool and simple. Has there been any progress to this project since your last post?
Post 11 Feb 2008, 12:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.