I tried doing something similar ~5 years ago. https://github.com/rikkimax/alphacodegen/tree/master/manuscript/targets/x86/instructions I found the instruction database to be one of the hardest parts to it.