miasm
Reverse engineering framework
miasm.arch.msp430.arch Namespace Reference

Classes

class  additional_info
 
class  bs_cond_off_d
 
class  bs_cond_off_s
 
class  bw_mn
 
class  instruction_msp430
 
class  mn_msp430
 
class  msp430_arg
 
class  msp430_dreg_arg
 
class  msp430_offs
 
class  msp430_sreg_arg
 

Functions

def cb_deref_nooff (tokens)
 
def cb_deref_pinc (tokens)
 
def cb_deref_off (tokens)
 
def cb_expr (tokens)
 
def addop (name, fields, args=None, alias=False)
 

Variables

 log = logging.getLogger("msp430dis")
 
 console_handler = logging.StreamHandler()
 
list conditional_branch
 
list unconditional_branch = ['jmp']
 
 ARO = Suppress("@")
 
 LPARENT = Suppress("(")
 
 RPARENT = Suppress(")")
 
 PINC = Suppress("+")
 
tuple deref_nooff = (ARO + base_expr).setParseAction(cb_deref_nooff)
 
tuple deref_pinc = (ARO + base_expr + PINC).setParseAction(cb_deref_pinc)
 
tuple deref_off = (base_expr + LPARENT + gpregs.parser + RPARENT).setParseAction(cb_deref_off)
 
tuple sreg_p = (deref_pinc | deref_nooff | deref_off | base_expr).setParseAction(cb_expr)
 
 mode_msp430 = None
 
 off_s = bs(l=16, order=-10, cls=(bs_cond_off_s,), fname = "off_s")
 
 off_d = bs(l=16, order=-10, cls=(bs_cond_off_d,), fname = "off_d")
 
 a_s = bs(l=2, order=-4, fname='a_s')
 
 a_d = bs(l=1, order=-6, fname='a_d')
 
 a_d2 = bs(l=2, order=-2, fname='a_d')
 
 sreg = bs(l=4, order=-3, cls=(msp430_sreg_arg,), fname='sreg')
 
 dreg = bs(l=4, order=-5, cls=(msp430_dreg_arg,), fname='dreg')
 
 bw = bw_mn(l=1, order=-10, mn_mod=['.w', '.b'], fname='size')
 
 bs_f1
 
 bs_f2
 
 bs_f2_nobw
 
 offimm = bs(l=10, cls=(msp430_offs,), fname="offs", order=-1)
 
 bs_f2_jcc
 

Function Documentation

◆ addop()

def miasm.arch.msp430.arch.addop (   name,
  fields,
  args = None,
  alias = False 
)

◆ cb_deref_nooff()

def miasm.arch.msp430.arch.cb_deref_nooff (   tokens)

◆ cb_deref_off()

def miasm.arch.msp430.arch.cb_deref_off (   tokens)

◆ cb_deref_pinc()

def miasm.arch.msp430.arch.cb_deref_pinc (   tokens)

◆ cb_expr()

def miasm.arch.msp430.arch.cb_expr (   tokens)

Variable Documentation

◆ a_d

miasm.arch.msp430.arch.a_d = bs(l=1, order=-6, fname='a_d')

◆ a_d2

miasm.arch.msp430.arch.a_d2 = bs(l=2, order=-2, fname='a_d')

◆ a_s

miasm.arch.msp430.arch.a_s = bs(l=2, order=-4, fname='a_s')

◆ ARO

miasm.arch.msp430.arch.ARO = Suppress("@")

◆ bs_f1

miasm.arch.msp430.arch.bs_f1
Initial value:
1 = bs_name(
2  l=4, name={
3  'mov': 4, 'add': 5, 'addc': 6, 'subc': 7, 'sub': 8, 'cmp': 9,
4  'dadd': 10, 'bit': 11, 'bic': 12, 'bis': 13, 'xor': 14, 'and': 15})

◆ bs_f2

miasm.arch.msp430.arch.bs_f2
Initial value:
1 = bs_name(l=3, name={'rrc': 0, 'rra': 2,
2  'push': 4})

◆ bs_f2_jcc

miasm.arch.msp430.arch.bs_f2_jcc
Initial value:
1 = bs_name(l=3, name={'jnz': 0, 'jz': 1, 'jnc': 2, 'jc': 3, 'jn': 4,
2  'jge': 5, 'jl': 6, 'jmp': 7})

◆ bs_f2_nobw

miasm.arch.msp430.arch.bs_f2_nobw
Initial value:
1 = bs_name(l=3, name={'swpb': 1, 'sxt': 3,
2  'call': 5})

◆ bw

miasm.arch.msp430.arch.bw = bw_mn(l=1, order=-10, mn_mod=['.w', '.b'], fname='size')

◆ conditional_branch

list miasm.arch.msp430.arch.conditional_branch
Initial value:
1 = ['jnz', 'jz', 'jnc', 'jc',
2  'jn', 'jge', 'jl']

◆ console_handler

miasm.arch.msp430.arch.console_handler = logging.StreamHandler()

◆ deref_nooff

tuple miasm.arch.msp430.arch.deref_nooff = (ARO + base_expr).setParseAction(cb_deref_nooff)

◆ deref_off

tuple miasm.arch.msp430.arch.deref_off = (base_expr + LPARENT + gpregs.parser + RPARENT).setParseAction(cb_deref_off)

◆ deref_pinc

tuple miasm.arch.msp430.arch.deref_pinc = (ARO + base_expr + PINC).setParseAction(cb_deref_pinc)

◆ dreg

miasm.arch.msp430.arch.dreg = bs(l=4, order=-5, cls=(msp430_dreg_arg,), fname='dreg')

◆ log

miasm.arch.msp430.arch.log = logging.getLogger("msp430dis")

◆ LPARENT

miasm.arch.msp430.arch.LPARENT = Suppress("(")

◆ mode_msp430

miasm.arch.msp430.arch.mode_msp430 = None

◆ off_d

miasm.arch.msp430.arch.off_d = bs(l=16, order=-10, cls=(bs_cond_off_d,), fname = "off_d")

◆ off_s

miasm.arch.msp430.arch.off_s = bs(l=16, order=-10, cls=(bs_cond_off_s,), fname = "off_s")

◆ offimm

miasm.arch.msp430.arch.offimm = bs(l=10, cls=(msp430_offs,), fname="offs", order=-1)

◆ PINC

miasm.arch.msp430.arch.PINC = Suppress("+")

◆ RPARENT

miasm.arch.msp430.arch.RPARENT = Suppress(")")

◆ sreg

miasm.arch.msp430.arch.sreg = bs(l=4, order=-3, cls=(msp430_sreg_arg,), fname='sreg')

◆ sreg_p

tuple miasm.arch.msp430.arch.sreg_p = (deref_pinc | deref_nooff | deref_off | base_expr).setParseAction(cb_expr)

◆ unconditional_branch

list miasm.arch.msp430.arch.unconditional_branch = ['jmp']