You're welcome, John.
Though the
assembl.c and
asmserv.c files are still bearing their original Olly names, they have been revised to contain code that's only relevant to assembler. It also includes my debug helper functions that enable you to inspect the assembly process in your console. Those can be safely deleted or better compiled conditionally in order to reduce the DLL size. Moreover, the project doesn't need -O3 optimization and can be compiled with a -Os (optimize for size) switch to minify the DLL still further. The resultant machine code isn't dependent on source code optimization and the compilation speed will stay very high regardless. Finally, exepacking the resultant DLL with
UPX in a
-force --ultra-brute mode will make it absolutely tiny.
If Charles or somebody else in the know agrees to develop the stub functions, here's an absolute minimum of what should be done:
1. Memory allocation in Build() should be changed from HeapAlloc() to VirtualAlloc() with a WRITABLE attribute that should then be changed again to READABLE+EXECUTABLE once the compilation process is successfully over. This will enable you to bypass the existing DEP restrictions.
2. Alternatively, the Build() function's buffer which is always 64KB large may be memcpy-ed into a buffer of exact size VirtualAlloc-ated by the procedure that's supposed to call Build() on the SB side. The exact byte size of resultant machine code is returned by Build() on successful compilation. The pointer to the 64KB buffer may be returned in an additional argument to the function and should be free-d on copying.
3. The call-by-pointer stub functions should be variadic to allow for an arbitrary number of arguments to be passed to the JIT assembled routines. The machine code entry pointer value is returned in the second argument to Build().
4. The last argument to Build() was meant for syncing the line numbers in the FBSL source script with the debug output in the compilation console. It may be omitted if this functionality is irrelevant to SB.