Class Assembler

Assembler and disassembler facilities to decode and encode instructions

Hierarchy

  • Assembler

Constructors

Properties

endian: boolean = false
labels: any = {}
pc: NativePointer = ...
program: string = ""
r2: R2Pipe

Methods

  • Parameters

    • x: string

    Returns void

  • Decode (disassemble) an instruction by taking the hexpairs string as input. TODO: should take an array of bytes too

    Parameters

    • s: string

    Returns string

    the mnemonic and operands of the resulting decoding

  • Encode (assemble) an instruction by taking the string representation.

    Parameters

    • s: string

    Returns string

    the hexpairs that represent the assembled instruciton

  • Parameters

    • big: boolean

    Returns void

  • Change the address of the program counter, some instructions need to know where * are they located before being encoded or decoded.

       *
    

    Parameters

    Returns void

Generated using TypeDoc