logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rasm2 — radare2 assembler and disassembler tool

Authors

       pancake <pancake@nopcode.org>

                                                   Sep 5, 2024                                          RASM2(1)

Description

       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.

       -aarch     Set architecture plugin

       -A          Show analysis information of given hexpair string

       -bbits     Set architecture bits

       -B          Binary input/output (-l is mandatory for binary input)

       -ccpu      Select specific CPU (depends on -a arch)

       -C          Output in C format

       -d          Disassemble hexpair bytes. rasm2 -d 9090

       -D          Disassemble showing hexpair and opcode

       -e          Use big endian (or swap endianness if used more than once)

       -E          Output disassembled instructions in ESIL format.

       -f          Read data from file instead of ARG.

       -Fin:out   Specify input and/or output filters (att2intel, x86.pseudo, ...)

       -h          Show usage help message.

       -hh         Show long help message including supported assembler directives

       -lint      Input/Output length

       -iint      Ignore/skip N bytes from the beginning of the input buffer

       -L          List loaded asm plugins

       -soffset   Offset of the opcode to assemble (default is 0)

       -@offset   Alias for -s

       -N          Dont load any plugin, same as R2_NOPLUGINS=1 or r2 -NN

       -oofile    output to file, for example 'rasm2 -BF a a.asm'

       -r          Show output in r2 script

       -Ssyntax   Select syntax output (intel, att, masm, ...)

       -w          Describe opcode (whats op)

       -x          Use hex dwords instead of hexpairs in the assembler output

       -q          Quiet output (handy for -L, -v, ...)

Directives

       List the supported assembler and preprocessor directives with:

        $rasm2 -hh

Examples

       Assemble opcode:

         $ rasm2 -a x86 -b 32 'mov eax, 33'

       Disassemble opcode:

         $ rasm2 -d 90

Name

       rasm2 — radare2 assembler and disassembler tool

See Also

radare2(1)

Synopsis

rasm2  [-ABdDeEfCLvwrNqx]  [-aarch]  [-bbits] [-ccpu] [-Fin:out] [-ooffset] [-@offset] [-Oofile]
             [-ssyntax] [-iint] [-lint] [ARG]

See Also