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

Classes

class  ir_msp430
 

Functions

def hex2bcd (val)
 
def bcd2hex (val)
 
def reset_sr_res ()
 
def update_flag_cf_inv_zf (a)
 
def update_flag_zf_eq (a, b)
 
def update_flag_zf (a)
 
def update_flag_nf (arg)
 
def update_flag_add_cf (op1, op2, res)
 
def update_flag_add_of (op1, op2, res)
 
def update_flag_sub_cf (op1, op2, res)
 
def update_flag_sub_of (op1, op2, res)
 
def update_flag_arith_sub_zn (arg1, arg2)
 
def update_flag_arith_add_zn (arg1, arg2)
 
def mng_autoinc (a, b, size)
 
def mov_b (ir, instr, a, b)
 
def mov_w (ir, instr, a, b)
 
def and_b (ir, instr, a, b)
 
def and_w (ir, instr, a, b)
 
def bic_b (ir, instr, a, b)
 
def bic_w (ir, instr, a, b)
 
def bis_w (ir, instr, a, b)
 
def bit_w (ir, instr, a, b)
 
def sub_w (ir, instr, a, b)
 
def add_b (ir, instr, a, b)
 
def add_w (ir, instr, a, b)
 
def dadd_w (ir, instr, a, b)
 
def xor_w (ir, instr, a, b)
 
def push_w (ir, instr, a)
 
def call (ir, instr, a)
 
def swpb (ir, instr, a)
 
def cmp_w (ir, instr, a, b)
 
def cmp_b (ir, instr, a, b)
 
def jz (ir, instr, a)
 
def jnz (ir, instr, a)
 
def jl (ir, instr, a)
 
def jc (ir, instr, a)
 
def jnc (ir, instr, a)
 
def jge (ir, instr, a)
 
def jmp (ir, instr, a)
 
def rrc_w (ir, instr, a)
 
def rra_w (ir, instr, a)
 
def sxt (ir, instr, a)
 
def ComposeExprAssign (dst, src)
 

Variables

dictionary mnemo_func
 
 composed_sr = ExprCompose(cf, zf, nf, gie, cpuoff, osc, scg0, scg1, of, res)
 

Function Documentation

◆ add_b()

