---
name: "rasm"
section: "1"
platform: "linux"
package: "radare-common"
version: "1:1.5.2-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/rasm"
---

# rasm(1)

Radare patch assembler

## NAME

**rasm** – Radare patch assembler

## SYNOPSIS

**rasm** \[-elvV\] \[-f file\] \[-d bytes\] \[-s offset\] \[-a arch\] \[opcode\]

## DESCRIPTION

Instruction assembler for multiple architectures for easily and fast writing patch opcodes

You can get the list of the supported opcodes with the '-l' flag.

- **-v**

  Enable debug output

- **-f** *file*

  Compile assembly output from file

- **-d** *bytes*

  Disasemble bytes

- **-e**

  Use big endian

- **-s** *offset*

  Setup an offset to change the base address for the relative jumps

- **-a** *arch*

  Set a different architecture (x86, ppc, arm, java)

- **-h**

  Show usage help message.

## OPCODES

- call \[addr\]

  call to address

- jmp \[addr\]

  perform a relative or absolute jump

- jz \[addr\]

  conditional jump (jump if result is zero)

- jnz \[addr\]

  conditional jump (jump if result is not zero)

- trap

  Trap instruction (breakpoint)

- nop

  Nop instruction

- push \[arg\]

  Push a number or register into the stack

- pop \[arg\]

  Pop a value from stack and store it in register arg

- int \[num\]

  Call the kernel using an interrupt or syscall

- ret

  return from subroutine

- ret0

  return 0 from subroutine

- hang

  perform an infinite loop (hang on)

- mov \[dst\], \[src\]

  moves an inmediate to a register

## SEE ALSO

[radiff(1)](/radiff/1.md), hasher(1), [radare(1)](/radare/1.md), [radarerc(5)](/radarerc/5.md), [rabin(1)](/rabin/1.md), [rfile(1)](/rfile/1.md), [xc(1)](/xc/1.md), [rsc(1)](/rsc/1.md), [rasc(1)](/rasc/1.md), [xrefs(1)](/xrefs/1.md)

## AUTHORS

pancake \<@youterm.com\>
