public static bool ParseOoRrrMmm(FAsmCommand cmd, int w, int code, FBytes memory, int offset) { int oo = (code & 0xC0) >> 6; int rrr = (code & 0x38) >> 3; int mmm = (code & 0x07); switch (oo) { case 0x00: if (mmm == 0x06) { cmd.Size += RInt.BYTE_SIZE; cmd.Attributes = new object[] { memory.GetInt32(offset) }; } return(true); case 0x01: cmd.Size += RByte.BYTE_SIZE; cmd.Attributes = new object[] { RAsm.RegName(w, rrr), memory[offset] }; return(true); case 0x02: cmd.Size += RInt.BYTE_SIZE; cmd.Attributes = new object[] { RAsm.RegName(w, rrr), memory.GetInt32(offset) }; return(true); case 0x03: string des = RAsm.RegName(w, rrr); string src = RAsm.FuncName(w, oo, mmm); cmd.Attributes = new object[] { des, src }; return(true); } return(false); }
public const int REG_EDI = 0x07; // BH, DI, EDI public static bool ParseOoMmm(FAsmCommand cmd, int w, int oo, int mmm, FBytes memory, int offset) { switch (oo) { case 0x00: if (mmm == 0x06) { cmd.Size += RInt.BYTE_SIZE; cmd.Attributes = new object[] { memory.GetInt32(offset) }; } return(true); case 0x01: cmd.Size += RByte.BYTE_SIZE; cmd.Attributes = new object[] { memory[offset] }; return(true); case 0x02: cmd.Size += RInt.BYTE_SIZE; cmd.Attributes = new object[] { memory.GetInt32(offset) }; return(true); case 0x03: cmd.Size += RByte.BYTE_SIZE; string des = RAsm.RegName(w, mmm); cmd.Attributes = new object[] { des, memory[offset] }; return(true); } return(false); }
public static string[] OoRrrMmmName(int w, int code) { int oo = (code & 0xC0) >> 6; int rrr = (code & 0x38) >> 3; int mmm = (code & 0x07); string p1 = RAsm.RegName(w, rrr); string p2 = RAsm.FuncName(w, oo, mmm); return(new string[] { p1, p2 }); }