AED(1) General Commands Manual AED(1)

aedanton's encoder decoder

aed [-136Sd] [-c cpu] [-M disassembler] [-s symbol] [path]

aed -l

The aed utility decodes the x86 instruction set architecture. By default, input is read from standard input. The following file formats are recognized:

The options are as follows:

Disassemble in 16-bit mode.
Disassemble in 32-bit mode.
Disassemble in 64-bit mode. (default)
cpu
Disassemble targeting cpu. See option -l for all available CPU types. Defaults to latest.
Disassemble all executable sections found in the input files. (default)
List all available CPU types.
disassembler
Disassembler options, the following values are recognized:
assembly
Serialized disassembled instruction as assembly using the Intel® syntax. Intended to be feed to an assembler.
encoder
Show how to encode each disassembled instruction using the aed_x86_encoder(3) API.
intel
Serialize disassembled instructions using the Intel® syntax. (default)
sdm
Serialize disassembled instructions using the Intel® Software Development Manual (SDM) syntax.
Display source code interleaved with the disassembly, implies -d. Source code lines are prefixed with ‘;’, followed by the source code line number. The line number may be prefixed with a symbol name, indicating that the corresponding line originates from an inlined symbol. All instructions following a source code line are associated with the same line, up to the next source code line.
symbol
Only disassemble symbol.
path
Path to input file.

Disassemble an ELF binary:

$ aed -d `which aed`

Disassemble instructions in hexadecimal format:

$ echo 0000 0x90 | aed -d

Disassemble instructions in raw format:

$ printf '\x00\x00\x90' | aed -d

The aed utility exits 0 on success, and >0 if an error occurs.

Anton Lindqvist <anton@basename.se>

OpenBSD 7.8 October 1, 2024 AED(1)