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 loaded asm plugins
51
52 -LL List loaded anal plugins
53
54 -o offset Offset of the opcode to assemble (default is 0)
55
56 -@ offset Alias for -o
57
58 -O ofile output to file, for example 'rasm2 -BF a a.asm'
59
60 -r Show output in r2 script
61
62 -s syntax Select syntax output (intel, att)
63
64 -w Describe opcode (whats op)
65
66 -x Use hex dwords instead of hexpairs in the assembler output
67
68 -q Quiet output (handy for -L, -v, ...)
69
71 List the supported assembler and preprocessor directives with:
72
73 $rasm2 -hh
74
76 Assemble opcode:
77
78 $ rasm2 -a x86 -b 32 'mov eax, 33'
79
80 Disassemble opcode:
81
82 $ rasm2 -d 90
83
85 radare2(1)
86
88 pancake <pancake@nopcode.org>
89
90 Jul 25, 2021