nemerle / dcc

This is a heavily updated version of the old DOS executable decompiler DCC
GNU General Public License v2.0
146 stars 27 forks source link

Teach dcc about another switch table idiom #14

Closed nemerle closed 8 years ago

nemerle commented 8 years ago
  mov cx,NUM_CASES
  mov bx,JUMP_TABLE

LAB1:
  mov ax, [bx]
  cmp ax,VAL
  jz LAB2
  add bx,2
  loop LAB1
  jmp DEFAULT_CASE
LAB2
  jmp word ptr [bx+2*NUM_CASES]