2024-10-03 10:48:06 -04:00
2024-10-03 10:48:06 -04:00
2024-10-03 10:48:06 -04:00
2024-10-03 10:48:06 -04:00

xiasma

xiasma -- I'm not sure what this is, even tho I wrote it, but it can assemble ugly bytecode into IA32e instructions.
xiasma -- For some reason, I wrote it to be as "branchless" as possible, but there is one loop and some hidden conditionals.
xiasma -- Printing will be removed, I added it because it looked cool, even tho it slows things down by small amount. \

Here's the idea behind this project: You want to make an assembler or a compiler, but don't want to do machine code by yourself (unlike me), you want to use some library. LLVM is good but huge, QBE is great but unique, using GAS, NASM, MASM, fasm (best assembler ever) feels like cheating to you for whatever reason. You don't want your project to depend on big dependency, ideally it would be header-only library, static linking, 64-bit Intel/AMD CPUs only, tiny and "fast". This isn't the solution, there's no good solution to this... You'll be able to make an assembler or a compiler, at the cost of depending on 'xiasma' and 'xtandard', but not production ready one, just a toy / hobby one.

Install: $ sudo sh install.sh
Example: $ cd example && sh compile.sh \

Disclaimer:

  • This library was written mainly for my own projects, but you can repurpose it for your own needs...
  • Goal of this header-only library is to prototype various programming and assembly languages fast for only one architecture.
  • You don't want to fool around with global variables here, it can introduce subtle undetectable bugs into machine code.
  • You do want to fool around with everything else, and notify me if there are bugs or illegal instructions were generated.

Advantages: Definitely small, low memory usage, somewhat fast (I didn't benchmark it), prints "assembled" instructions...

Disadvantages: Only one architecture is supported, instruction-support is incomplete, codebase is very weird, even for my standards...

Description
No description provided
Readme 47 KiB
Languages
C 99.6%
Shell 0.4%