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

NAME

4     rasm2 — radare2 assembler and disassembler tool
5

SYNOPSIS

7     rasm2 [-ABdDeEfCLvwrNqx] [-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 loaded asm plugins
51
52     -LL         List loaded anal plugins
53
54     -LLL        List loaded arch plugins
55
56     -o offset   Offset of the opcode to assemble (default is 0)
57
58     -@ offset   Alias for -o
59
60     -N          Dont load any plugin, same as R2_NOPLUGINS=1 or r2 -NN
61
62     -O ofile    output to file, for example 'rasm2 -BF a a.asm'
63
64     -r          Show output in r2 script
65
66     -s syntax   Select syntax output (intel, att)
67
68     -w          Describe opcode (whats op)
69
70     -x          Use hex dwords instead of hexpairs in the assembler output
71
72     -q          Quiet output (handy for -L, -v, ...)
73

DIRECTIVES

75     List the supported assembler and preprocessor directives with:
76
77      $rasm2 -hh
78

EXAMPLES

80     Assemble opcode:
81
82       $ rasm2 -a x86 -b 32 'mov eax, 33'
83
84     Disassemble opcode:
85
86       $ rasm2 -d 90
87

SEE ALSO

89     radare2(1)
90

AUTHORS

92     pancake <pancake@nopcode.org>
93
94                                 Mar 27, 2023
Impressum