1 enum X86_CODE32 = cast(ubyte[])"\x75\x01"; 2 auto cs = new CapstoneX86(ModeFlags(Mode.bit32)); 3 4 // Customize mnemonic JNE to JNZ 5 cs.customMnemonic(X86InstructionId.jne, "jnz"); 6 7 foreach(instr; cs.disasm(X86_CODE32, 0x1000)) 8 writefln("%s\t%s", instr.mnemonic, instr.opStr); 9 10 // Reset engine to use the default mnemonic of JNE 11 cs.customMnemonic(X86InstructionId.jne); 12 13 foreach(instr; cs.disasm(X86_CODE32, 0x1000)) 14 writefln("%s\t%s", instr.mnemonic, instr.opStr);
Defines a custom mnemonic for a specified instruction id