flat assembler
Message board for the users of flat assembler.

Index > Main > Generic Programming in Assembly

Author
Thread Post new topic Reply to topic
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin 09 Sep 2005, 13:37
Hello guys, I realise this is a double post and I don't like doing such things, but I also suspect that alot of people don't browse both forums so I thought I'd post this here as well, it is very specific to FASM after all.

I'm not sure how well received this sort of thing would be in assembly but I've been putting together some generic data structures and algos using FASMs very powerful macro systems.

That way it works is that you write code for say a linked list and instead of trying to make it reusable by having nodes contain pointers to the data they hole, instead the data is stored directly in with the node and the templates generate different functions specific for each type of data.

The real advantage of this is in algorithms where instead of relying on callbacks functions to deal with different data types the macros generate a specific version of the algorithm for each type of data. This avoids the overhead of callbacks which can be particularly bad because they require indirect calls (well I think they do).

The problem is though that I've had to make too many design decisions, and quite frankly I'm just not experienced enough to be making them. So while I'm not abandoning this little project, I'm just not sure how much further I can take myself.

I encourage people to check out the quick webpages I've put together, in particular read the design decisions page which describes some of the problems I've come across.

Also look at the source and ask questions about what is going on internally because I haven't documented that yet.

P.S. This is heavily influenced by the STL for C++.
Post 09 Sep 2005, 13:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


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