mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Fixed the disassembly of the "mov ax, mem" instructions (opcodes A0-
A3) in the i386 and NEC disassemblers. The argument (the memory address) was being displayed as a signed number, which doesn't make any sense. [Alex Jackson] Fixed a tiny bug with the debugger hex dump command: the printable characters in ASCII range from 32 to 12*6*, not 127. [Alex Jackson]
This commit is contained in:
parent
d0979397ef
commit
62950e6917
@ -1565,11 +1565,11 @@ static char* handle_param(char* s, UINT32 param)
|
||||
}
|
||||
|
||||
if( address_size ) {
|
||||
d32 = FETCHD32();
|
||||
s += sprintf( s, "[%s]", hexstring(d32, 0) );
|
||||
i32 = FETCHD32();
|
||||
s += sprintf( s, "[%s]", hexstring(i32, 0) );
|
||||
} else {
|
||||
d32 = FETCHD16();
|
||||
s += sprintf( s, "[%s]", hexstring(d32, 0) );
|
||||
i16 = FETCHD16();
|
||||
s += sprintf( s, "[%s]", hexstring(i16, 0) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -818,7 +818,7 @@ static const GROUP_OP group_op_table[] =
|
||||
|
||||
|
||||
static const char *const nec_reg[8] = { "aw", "cw", "dw", "bw", "sp", "bp", "ix", "iy" };
|
||||
static const char *const neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" };
|
||||
static const char *const nec_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" };
|
||||
static const char *const nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" };
|
||||
static const char *const nec_sfreg[256] =
|
||||
{
|
||||
@ -1006,7 +1006,7 @@ static char* handle_param(char* s, UINT32 param)
|
||||
switch(param)
|
||||
{
|
||||
case PARAM_REG8:
|
||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG1] );
|
||||
s += sprintf( s, "%s", nec_reg8[MODRM_REG1] );
|
||||
break;
|
||||
|
||||
case PARAM_REG16:
|
||||
@ -1014,7 +1014,7 @@ static char* handle_param(char* s, UINT32 param)
|
||||
break;
|
||||
|
||||
case PARAM_REG2_8:
|
||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG2] );
|
||||
s += sprintf( s, "%s", nec_reg8[MODRM_REG2] );
|
||||
break;
|
||||
|
||||
case PARAM_REG2_16:
|
||||
@ -1023,7 +1023,7 @@ static char* handle_param(char* s, UINT32 param)
|
||||
|
||||
case PARAM_RM8:
|
||||
if( modrm >= 0xc0 ) {
|
||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG2] );
|
||||
s += sprintf( s, "%s", nec_reg8[MODRM_REG2] );
|
||||
} else {
|
||||
s += sprintf( s, "byte ptr " );
|
||||
s += sprintf( s, "%s", modrm_string );
|
||||
@ -1096,8 +1096,8 @@ static char* handle_param(char* s, UINT32 param)
|
||||
case SEG_SS: s += sprintf( s, "ss:" ); break;
|
||||
}
|
||||
|
||||
d16 = FETCHD16();
|
||||
s += sprintf( s, "[%s]", hexstring(d16, 0) );
|
||||
i16 = FETCHD16();
|
||||
s += sprintf( s, "[%s]", hexstring(i16, 0) );
|
||||
break;
|
||||
|
||||
case PARAM_SREG:
|
||||
|
@ -1683,7 +1683,7 @@ static void execute_dump(running_machine &machine, int ref, int params, const ch
|
||||
if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
|
||||
{
|
||||
UINT8 byte = debug_read_byte(space, i + j, TRUE);
|
||||
outdex += sprintf(&output[outdex], "%c", (byte >= 32 && byte < 128) ? byte : '.');
|
||||
outdex += sprintf(&output[outdex], "%c", (byte >= 32 && byte < 127) ? byte : '.');
|
||||
}
|
||||
else
|
||||
outdex += sprintf(&output[outdex], " ");
|
||||
|
Loading…
Reference in New Issue
Block a user