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 ) {
|
if( address_size ) {
|
||||||
d32 = FETCHD32();
|
i32 = FETCHD32();
|
||||||
s += sprintf( s, "[%s]", hexstring(d32, 0) );
|
s += sprintf( s, "[%s]", hexstring(i32, 0) );
|
||||||
} else {
|
} else {
|
||||||
d32 = FETCHD16();
|
i16 = FETCHD16();
|
||||||
s += sprintf( s, "[%s]", hexstring(d32, 0) );
|
s += sprintf( s, "[%s]", hexstring(i16, 0) );
|
||||||
}
|
}
|
||||||
break;
|
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 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_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" };
|
||||||
static const char *const nec_sfreg[256] =
|
static const char *const nec_sfreg[256] =
|
||||||
{
|
{
|
||||||
@ -1006,7 +1006,7 @@ static char* handle_param(char* s, UINT32 param)
|
|||||||
switch(param)
|
switch(param)
|
||||||
{
|
{
|
||||||
case PARAM_REG8:
|
case PARAM_REG8:
|
||||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG1] );
|
s += sprintf( s, "%s", nec_reg8[MODRM_REG1] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARAM_REG16:
|
case PARAM_REG16:
|
||||||
@ -1014,7 +1014,7 @@ static char* handle_param(char* s, UINT32 param)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PARAM_REG2_8:
|
case PARAM_REG2_8:
|
||||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG2] );
|
s += sprintf( s, "%s", nec_reg8[MODRM_REG2] );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARAM_REG2_16:
|
case PARAM_REG2_16:
|
||||||
@ -1023,7 +1023,7 @@ static char* handle_param(char* s, UINT32 param)
|
|||||||
|
|
||||||
case PARAM_RM8:
|
case PARAM_RM8:
|
||||||
if( modrm >= 0xc0 ) {
|
if( modrm >= 0xc0 ) {
|
||||||
s += sprintf( s, "%s", neg_reg8[MODRM_REG2] );
|
s += sprintf( s, "%s", nec_reg8[MODRM_REG2] );
|
||||||
} else {
|
} else {
|
||||||
s += sprintf( s, "byte ptr " );
|
s += sprintf( s, "byte ptr " );
|
||||||
s += sprintf( s, "%s", modrm_string );
|
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;
|
case SEG_SS: s += sprintf( s, "ss:" ); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
d16 = FETCHD16();
|
i16 = FETCHD16();
|
||||||
s += sprintf( s, "[%s]", hexstring(d16, 0) );
|
s += sprintf( s, "[%s]", hexstring(i16, 0) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARAM_SREG:
|
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))
|
if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr))
|
||||||
{
|
{
|
||||||
UINT8 byte = debug_read_byte(space, i + j, TRUE);
|
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
|
else
|
||||||
outdex += sprintf(&output[outdex], " ");
|
outdex += sprintf(&output[outdex], " ");
|
||||||
|
Loading…
Reference in New Issue
Block a user