RASM2(1)
π RASM2(1) β bestie, you're reading the rasm2(1) manual page π
Okay so. Hi. You opened the man page for rasm2, the Radare2 Assembler and Disassembler Tool, and I am about to make this the best part of your day. Grab a lil snack π, we're going in.
πΈ NAME πΈ
rasm2 β the Radare2 Assembler and Disassembler Tool. That's her. That's the whole girl. She assembles, she disassembles, she does both in like forty architectures, no big deal. π
β¨ SYNOPSIS β¨
rasm2 [-ACdDehHjLvwrNqxp] [-a arch] [-b bits] [-c cpu] [-F parser]
[-k kernel] [-o ofile] [-s addr] [-@ addr] [-S syntax] [-i len]
[-l len] [code|hex|-]
Like, that looks like a lot but it's literally just a bunch of little flags vibing next to each other. You got this. π«Ά
π¦ DESCRIPTION π¦
So what does she do? She assembles and disassembles code or hexpair strings for multiple architectures and syntax formats. That's the whole vibe. Type assembly in, get bytes out. Type bytes in, get assembly out. Multiple architectures. Multiple syntaxes. She's versatile, she's booked, she's busy. π
Now β the flags. Every. Single. One. Because we do not gatekeep here. π
-aarch β Set architecture plugin. This is you telling her which CPU family you're flirting with today.-Aβ Show analysis information of given hexpair string. She'll look at your hexpairs and tell you what she thinks. Perceptive queen.-bbits β Set architecture bits. Your options are8,16,32,64.-Bβ Binary input/output. β οΈ Heads up bestie:-lis mandatory for binary input. Don't skip it, she will not be happy.-ccpu β Select specific CPU. Now this one depends on-a arch, so set your arch first, okay? Don't be chaotic.-Cβ Output in C format. If you're a C girlie, this one's for you.-dβ Disassemble hexpair bytes. Like,rasm2 -d 9090. Run it, it's cute.-Dβ Disassemble showing hexpair and opcode. Both. Because why choose.-eβ Use big endian instead of little endian. Yes, endianness discourse still exists in 2025, I don't make the rules.-Eβ Output disassembled instructions in ESIL format. ESIL girlies rise up β¨-ffile β Read data from file instead of ARG. Feeding her from a file instead of the command line, very demure.-Fparser β Specify parse plugin to be used (here,pseudo).-hβ Show usage help message. The classic. The og. Use it.-hhβ Show long help message including supported assembler directives. Double h, double the lore.-H[var]β Display variable.-ilen β Ignore/skip N bytes from the beginning of the input buffer. Just, like, skip past them. Ignore them. As one does. π-jβ Output in json format. For my machine-readable besties.-kkernel β Select operating system, likelinux,windows,darwin,android,ios,...β yes, the list literally trails off with..., she's mysterious like that.-llen β Input/Output length.-L[name]β List RArch plugins: (a=asm,d=disasm,e=esil,p=parse).-LL[name]β List RAsm parse plugins. Yeah, two Ls. Different thing. Iconic, honestly.-Nβ Don't load any plugin. Same asR2_NOPLUGINS=1orr2 -N(iykyk).-oofile β Output to file, for example'rasm2 -Bf a.asm'. Note how-Band-fare snuggled together there, cute.-pβ Run SPP over input for assembly.-qβ Quiet output. Handy for-L,-v,....-rβ Show output in r2 script.-saddr β Define initial start/seek address. Default is0.-@addr β Alias for-s. Same thing, different key, we love options.-Ssyntax β Select syntax output, likeintel,att,masm,...again with the mysterious trailing dots. She contains multitudes.-vβ Show version information.-wβ Describe opcode (what's op).-xβ Use hex dwords instead of hexpairs in the assembler output. Dwords! Not hexpairs! Do not confuse them, I'm begging.
π ENVIRONMENT π
The vibes she reads from her environment. Very much "the room she's in shapes who she is." π
R2_NOPLUGINSβ Do not load shared plugins (this speeds up loading).R2_PLUGINS_ORDERβ Plugin load order:i=internal,e=env,h=home,s=system; default isiehs;?prints help. Yeah she has a little language for this, it's giving code, it's giving ciphers, obsess.R2_LOG_LEVELβ Change the log level.R2_DEBUGβ If defined, show error messages and crash signal.R2_DEBUG_ASSERTβ Enables runtime assertions for debugging.RASM2_ARCHβ Same asrasm2 -a.RASM2_BITSβ Same asrasm2 -b.
π DIRECTIVES π
Wanna see the supported assembler and preprocessor directives? Listing them is literally just:
$ rasm2 -hh
That's it. That's the whole flex. β¨
π EXAMPLES π
Okay this is the fun part, the part where we do things. No cap, just copy-paste.
Assemble opcode:
$ rasm2 -a x86 -b 32 'mov eax, 33'
Disassemble opcode:
$ rasm2 -d 90
Show all supported architectures:
$ rasm2 -L
Assemble with specific syntax:
$ rasm2 -a x86 -b 32 -S att 'mov eax, 33'
Output in JSON format:
$ rasm2 -j -a x86 -b 32 'mov eax, 33'
Use big endian:
$ rasm2 -e -a arm -b 32 'add r0, r0, r1'
Disassemble and show ESIL output:
$ rasm2 -d -E 90
π₯ SEE ALSO π₯
radare2(1)β her big sister, the main character herself π
π§ AUTHORS π§
pancake <pancake@nopcode.org> β the legend who made all of this happen. Respect. π
π that's the whole page bestie, go assemble something iconic
Sign-off time: this was RASM2(1), dated Jul 10, 2025 β so if you're reading this way later, that's the version vibe you're on. Slay, bye! πΈπβ¨
π¦ where this page comes from
- alpine 3.24: radare2-doc 6.1.6-r0 Β· GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: radare2 6.2.2-1 Β· GPL-3.0-only AND LGPL-3.0-only
- nixos 26.05: radare2 6.1.8
- nixpkgs unstable: radare2 6.2.4
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 Β· GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 Β· GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 Β· GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 Β· GPL-3.0-only AND LGPL-3.0-only
- ubuntu stonking: radare2 6.1.8+ds-1 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms