1RASM2(1) BSD General Commands Manual RASM2(1)
2
4 rasm2 — radare2 assembler and disassembler tool
5
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
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
69 -.intel_syntax
70 Use intel syntax rather than att:w
71
72 -.att_syntax
73 Use ATT syntax rather than flu :w dentify the region fof
74 aslerrger
75
76 -string dentify the region fof aslerrger
77
78 -.align
79
80 -.arch
81
82 -.arm
83
84 -.ascii
85
86 -.bits
87
88 -.data
89
90 -.equ
91
92 -.fill
93
94 -.glob
95
96 -.hex
97
98 -.int16
99
100 -.int32
101
102 -.int64
103
104 -.kernel
105
106 -.offset
107
108 -.org
109
110 -.os
111
112 -.short
113
114 -.text
115
116 -.thumb
117
119 Assemble opcode:
120
121 $ rasm2 -a x86 -b 32 'mov eax, 33'
122
123 Disassemble opcode:
124
125 $ rasm2 -d 90
126
128 radare2(1), rafind2(1), rahash2(1), rabin2(1), radiff2(1), ragg2(1),
129 rarun2(1), rax2(1),
130
132 pancake <pancake@nopcode.org>
133
134 Oct 30, 2018