mirror of
https://github.com/zoriya/dasm.git
synced 2026-08-15 18:44:40 +00:00
Fix register bitshift priority
This commit is contained in:
+2
-2
@@ -68,10 +68,10 @@ void print_instruction(unsigned addr, instruction_t inst, unsigned raw)
|
||||
printf("%04x", addr + inst.size - ((raw & 0xFF << 8) + (raw & 0xFF00 >> 8)));
|
||||
break;
|
||||
case REG8:
|
||||
printf("%s", registers8[operand & 0b111000 >> 3]);
|
||||
printf("%s", registers8[(operand & 0b111000) >> 3]);
|
||||
break;
|
||||
case REG16:
|
||||
printf("%s", registers16[operand & 0b111000 >> 3]);
|
||||
printf("%s", registers16[(operand & 0b111000) >> 3]);
|
||||
break;
|
||||
case R_M8:
|
||||
print_rm_operand(inst, raw, operand, false);
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ const instruction_t instructions[] = {
|
||||
{.opcode = 0x86, .extended = -1, .name = "xchg", .mode = {R_M8, REG8, END}, .size = 2},
|
||||
{.opcode = 0x87, .extended = -1, .name = "xchg", .mode = {R_M16, REG16, END}, .size = 3},
|
||||
{.opcode = 0x88, .extended = -1, .name = "mov", .mode = {R_M8, REG8, END}, .size = 2},
|
||||
{.opcode = 0x89, .extended = -1, .name = "mov", .mode = {R_M16, REG16, END}, .size = 3},
|
||||
{.opcode = 0x89, .extended = -1, .name = "mov", .mode = {R_M16, REG16, END}, .size = 2},
|
||||
{.opcode = 0x8A, .extended = -1, .name = "mov", .mode = {REG8, R_M8, END}, .size = 2},
|
||||
{.opcode = 0x8B, .extended = -1, .name = "mov", .mode = {REG16, R_M16, END}, .size = 3},
|
||||
// {.opcode = 0x8C, .extended = -1, .name = "mov", .mode = {R_M16, sreg, END}, .size = 3},
|
||||
|
||||
Reference in New Issue
Block a user