summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-05-07 13:59:46 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-05-07 13:59:46 +0000
commitd72f98cb3c85ac8271ea616ea2285b57a5e8b671 (patch)
treef357eb63bd8613bbcf0c9e06989cea23c861b61f
parent7498554ec1d53d6b7302a86ee7429a7293add1d0 (diff)
Fix MCS51 disassembler to work properly when there are two
memory arguments (the second would overwrite the first).
-rw-r--r--src/emu/cpu/mcs51/mcs51dasm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/emu/cpu/mcs51/mcs51dasm.c b/src/emu/cpu/mcs51/mcs51dasm.c
index 814e5613509..a8889d0219a 100644
--- a/src/emu/cpu/mcs51/mcs51dasm.c
+++ b/src/emu/cpu/mcs51/mcs51dasm.c
@@ -282,7 +282,9 @@ static void init_mem_names(int feature_set, const char **mem_names)
static const char *get_data_address( const char **mem_names, UINT8 arg )
{
- static char buffer[32];
+ static char buffer_array[4][32];
+ static int whichbuf;
+ char *buffer = &buffer_array[++whichbuf % 4][0];
if (mem_names[arg] == NULL)
sprintf(buffer,"$%02X",arg);