I created the PCAsm package for my own purposes (and used it in at least one application). Its purpose is very specific: compilation of assembly text into machine code in memory, with the possibility of subsequent execution of this code during the same session of the application. Sounds unusual, doesn't it? Delphi has its own built-in assembler, and it's pretty good. Unfortunately, it doesn't support macros. There are situations (and I just got one) when it is almost impossible to do without macros. In my case, it was about the need to optimize the code to the limit, if it was possible to configure it for a huge combination of all kinds of input parameters, and it was necessary to choose only one such combination, and exclude all condition checks from the code. It's about checking conditions in deeply nested loops, of course.
This assembler supports all major machine instructions IBP PC 486, Pentium, and even MMX instructions. By the way, one of the options is when, in a nested loop, the same operation should be performed, whenever possible, using MMX instructions from the available set. For different sets, code is written that does the same job, but using different instructions, and then this code is compiled with conditional compilation symbols (symbolic variables, if you like), the value of which is set before calling the compiler depending on the current hardware configuration.
From the point of view of reducing the application code, this approach may even be beneficial in the case when the direct writing out of all possible variants of the code and including them all in the final executable module significantly increases the size of the application due to the large number of variants. Although in my case the options were so great that the direct writing of all the algorithm options, depending on the hardware configuration and other input conditions, that I was physically unable to support all these configurations. Thus, the solution to compile the code into memory "on the fly" turned out to be the only suitable tool.
Perhaps one of the disadvantages of this approach is the need to keep part of the code in the form of source text (taken from an external file or from resources). Compilation also takes some time, although I tried to optimize it whenever possible. And the most unpleasant consequence is that in order to test even the fact of compilation of all code variants, it is necessary to perform extensive testing. Otherwise, a compilation error can occur in an application that has already been submitted to the user, and it can be problematic to fix this error. In general, maybe someone will find some other uses for this package.