Create Native Machine Code

The Wolfram Compiler can generate output in a variety of native machine code formats, in particular, different kinds of assemblers. A standalone file can be created using FunctionCompileExport, or the string representation can be created using FunctionCompileExportString.

The following is a trivial function to add one to an integer.

Obtain the assembler code for the current platform, on this machine "MacOSX-x86-64".

Using FunctionCompileExport with a file that has extension ".s" will automatically export an assembly file.

Printing the contents of the file shows that it is identical to the output returned previously.

Related Examples

de es fr ja ko pt-br zh