RASM2(1) General Commands Manual RASM2(1)

rasm2Radare2 Assembler and Disassembler Tool

rasm2 [-ACdDehHjLvwrNqxp] [-a arch] [-b bits] [-c cpu] [-F parser] [-k kernel] [-o ofile] [-s addr] [-@ addr] [-S syntax] [-i len] [-l len] [code|hex|-]

Assembles and disassembles code or hexpair strings for multiple architectures and syntax formats.

arch
Set architecture plugin
Show analysis information of given hexpair string
bits
Set architecture bits (8, 16, 32, 64)
Binary input/output (-l is mandatory for binary input)
cpu
Select specific CPU (depends on -a arch)
Output in C format
Disassemble hexpair bytes. rasm2 -d 9090
Disassemble showing hexpair and opcode
Use big endian instead of little endian
Output disassembled instructions in ESIL format
file
Read data from file instead of ARG
parser
Specify parse plugin to be used (pseudo)
Show usage help message
Show long help message including supported assembler directives
[var]
Display variable
len
Ignore/skip N bytes from the beginning of the input buffer
Output in json format
kernel
Select operating system (linux, windows, darwin, android, ios, ...)
len
Input/Output length
[name]
List RArch plugins: (a=asm, d=disasm, e=esil, p=parse)
[name]
List RAsm parse plugins
Don't load any plugin, same as R2_NOPLUGINS=1 or r2 -N
ofile
Output to file, for example 'rasm2 -Bf a.asm'
Run SPP over input for assembly
Quiet output (handy for -L, -v, ...)
Show output in r2 script
addr
Define initial start/seek address (default 0)
addr
Alias for -s
syntax
Select syntax output (intel, att, masm, ...)
Show version information
Describe opcode (what's op)
Use hex dwords instead of hexpairs in the assembler output

Do not load shared plugins (speedup loading)
Plugin load order: i=internal, e=env, h=home, s=system; default=iehs; ? prints help
Change the log level
If defined, show error messages and crash signal
Enables runtime assertions for debugging
Same as rasm2 -a
Same as rasm2 -b

List the supported assembler and preprocessor directives with:


$ rasm2 -hh

Assemble opcode:


$ rasm2 -a x86 -b 32 'mov eax, 33'

Disassemble opcode:


$ rasm2 -d 90

Show all supported architectures:


$ rasm2 -L

Assemble with specific syntax:


$ rasm2 -a x86 -b 32 -S att 'mov eax, 33'

Output in JSON format:


$ rasm2 -j -a x86 -b 32 'mov eax, 33'

Use big endian:


$ rasm2 -e -a arm -b 32 'add r0, r0, r1'

Disassemble and show ESIL output:


$ rasm2 -d -E 90

radare2(1)

pancake <pancake@nopcode.org>

July 10, 2025