diff options
author | Matthias Hopf <mhopf@suse.de> | 2007-08-30 15:46:21 +0200 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2007-08-30 15:46:21 +0200 |
commit | 1d59f15d11f2cbf73f8a200f2252d2b82a49ca21 (patch) | |
tree | 3618f961d3672f3f0b1a04ab0846b8e827fea53e | |
parent | 6d54aa91736a6aeae142acaa1d7705c585f1214d (diff) |
Fix CLEAR / SHIFT_* byte position output. Reset REG_BLOCK in full dump.
op_dest & op_shift had broken output of byte positions.
REG_BLOCK offset wasn't cleared in between tables when doing a full dump 'F'.
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -315,7 +315,7 @@ int op_dest (uint8_t *d, char *out) { uint8_t *t = d+1; int attr = *t++; out += sprintf (out, "%-5s ", op->name); - t += sub_dest (t, out, op->desttype, attr >> 6, size_align[(attr & 0x38)>>3], op->destindex); + t += sub_src (t, out, op->desttype, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->destindex); return t - d; } int op_destsrc (uint8_t *d, char *out) { @@ -334,7 +334,7 @@ int op_shift (uint8_t *d, char *out) { uint8_t *t = d+1; int attr = *t++; out += sprintf (out, "%-5s ", op->name); - t += sub_dest (t, out, op->desttype, attr >> 6, size_align[(attr & 0x38)>>3], op->destindex); + t += sub_src (t, out, op->desttype, (attr & 0x38) >> 3, size_align[(attr & 0x38)>>3], op->destindex); out += strlen (out); out += sprintf (out, " by %02x", *t++); return t - d; @@ -716,6 +716,8 @@ int main (int argc, char *argv[]) last = 0; for (start = 0; start < sizeof (ATOM_MASTER_LIST_OF_COMMAND_TABLES) / sizeof (uint16_t); start++) { + last_reg_index = INDEX_NONE; + last_reg_offset = 0; off = tabs->MasterCommandTables [start]; len = do_tableinfo (data, off, INDEX_COMMAND_TABLE, start); if (off) { |