def miasm.arch.msp430.sem.add_b (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ add_w()

def miasm.arch.msp430.sem.add_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ and_b()

def miasm.arch.msp430.sem.and_b (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ and_w()

def miasm.arch.msp430.sem.and_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ bcd2hex()

def miasm.arch.msp430.sem.bcd2hex (   val)

◆ bic_b()

def miasm.arch.msp430.sem.bic_b (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ bic_w()

def miasm.arch.msp430.sem.bic_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ bis_w()

def miasm.arch.msp430.sem.bis_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ bit_w()

def miasm.arch.msp430.sem.bit_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ call()

def miasm.arch.msp430.sem.call (   ir,
  instr,
  a 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmp_b()

def miasm.arch.msp430.sem.cmp_b (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ cmp_w()

def miasm.arch.msp430.sem.cmp_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ ComposeExprAssign()

def miasm.arch.msp430.sem.ComposeExprAssign (   dst,
  src 
)
Here is the caller graph for this function:

◆ dadd_w()

def miasm.arch.msp430.sem.dadd_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ hex2bcd()

def miasm.arch.msp430.sem.hex2bcd (   val)

◆ jc()

def miasm.arch.msp430.sem.jc (   ir,
  instr,
  a 
)

◆ jge()

def miasm.arch.msp430.sem.jge (   ir,
  instr,
  a 
)

◆ jl()

def miasm.arch.msp430.sem.jl (   ir,
  instr,
  a 
)

◆ jmp()

def miasm.arch.msp430.sem.jmp (   ir,
  instr,
  a 
)

◆ jnc()

def miasm.arch.msp430.sem.jnc (   ir,
  instr,
  a 
)

◆ jnz()

def miasm.arch.msp430.sem.jnz (   ir,
  instr,
  a 
)

◆ jz()

def miasm.arch.msp430.sem.jz (   ir,
  instr,
  a 
)

◆ mng_autoinc()

def miasm.arch.msp430.sem.mng_autoinc (   a,
  b,
  size 
)
Here is the caller graph for this function:

◆ mov_b()

def miasm.arch.msp430.sem.mov_b (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ mov_w()

def miasm.arch.msp430.sem.mov_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ push_w()

def miasm.arch.msp430.sem.push_w (   ir,
  instr,
  a 
)

◆ reset_sr_res()

def miasm.arch.msp430.sem.reset_sr_res ( )
Here is the caller graph for this function:

◆ rra_w()

def miasm.arch.msp430.sem.rra_w (   ir,
  instr,
  a 
)
Here is the call graph for this function:

◆ rrc_w()

def miasm.arch.msp430.sem.rrc_w (   ir,
  instr,
  a 
)
Here is the call graph for this function:

◆ sub_w()

def miasm.arch.msp430.sem.sub_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

◆ swpb()

def miasm.arch.msp430.sem.swpb (   ir,
  instr,
  a 
)

◆ sxt()

def miasm.arch.msp430.sem.sxt (   ir,
  instr,
  a 
)
Here is the call graph for this function:

◆ update_flag_add_cf()

def miasm.arch.msp430.sem.update_flag_add_cf (   op1,
  op2,
  res 
)
Here is the caller graph for this function:

◆ update_flag_add_of()

def miasm.arch.msp430.sem.update_flag_add_of (   op1,
  op2,
  res 
)
Here is the caller graph for this function:

◆ update_flag_arith_add_zn()

def miasm.arch.msp430.sem.update_flag_arith_add_zn (   arg1,
  arg2 
)
Compute zf and nf flags for (arg1 + arg2)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_flag_arith_sub_zn()

def miasm.arch.msp430.sem.update_flag_arith_sub_zn (   arg1,
  arg2 
)
Compute znp flags for (arg1 - arg2)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_flag_cf_inv_zf()

def miasm.arch.msp430.sem.update_flag_cf_inv_zf (   a)
Here is the caller graph for this function:

◆ update_flag_nf()

def miasm.arch.msp430.sem.update_flag_nf (   arg)
Here is the caller graph for this function:

◆ update_flag_sub_cf()

def miasm.arch.msp430.sem.update_flag_sub_cf (   op1,
  op2,
  res 
)
Here is the caller graph for this function:

◆ update_flag_sub_of()

def miasm.arch.msp430.sem.update_flag_sub_of (   op1,
  op2,
  res 
)
Here is the caller graph for this function:

◆ update_flag_zf()

def miasm.arch.msp430.sem.update_flag_zf (   a)
Here is the caller graph for this function:

◆ update_flag_zf_eq()

def miasm.arch.msp430.sem.update_flag_zf_eq (   a,
  b 
)
Here is the caller graph for this function:

◆ xor_w()

def miasm.arch.msp430.sem.xor_w (   ir,
  instr,
  a,
  b 
)
Here is the call graph for this function:

Variable Documentation

◆ composed_sr

miasm.arch.msp430.sem.composed_sr = ExprCompose(cf, zf, nf, gie, cpuoff, osc, scg0, scg1, of, res)

◆ mnemo_func

dictionary miasm.arch.msp430.sem.mnemo_func
Initial value:
1 = {
2  "mov.b": mov_b,
3  "mov.w": mov_w,
4  "and.b": and_b,
5  "and.w": and_w,
6  "bic.b": bic_b,
7  "bic.w": bic_w,
8  "bis.w": bis_w,
9  "bit.w": bit_w,
10  "sub.w": sub_w,
11  "add.b": add_b,
12  "add.w": add_w,
13  "push.w": push_w,
14  "dadd.w": dadd_w,
15  "xor.w": xor_w,
16  "call": call,
17  "swpb": swpb,
18  "cmp.w": cmp_w,
19  "cmp.b": cmp_b,
20  "jz": jz,
21  "jnz": jnz,
22  "jl": jl,
23  "jc": jc,
24  "jnc": jnc,
25  "jmp": jmp,
26  "jge": jge,
27  "rrc.w": rrc_w,
28  "rra.w": rra_w,
29  "sxt": sxt,
30 }