Message board for the users of flat assembler.
> Main > Generic Programming in Assembly
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++.
|09 Sep 2005, 13:37||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.