import os def asm2code_cmd(asm): cmd = f'' cmd = cmd + f'rasm2 -a x86 -b 32 "' + asm + f'"' os.system(cmd) def code2asm_cmd(code): cmd = f'' cmd = cmd + f'rasm2 -a x86 -b 32 -d ' + code os.system(cmd) if __name__ == '__main__': asm2code_cmd("mov eax, 33") code2asm_cmd("b821000000")