summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/arcompact/arcompactdasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/arcompact/arcompactdasm.cpp')
-rw-r--r--src/devices/cpu/arcompact/arcompactdasm.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/devices/cpu/arcompact/arcompactdasm.cpp b/src/devices/cpu/arcompact/arcompactdasm.cpp
index cc77f73c585..8103797deea 100644
--- a/src/devices/cpu/arcompact/arcompactdasm.cpp
+++ b/src/devices/cpu/arcompact/arcompactdasm.cpp
@@ -22,14 +22,11 @@
#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
-extern char *output;
-
-CPU_DISASSEMBLE(arcompact)
+static offs_t internal_disasm_arcompact(cpu_device *device, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, int options)
{
int size;
uint32_t op = oprom[0] | (oprom[1] << 8);
- output = buffer;
uint8_t instruction = ARCOMPACT_OPERATION;
@@ -90,3 +87,13 @@ CPU_DISASSEMBLE(arcompact)
return size | DASMFLAG_SUPPORTED;
}
+
+
+CPU_DISASSEMBLE(arcompact)
+{
+ std::ostringstream stream;
+ offs_t result = internal_disasm_arcompact(device, stream, pc, oprom, opram, options);
+ std::string stream_str = stream.str();
+ strcpy(buffer, stream_str.c_str());
+ return result;
+}