summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m6809/6809dasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/m6809/6809dasm.c')
-rw-r--r--src/emu/cpu/m6809/6809dasm.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/emu/cpu/m6809/6809dasm.c b/src/emu/cpu/m6809/6809dasm.c
index 07174798550..7bbcaae9515 100644
--- a/src/emu/cpu/m6809/6809dasm.c
+++ b/src/emu/cpu/m6809/6809dasm.c
@@ -22,25 +22,25 @@
// Opcode structure
struct opcodeinfo
{
- UINT8 opcode; // 8-bit opcode value
- UINT8 length; // Opcode length in bytes
- char name[6]; // Opcode name
- UINT8 mode; // Addressing mode
- unsigned flags; // Disassembly flags
+ UINT8 opcode; // 8-bit opcode value
+ UINT8 length; // Opcode length in bytes
+ char name[6]; // Opcode name
+ UINT8 mode; // Addressing mode
+ unsigned flags; // Disassembly flags
};
enum m6809_addressing_modes
{
- INH, // Inherent
- DIR, // Direct
- IND, // Indexed
- REL, // Relative (8 bit)
- LREL, // Long relative (16 bit)
- EXT, // Extended
- IMM, // Immediate
- IMM_RR, // Register-to-register
- PG1, // Switch to page 1 opcodes
- PG2 // Switch to page 2 opcodes
+ INH, // Inherent
+ DIR, // Direct
+ IND, // Indexed
+ REL, // Relative (8 bit)
+ LREL, // Long relative (16 bit)
+ EXT, // Extended
+ IMM, // Immediate
+ IMM_RR, // Register-to-register
+ PG1, // Switch to page 1 opcodes
+ PG2 // Switch to page 2 opcodes
};
// Page 0 opcodes (single byte)
@@ -422,28 +422,28 @@ offs_t m6809_disassemble(legacy_cpu_device *device, char *buffer, offs_t pc, con
case INH:
switch (opcode)
{
- case 0x34: // PSHS
- case 0x36: // PSHU
+ case 0x34: // PSHS
+ case 0x36: // PSHU
pb = operandarray[0];
if (pb & 0x80)
buffer += sprintf(buffer, "PC");
if (pb & 0x40)
buffer += sprintf(buffer, "%s%s", (pb&0x80)?",":"", (opcode==0x34)?"U":"S");
if (pb & 0x20)
- buffer += sprintf(buffer, "%sY", (pb&0xc0)?",":"");
+ buffer += sprintf(buffer, "%sY", (pb&0xc0)?",":"");
if (pb & 0x10)
- buffer += sprintf(buffer, "%sX", (pb&0xe0)?",":"");
+ buffer += sprintf(buffer, "%sX", (pb&0xe0)?",":"");
if (pb & 0x08)
- buffer += sprintf(buffer, "%sDP", (pb&0xf0)?",":"");
+ buffer += sprintf(buffer, "%sDP", (pb&0xf0)?",":"");
if (pb & 0x04)
- buffer += sprintf(buffer, "%sB", (pb&0xf8)?",":"");
+ buffer += sprintf(buffer, "%sB", (pb&0xf8)?",":"");
if (pb & 0x02)
buffer += sprintf(buffer, "%sA", (pb&0xfc)?",":"");
if (pb & 0x01)
buffer += sprintf(buffer, "%sCC", (pb&0xfe)?",":"");
break;
- case 0x35: // PULS
- case 0x37: // PULU
+ case 0x35: // PULS
+ case 0x37: // PULU
pb = operandarray[0];
if (pb & 0x01)
buffer += sprintf(buffer, "CC");
@@ -500,37 +500,37 @@ offs_t m6809_disassemble(legacy_cpu_device *device, char *buffer, offs_t pc, con
switch (pbm)
{
- case 0x80: // ,R+
+ case 0x80: // ,R+
if (indirect)
strcpy(buffer, "Illegal Postbyte");
else
buffer += sprintf(buffer, ",%s+", m6809_regs[reg]);
break;
- case 0x81: // ,R++
+ case 0x81: // ,R++
buffer += sprintf(buffer, ",%s++", m6809_regs[reg]);
break;
- case 0x82: // ,-R
+ case 0x82: // ,-R
if (indirect)
strcpy(buffer, "Illegal Postbyte");
else
buffer += sprintf(buffer, ",-%s", m6809_regs[reg]);
break;
- case 0x83: // ,--R
+ case 0x83: // ,--R
buffer += sprintf(buffer, ",--%s", m6809_regs[reg]);
break;
- case 0x84: // ,R
+ case 0x84: // ,R
buffer += sprintf(buffer, ",%s", m6809_regs[reg]);
break;
- case 0x85: // (+/- B),R
+ case 0x85: // (+/- B),R
buffer += sprintf(buffer, "B,%s", m6809_regs[reg]);
break;
- case 0x86: // (+/- A),R
+ case 0x86: // (+/- A),R
buffer += sprintf(buffer, "A,%s", m6809_regs[reg]);
break;
@@ -538,14 +538,14 @@ offs_t m6809_disassemble(legacy_cpu_device *device, char *buffer, offs_t pc, con
strcpy(buffer, "Illegal Postbyte");
break;
- case 0x88: // (+/- 7 bit offset),R
+ case 0x88: // (+/- 7 bit offset),R
offset = (INT8)opram[p++];
buffer += sprintf(buffer, "%s", (offset < 0) ? "-" : "");
buffer += sprintf(buffer, "$%02X,", (offset < 0) ? -offset : offset);
buffer += sprintf(buffer, "%s", m6809_regs[reg]);
break;
- case 0x89: // (+/- 15 bit offset),R
+ case 0x89: // (+/- 15 bit offset),R
offset = (INT16)((opram[p+0] << 8) + opram[p+1]);
p += 2;
buffer += sprintf(buffer, "%s", (offset < 0) ? "-" : "");
@@ -557,17 +557,17 @@ offs_t m6809_disassemble(legacy_cpu_device *device, char *buffer, offs_t pc, con
strcpy(buffer, "Illegal Postbyte");
break;
- case 0x8b: // (+/- D),R
+ case 0x8b: // (+/- D),R
buffer += sprintf(buffer, "D,%s", m6809_regs[reg]);
break;
- case 0x8c: // (+/- 7 bit offset),PC
+ case 0x8c: // (+/- 7 bit offset),PC
offset = (INT8)opram[p++];
buffer += sprintf(buffer, "%s", (offset < 0) ? "-" : "");
buffer += sprintf(buffer, "$%02X,PC", (offset < 0) ? -offset : offset);
break;
- case 0x8d: // (+/- 15 bit offset),PC
+ case 0x8d: // (+/- 15 bit offset),PC
offset = (INT16)((opram[p+0] << 8) + opram[p+1]);
p += 2;
buffer += sprintf(buffer, "%s", (offset < 0) ? "-" : "");
@@ -578,13 +578,13 @@ offs_t m6809_disassemble(legacy_cpu_device *device, char *buffer, offs_t pc, con
strcpy(buffer, "Illegal Postbyte");
break;
- case 0x8f: // address
+ case 0x8f: // address
ea = (UINT16)((opram[p+0] << 8) + opram[p+1]);
p += 2;
buffer += sprintf(buffer, "$%04X", ea);
break;
- default: // (+/- 4 bit offset),R
+ default: // (+/- 4 bit offset),R
offset = pb & 0x1f;
if (offset > 15)
offset = offset - 32;