A Disassembler Written in Perl
By Tony Zhang
Dr. Dobb's Journal February 1997
<B>(a)</B> $One_Byte_LUT[ 94 ] = "xchg %eax, %esp"; $One_Byte_LUT[ 95 ] = "xchg %eax, %ebp"; $One_Byte_LUT[ 96 ] = "xchg %eax, %esi"; $One_Byte_LUT[ 97 ] = "xchg %eax, %edi". <B>(b)</B> $Three_Bit_Lut{ b:0 } = "add %Ev, %Iv"; $Three_Bit_Lut{ b:1 } = "or %Ev, %Iv"; $Three_Bit_Lut{ b:2 } = "adc %Ev, %Iv"; $Three_Bit_Lut{ b:3 } = "sbb %Ev, %Iv".
Example 1: (a) Reading the array @One_Byte_LUT; (b) reading the array %Three_Bit_LUT.
Copyright © 1997, Dr. Dobb's Journal