RZ-ASM(1)
πΈ NAME πΈ
okay so, bestie, this is rz-asm β the rizin assembler and disassembler tool, and yes, this is the manual page for RZ_ASM(1). π
β¨ SYNOPSIS β¨
the whole vibe in one line, no cap:
rz-asm [-ABCdDeIEhjLpqrvxw] [-a arch] [-b bits] [-m plugin] [-c CPU]
[-O file] [-o addr] [-@ addr] [-f file] [-F in:out] [-i len]
[-k kernel] [-s syntax] [-l len]
π DESCRIPTION π
okay so this command is part of the Rizin project. π«Ά
This tool uses RzAsm to assemble and disassemble files or hexpair strings. It supports a large list of architectures which can be listed using the -L flag. β¨
π© flags, flags, flags π©
-a archβ Set architecture to assemble/disassemble (see-L)-Aβ Show analysis information from given hexpairs-b bitsβ Set CPU register size (8, 16, 32, 64) (RZ_ASM_BITS)-Bβ Binary input/output (-lis mandatory for binary input)-c CPUβ Select specific CPU (depends on the arch)-Cβ Output in C format-d,-Dβ Disassemble from hexpair bytes (-Dshow hexpairs)-eβ Use big endian instead of little endian-Iβ Display lifted RzIL code (same input as in-d, IL is also validated)-Eβ Display ESIL expression (same input as in-d)-f fileβ Read data from file-F in:outβ Specify input and/or output filters (att2intel,x86.pseudo, ...)-h,-hhβ Show usage help message,hhfor long-i lenβ Ignore N bytes of the input buffer-jβ Output in JSON format-k kernelβ Select operating system (linux,windows,darwin, ..)-l lenβ Input/Output length-Lβ List asm plugins: (a=asm,d=disasm,A=analyze,e=ESIL)-m pluginβ List supported CPUs for the chosen plugin-o,-@ addrβ Set start address for code (default0)-O fileβ Output file name (rz-asm -Bf a.asm -O a)-pβ Run SPP over input for assembly-qβ Quiet mode-rβ Output in rizin commands-s syntaxβ Select syntax (intel,att)-vβ Show version information-xβ Use hex dwords instead of hex pairs when assembling-wβ Describe opcode
π Directives π
these are the little dot-directives, and they are lowkey iconic:
.intel_syntaxβ Use Intel syntax rather than AT&T.att_syntaxβ Use AT&T syntax rather than Intel.align numberβ Set the code or data alignment.arch nameβ Set the code architecture.armβ Set the ARM mode (as opposed to Thumb) for ARM architecture.ascii stringβ Define the ASCII string.asciz stringβ Define the zero-ending ASCII string.bits numberβ Define the code bitness.big_endianβ Set the BE (big endian) byte order.cpu nameβ Set the CPU for the chosen architecture.dataβ Mark the start of the data section.endian 1|0β Set the endianness (the byte order) β1is BE,0is LE.equ name valueβ Define the constant.fill repeat,size,valueβ Fill the data with the repeating value pattern.hex dataβ Define the data in hexadecimal format.incbin filenameβ Include binary file.int16 numberβ Define 16-bit integer.int32 numberβ Define 32-bit integer.int64 numberβ Define 64-bit integer.kernel nameβ Set the kernel for syscalls.little_endianβ Set the LE (little endian) byte order.org valueβ Set the value of the PC (Program Counter) register.os nameβ Set the operating system for syscalls.short numberβ Define 16-bit integer.string stringβ Define the ASCII string.textβ Mark the start of the text section.thumbβ Set the Thumb mode (as opposed to ARM) for ARM architecture
π¦ ENVIRONMENT π¦
the env var squad, bestie:
RZ_ARCH:e asm.arch- architecture to assemble/disassemble (same asrz-asm -a)RZ_ASM_ARCH: architecture to assemble/disassemble (same asrz-asm -a)RZ_ASM_BITS: cpu register size (8, 16, 32, 64) (same asrz-asm -b)RZ_BITS:e asm.bits- cpu register size (8, 16, 32, 64) (same asrz-asm -b)RZ_DEBUG: if defined, show error messages and crash signal0RZ_NOPLUGINS: do not load shared plugins (speedup loading)0
π₯ EXAMPLES π₯
Assemble opcode:
rz-asm -a x86 -b 32 'mov eax, 33'
Disassemble opcode:
rz-asm -d 90
π SEE ALSO π
the whole squad: rizin(1), rz-find(1), rz-hash(1), rz-bin(1), rz-diff(1), rz-gg(1), rz-run(1), rz-ax(1)
π AUTHORS π
pancake <pancake@nopcode.org>byteninjaa0
π that's the whole page, bestie β RZ_ASM(1), dated Jan 22, 2024, signing off. πβ¨
π¦ where this page comes from
- arch rolling: rizin 0.8.2-2 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-PDDC AND CC0-1.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND MIT
- nixos 26.05: rizin 0.8.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms