I'm trying to write a small 8086+ assembler, probably real mode only, and can settle for a large subset of the possible instructions.
The x86 instructions are complex and requires a complex table solution, which is fine but I want something smaller/simpler.
One of my ideas is to start with the opcodes and make an alternative set of mnemonics/addressing modes/registers that more closely relates to the actual machine instructions.
Has this been done and where can I read about it? My gut feeling says that this must have been done this already, but I can't find anything online.
Things I already looked into:
AT&T syntax: does not solve the problem, you still need a complex table lookup; in the end it is basically the same as Intel syntax.
CRASM512.ASM: a cool 512 bytes trick assembler. Very impressive, but not useable (and not meant to be). The syntax is still based on Intel, as well.
Using only a subset of "homogenously encoded" instructions. This is what I'm currently trying, and using a smaller and less complex table driven approach than a full-fledged x86 assembler.
The problem is that I still need to check for invalid instructions, and x86 is complex enough that I can only make the table driven approach a little bit simpler, not simple. So it is 90% of the complexity for 10% of the result, because it's mostly the tables that changes compared to the real deal.