From e36a9c34fb45e7107bd1d7979a692449577a424a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Wed, 18 Jan 2017 11:12:37 +0100 Subject: [PATCH] Add accumulator addressing mode handling. --- src/instruction.c | 3 +++ src/instruction.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/instruction.c b/src/instruction.c index 420cce2..0c54676 100644 --- a/src/instruction.c +++ b/src/instruction.c @@ -56,6 +56,9 @@ instruction_print(instruction_t *i) case IMPLIED: printf("%s", i->def.mnemonic); break; + case ACCUMULATOR: + printf("%s A", i->def.mnemonic); + break; case IMMEDIATE: printf("%s #%X", i->def.mnemonic, i->op1); break; diff --git a/src/instruction.h b/src/instruction.h index 819f106..fabbced 100644 --- a/src/instruction.h +++ b/src/instruction.h @@ -15,7 +15,8 @@ typedef enum { ABSOLUTEX, ABSOLUTEY, IABSOLUTE, - IABSOLUTEX + IABSOLUTEX, + ACCUMULATOR } addressing_t; struct instrdef {