computer_enhance icon indicating copy to clipboard operation
computer_enhance copied to clipboard

Linux build script and some platform code fixes for Linux.

Open mcourteaux opened this issue 2 years ago • 0 comments

This is a minimal PR because I was holding off on doing more, as I'd like to ask first before pouring the work in. I had some issues:

  • the trick with #pragma comment (lib, "....") needs the .a extension on Linux. On macOS this is again going to be different. Would be nice if there is a cleaner way to do this for all platforms at once.
  • the ABI for System V is different, so I was wondering how to deal with those different calling conventions in terms of files. I could create a listing_...._linux.asm for all the listings that need translating (all I guess, as there is the Count and Buffer argument). Or is there a more clever trick or way to do this. I was looking into symbolic registers in nasm where you could use custom register names like "count" and "pointer", and then have them preprocessor-style be filled in with either "rsi", "rdi", "rdx", "rcx", depending on the calling convention. I don't know if nasm supports such things.

mcourteaux avatar Feb 29 '24 13:02 mcourteaux