---
name: "rasm2"
section: "1"
platform: "linux"
package: "radare2"
version: "6.2.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rasm2"
---

# rasm2(1)

Radare2 Assembler and Disassembler Tool

## NAME

**rasm2** – Radare2 Assembler and Disassembler Tool

## SYNOPSIS

**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\|-*\]

## DESCRIPTION

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

- **-a** *arch*

  Set architecture plugin

- **-A**

  Show analysis information of given hexpair string

- **-b** *bits*

  Set architecture bits (8, 16, 32, 64)

- **-B**

  Binary input/output (-l is mandatory for binary input)

- **-c** *cpu*

  Select specific CPU (depends on -a arch)

- **-C**

  Output in C format

- **-d**

  Disassemble hexpair bytes. rasm2 -d 9090

- **-D**

  Disassemble showing hexpair and opcode

- **-e**

  Use big endian instead of little endian

- **-E**

  Output disassembled instructions in ESIL format

- **-f** *file*

  Read data from file instead of ARG

- **-F** *parser*

  Specify parse plugin to be used (pseudo)

- **-h**

  Show usage help message

- **-hh**

  Show long help message including supported assembler directives

- **-H** \[var\]

  Display variable

- **-i** *len*

  Ignore/skip N bytes from the beginning of the input buffer

- **-j**

  Output in json format

- **-k** *kernel*

  Select operating system (linux, windows, darwin, android, ios, ...)

- **-l** *len*

  Input/Output length

- **-L** \[name\]

  List RArch plugins: (a=asm, d=disasm, e=esil, p=parse)

- **-LL** \[name\]

  List RAsm parse plugins

- **-N**

  Don't load any plugin, same as R2\_NOPLUGINS=1 or r2 -N

- **-o** *ofile*

  Output to file, for example 'rasm2 -Bf a.asm'

- **-p**

  Run SPP over input for assembly

- **-q**

  Quiet output (handy for -L, -v, ...)

- **-r**

  Show output in r2 script

- **-s** *addr*

  Define initial start/seek address (default 0)

- **-@** *addr*

  Alias for -s

- **-S** *syntax*

  Select syntax output (intel, att, masm, ...)

- **-v**

  Show version information

- **-w**

  Describe opcode (what's op)

- **-x**

  Use hex dwords instead of hexpairs in the assembler output

## ENVIRONMENT

- R2\_NOPLUGINS

  Do not load shared plugins (speedup loading)

- R2\_PLUGINS\_ORDER

  Plugin load order: i=internal, e=env, h=home, s=system; default=iehs; ? prints help

- R2\_LOG\_LEVEL

  Change the log level

- R2\_DEBUG

  If defined, show error messages and crash signal

- R2\_DEBUG\_ASSERT

  Enables runtime assertions for debugging

- RASM2\_ARCH

  Same as rasm2 -a

- RASM2\_BITS

  Same as rasm2 -b

## DIRECTIVES

List the supported assembler and preprocessor directives with:

 $ rasm2 -hh

## EXAMPLES

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

## SEE ALSO

[radare2(1)](/radare2/1.md)

## AUTHORS

pancake \<pancake@nopcode.org\>
