flat assembler
Message board for the users of flat assembler.

Index > Windows > Learning fasm from masm

Goto page Previous  1, 2, 3, 4, 5, 6
Author
Thread Post new topic Reply to topic
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 10 Oct 2012, 12:35
AsmGutu62, the switching overhead is probably not nearly the biggest problem, the big problem is that code executing in one thread stops, possibly polluting the cache and it has to cache everything again and start from where it was left. Most often loops are optimized to run in cache.
Post 10 Oct 2012, 12:35
View user's profile Send private message Reply with quote
randall



Joined: 03 Dec 2011
Posts: 155
Location: Poland
randall 10 Oct 2012, 18:12
What you described is switching overhead Smile
Post 10 Oct 2012, 18:12
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 10 Oct 2012, 20:30
Overhead deals with the obvious code needed to switch threads. Cache pollution is not detectable and has no overhead it is just a side effect and is not always the case, pollution doesnt always happen so it can't be part of any overhead. It is just magic bads.
Post 10 Oct 2012, 20:30
View user's profile Send private message Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 11 Oct 2012, 14:26
I would be pleased to know where I can find include files for GDI+.. I really don't want to be stuck with GDI32 all the time Smile

Never mind I found them in that package I mentioned in an earlier post.
Post 11 Oct 2012, 14:26
View user's profile Send private message Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 11 Oct 2012, 23:08
I wonder if it pays off to create threads one time and keep them for the entire duration of the program or if it pays off to create them as needed and exitthread when it's done.
Post 11 Oct 2012, 23:08
View user's profile Send private message Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 12 Oct 2012, 02:49
Can anyone teach me how I can declare global data from within a macro, without using any of the global macros already created, I want to learn to do it myself. How can I put something in my .data section from within a macro?
Post 12 Oct 2012, 02:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 12 Oct 2012, 03:30
nmake wrote:
Can anyone teach me how I can declare global data from within a macro, without using any of the global macros already created, I want to learn to do it myself. How can I put something in my .data section from within a macro?
Have a look here:

http://board.flatassembler.net/topic.php?t=12012
Post 12 Oct 2012, 03:30
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: 20454
Location: In your JS exploiting you and your system
revolution 12 Oct 2012, 03:31
nmake wrote:
I wonder if it pays off to create threads one time and keep them for the entire duration of the program or if it pays off to create them as needed and exitthread when it's done.
Thread pools are a common method used by many programs. But as to whether it "pays" to use them is application dependant. It all depends upon what you are doing and how you are doing it.


Last edited by revolution on 12 Oct 2012, 12:30; edited 1 time in total
Post 12 Oct 2012, 03:31
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 12 Oct 2012, 12:16
Using data definition in macros is something I am familiar with, but if you combine code and data in the macro, how would you go about defining global data in the macro? If you use the macro only in the code section, how can you move any data defined in the macro to the .data section Smile
Post 12 Oct 2012, 12:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 12 Oct 2012, 12:27
nmake wrote:
Using data definition in macros is something I am familiar with, but if you combine code and data in the macro, how would you go about defining global data in the macro? If you use the macro only in the code section, how can you move any data defined in the macro to the .data section Smile
You can build lists, using macros to store the list, of things (data definitions) and then later place the list of things all together into one place (in a data section).

http://board.flatassembler.net/topic.php?t=12012
Post 12 Oct 2012, 12:27
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 13 Oct 2012, 01:26
Those macros are a bit complex because I have barely begun using fasm macros. Could you teach me in extremely simple and readable terms how to declare global data from within a macro. Could you simplify it as much as possible and make it as readable as possible and comment each line to tell me what it does? Smile
Post 13 Oct 2012, 01:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 13 Oct 2012, 01:32
See the last code section of the first post:

http://board.flatassembler.net/topic.php?t=12012
Post 13 Oct 2012, 01:32
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 13 Oct 2012, 14:11
What are double backslashes used for? Is it to produce a single backslash?
Post 13 Oct 2012, 14:11
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 13 Oct 2012, 14:24
nmake wrote:
What are double backslashes used for? Is it to produce a single backslash?
http://flatassembler.net/docs.php
Post 13 Oct 2012, 14:24
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 13 Oct 2012, 15:11
How can I watch what the preprocessor produces after compiling? I need to see what it actually does with my macros.
Post 13 Oct 2012, 15:11
View user's profile Send private message Reply with quote
mindcooler



Joined: 01 Dec 2009
Posts: 423
Location: Västerås, Sweden
mindcooler 13 Oct 2012, 15:48
Compile with TOOLS\WIN32\PREPSRC.ASM
Post 13 Oct 2012, 15:48
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 13 Oct 2012, 16:02
Does SignalAndWait actually sleep the calling thread after it has signalled the other object?
Post 13 Oct 2012, 16:02
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 13 Oct 2012, 16:15
nmake wrote:
Does SignalAndWait actually sleep the calling thread after it has signalled the other object?
This a good time to ask MSDN:

http://msdn.microsoft.com/en-us/library/system.threading.waithandle.signalandwait.aspx
Post 13 Oct 2012, 16:15
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 192
nmake 13 Oct 2012, 17:19
I meant SignalObjectAndWait of course Smile

The one you refer to is a .NET function which is not exactly that useful for assembly programmers. But it is okay. I've read it dozen of times before but ms docs is not very complete that is why I ask here. I use msdn every day.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686293(v=vs.85).aspx
Post 13 Oct 2012, 17:19
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, 3, 4, 5, 6

< 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.