summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2008-01-15 11:37:17 +0100
committerMatthias Hopf <mhopf@suse.de>2008-01-15 11:37:17 +0100
commite5591e60fdfe7c9b594ca44cc0681d68dfad7e35 (patch)
tree1412ce5e1adb1c6270348a2a37c0435c887d32ac
parent543a5c8c835913dd517d6dee63d2acf6fe300726 (diff)
Only(!) shift D_REG on -A
D_WS apparently already addresses bytes.
-rw-r--r--main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.c b/main.c
index 049aa74..869f8ea 100644
--- a/main.c
+++ b/main.c
@@ -48,7 +48,7 @@ enum {
const char *addrnames[] = { "REG", "PS", "WS", "FB", "ID", "IM", "PLL", "MC", "dec", "hex8", "hex16", "null" };
const char *addrtypes[] = {
- "reg[%04x] ", "param[%02x] ", "work[%02x] ", "fb[%02x] ", "data[%04x]", NULL,
+ "reg[%04x] ", "param[%02x] ", "work[%02x] ", "fb[%02x] ", "data[%04x]", "%04x <D_ID unimplemented>",
"PLL[%04x] ", "MC[%04x] ",
"%02x", "%04x", ""
} ;
@@ -416,16 +416,16 @@ int op_setpt0 (uint8_t *d, char *out) {
const optab_t *op = &optable[d[0]];
last_reg_index = op->srcindex;
/* is never INDEX_REG_MM */
- addrtypes_shift[D_REG]= addrtypes_shift[D_FB]= addrtypes_shift[D_ID]= 0;
+ addrtypes_shift[D_REG] = 0;
return op_0x (d, out);
}
int op_setpt1 (uint8_t *d, char *out) {
const optab_t *op = &optable[d[0]];
last_reg_index = op->srcindex + *(uint16_t *) &d[1];
if (last_reg_index == INDEX_REG_MM && opt_reg_addresses)
- addrtypes_shift[D_REG]= addrtypes_shift[D_FB]= addrtypes_shift[D_ID]= 2;
+ addrtypes_shift[D_REG] = 2;
else
- addrtypes_shift[D_REG]= addrtypes_shift[D_FB]= addrtypes_shift[D_ID]= 0;
+ addrtypes_shift[D_REG] = 0;
return op_1x16 (d, out);
}
int op_setrb (uint8_t *d, char *out) {
@@ -714,7 +714,7 @@ int main (int argc, char *argv[])
for (arg = &argv[optind+1]; *arg && **arg; arg++) {
last_reg_index = INDEX_NONE;
last_reg_offset = 0;
- addrtypes_shift[D_REG]= addrtypes_shift[D_FB]= addrtypes_shift[D_ID]= 0;
+ addrtypes_shift[D_REG] = 0;
if (arg[0][1])
usage (argv);
switch (arg[0][0]) {