title: Closer-to-the-metal alternative assembler syntax for x86?
body: <p>I'm trying to write a small 8086+ assembler, probably real mode only, and can settle for a large subset of the possible instructions.</p>
  
  <p>The x86 instructions are complex and requires a complex table solution, which is fine but I want something smaller/simpler.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Things I already looked into:</p>
  
  <ul>
  <li><p>AT&amp;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.</p></li>
  <li><p>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.</p></li>
  <li><p>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.</p>
  
  <p>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.</p></li>
  </ul>