An x86 Assembler in 256 LOC (2017)
(2017)<p>It&#x27;s probably worth noting that this is only a runtime assembler, i.e. it does no parsing. It also doesn&#x27;t support all of the addressing modes for the instructions that it does support. Nonetheless it does show that assemblers aren&#x27;t that hard. Adding support for the various addressing modes and amd64 does complicate things but not too badly. Moving forward from this you&#x27;d probably want a better scheme for handling the various &quot;extra&quot; bytes (SIB, REX, etc.).