2023-03-27 13:40:25 +02:00
.Dd Mar 27 , 2023
2014-09-30 11:37:26 +02:00
.Dt RASM2 1
.Sh NAME
.Nm rasm2
.Nd radare2 assembler and disassembler tool
2009-04-15 11:09:36 +00:00
.Sh SYNOPSIS
2010-03-12 18:46:11 +01:00
.Nm rasm2
2023-03-27 13:40:25 +02:00
.Op Fl ABdDeEfCLvwrNqx
2011-12-02 03:43:08 +01:00
.Op Fl a Ar arch
.Op Fl b Ar bits
2013-06-25 17:35:36 +02:00
.Op Fl c Ar cpu
2015-12-31 14:42:05 +01:00
.Op Fl F Ar in:out
.Op Fl o Ar offset
2018-10-31 11:45:50 +01:00
.Op Fl @ Ar offset
2015-12-31 14:42:05 +01:00
.Op Fl O Ar ofile
2011-12-02 03:43:08 +01:00
.Op Fl s Ar syntax
2013-10-15 01:54:37 +02:00
.Op Fl i Ar int
2011-12-02 03:43:08 +01:00
.Op Fl l Ar int
2010-03-12 18:46:11 +01:00
.Op ARG
2009-04-15 11:09:36 +00:00
.Sh DESCRIPTION
2013-12-31 23:52:46 -08:00
This tool uses r_asm to assemble and disassemble files or hexpair strings. It supports a large list of architectures which can be listed using the \- L flag.
2009-04-15 11:09:36 +00:00
.Pp
.Bl -tag -width Fl
2013-06-25 17:35:36 +02:00
.It Fl a Ar arch
Set architecture plugin
2016-03-04 02:15:36 +01:00
.It Fl A
Show analysis information of given hexpair string
2013-06-25 17:35:36 +02:00
.It Fl b Ar bits
Set architecture bits
.It Fl B
Binary input/output (\- l is mandatory for binary input)
.It Fl c Ar cpu
2013-12-31 23:52:46 -08:00
Select specific CPU (depends on \- a arch)
2013-06-25 17:35:36 +02:00
.It Fl C
Output in C format
2010-03-12 18:46:11 +01:00
.It Fl d
2011-12-02 03:43:08 +01:00
Disassemble hexpair bytes. rasm2 \- d 9090
.It Fl D
Disassemble showing hexpair and opcode
2013-06-25 17:35:36 +02:00
.It Fl e
Use big endian (or swap endianness if used more than once)
2015-12-31 14:42:05 +01:00
.It Fl E
Output disassembled instructions in ESIL format.
2010-03-12 18:46:11 +01:00
.It Fl f
Read data from file instead of ARG.
2011-12-02 03:43:08 +01:00
.It Fl F Ar in:out
2011-12-08 00:23:16 +01:00
Specify input and/or output filters (att2intel, x86.pseudo, ...)
2013-06-25 17:35:36 +02:00
.It Fl h
Show usage help message.
2017-01-16 11:03:06 +00:00
.It Fl hh
Show long help message including supported assembler directives
2011-12-02 03:43:08 +01:00
.It Fl l Ar int
Input/Output length
2013-10-15 01:54:37 +02:00
.It Fl i Ar int
2013-12-31 23:52:46 -08:00
Ignore/skip N bytes from the beginning of the input buffer
2011-12-02 03:43:08 +01:00
.It Fl L
2021-07-25 22:45:41 +02:00
List loaded asm plugins
.It Fl LL
List loaded anal plugins
2022-11-03 08:01:11 +01:00
.It Fl LLL
List loaded arch plugins
2013-06-25 17:35:36 +02:00
.It Fl o Ar offset
Offset of the opcode to assemble (default is 0)
2018-10-31 11:45:50 +01:00
.It Fl @ Ar offset
Alias for -o
2023-03-27 13:40:25 +02:00
.It Fl N
2023-05-28 00:58:20 +02:00
Dont load any plugin, same as R2_NOPLUGINS=1 or r2 -NN
2014-01-26 04:33:21 +01:00
.It Fl O Ar ofile
output to file, for example 'rasm2 \- BF a a.asm'
2017-05-05 11:13:42 +02:00
.It Fl r
Show output in r2 script
2013-06-25 17:35:36 +02:00
.It Fl s Ar syntax
Select syntax output (intel, att)
2013-02-24 21:12:30 +01:00
.It Fl w
Describe opcode (whats op)
2019-03-03 02:51:55 +01:00
.It Fl x
Use hex dwords instead of hexpairs in the assembler output
2016-05-19 00:38:33 +02:00
.It Fl q
Quiet output (handy for -L, -v, ...)
2012-10-22 02:28:42 +02:00
.El
2021-02-04 00:51:53 +01:00
.Sh DIRECTIVES
.Pp
List the supported assembler and preprocessor directives with:
.Pp
$rasm2 -hh
2016-02-16 04:52:12 +01:00
.Pp
.El
2012-10-22 02:28:42 +02:00
.Sh EXAMPLES
.Pp
Assemble opcode:
.Pp
2013-04-16 19:54:26 +02:00
$ rasm2 \- a x86 \- b 32 'mov eax, 33'
2012-10-22 02:28:42 +02:00
.Pp
2013-12-31 23:52:46 -08:00
Disassemble opcode:
2012-10-22 02:28:42 +02:00
.Pp
2013-04-16 19:54:26 +02:00
$ rasm2 \- d 90
2009-04-15 11:09:36 +00:00
.Sh SEE ALSO
.Pp
2021-05-20 03:34:23 +02:00
.Xr radare2(1)
2009-04-15 11:09:36 +00:00
.Sh AUTHORS
.Pp
2013-11-11 12:00:39 +01:00
pancake <pancake@nopcode.org>