1RASM2(1)                  BSD General Commands Manual                 RASM2(1)
2

NAME

4     rasm2 — radare2 assembler and disassembler tool
5

SYNOPSIS

7     rasm2 [-ABdDeEfCLvwrqx] [-a arch] [-b bits] [-c cpu] [-F in:out]
8           [-o offset] [-@ offset] [-O ofile] [-s syntax] [-i int] [-l int]
9           [ARG]
10

DESCRIPTION

12     This tool uses r_asm to assemble and disassemble files or hexpair
13     strings. It supports a large list of architectures which can be listed
14     using the -L flag.
15
16     -a arch     Set architecture plugin
17
18     -A          Show analysis information of given hexpair string
19
20     -b bits     Set architecture bits
21
22     -B          Binary input/output (-l is mandatory for binary input)
23
24     -c cpu      Select specific CPU (depends on -a arch)
25
26     -C          Output in C format
27
28     -d          Disassemble hexpair bytes. rasm2 -d 9090
29
30     -D          Disassemble showing hexpair and opcode
31
32     -e          Use big endian (or swap endianness if used more than once)
33
34     -E          Output disassembled instructions in ESIL format.
35
36     -f          Read data from file instead of ARG.
37
38     -F in:out   Specify input and/or output filters (att2intel, x86.pseudo,
39                 ...)
40
41     -h          Show usage help message.
42
43     -hh         Show long help message including supported assembler direc‐
44                 tives
45
46     -l int      Input/Output length
47
48     -i int      Ignore/skip N bytes from the beginning of the input buffer
49
50     -L          List supported asm plugins
51
52     -o offset   Offset of the opcode to assemble (default is 0)
53
54     -@ offset   Alias for -o
55
56     -O ofile    output to file, for example 'rasm2 -BF a a.asm'
57
58     -r          Show output in r2 script
59
60     -s syntax   Select syntax output (intel, att)
61
62     -w          Describe opcode (whats op)
63
64     -x          Use hex dwords instead of hexpairs in the assembler output
65
66     -q          Quiet output (handy for -L, -v, ...)
67

DIRECTIVES

69     List the supported assembler and preprocessor directives with:
70
71      $rasm2 -hh
72

EXAMPLES

74     Assemble opcode:
75
76       $ rasm2 -a x86 -b 32 'mov eax, 33'
77
78     Disassemble opcode:
79
80       $ rasm2 -d 90
81

SEE ALSO

83     radare2(1), rafind2(1), rahash2(1), rabin2(1), radiff2(1), ragg2(1),
84     rarun2(1), rax2(1),
85

AUTHORS

87     pancake <pancake@nopcode.org>
88
89                                 Oct 30, 2018
Impressum