//
// 6808 disassembler
//
-// by James L. Hammons
+// by James Hammons
//
-// (c) 2004 Underground Software
+// (c) 2004, 2014 Underground Software
//
#include "dis6808.h"
//
// Display bytes in mem in hex
//
-static void DisplayBytes(uint16 src, uint32 dst)
+static void DisplayBytes(uint16_t src, uint32_t dst)
{
WriteLog("%04X: ", src);
- uint8 cnt = 0; // Init counter...
+ uint8_t cnt = 0; // Init counter...
if (src > dst)
dst += 0x10000; // That should fix the FFFF bug...
- for(uint32 i=src; i<dst; i++)
+ for(uint32_t i=src; i<dst; i++)
{
WriteLog("%02X ", soundCPU.RdMem(i));
cnt++; // Bump counter...
//
// Decode a 6808 instruction
//
-int Decode6808(uint16 pc)
+int Decode6808(uint16_t pc)
{
char outbuf[80];
- uint16 addr = pc, offset;
- uint8 opcode = soundCPU.RdMem(addr++); // Get the opcode
+ uint16_t addr = pc, offset;
+ uint8_t opcode = soundCPU.RdMem(addr++); // Get the opcode
switch (op_mat[opcode]) // Decode the addressing mode...
{
sprintf(outbuf, "%s $%04X ", mnemonics[opcode], offset);
break;
case 3: // Relative
-// sprintf(outbuf, "%s $%04X", mnemonics[opcode], ++addr + (int16)(int8)soundCPU.RdMem(addr));
- offset = addr + 1 + (int16)(int8)soundCPU.RdMem(addr);
+// sprintf(outbuf, "%s $%04X", mnemonics[opcode], ++addr + (int16_t)(int8_t)soundCPU.RdMem(addr));
+ offset = addr + 1 + (int16_t)(int8_t)soundCPU.RdMem(addr);
addr++;
sprintf(outbuf, "%s $%04X ", mnemonics[opcode], offset);
break;