Add debug FAC

This commit is contained in:
michaelangel007 2022-04-02 11:27:21 -07:00
parent aa4af5e9d5
commit 71a7e21dda
2 changed files with 12 additions and 5 deletions

View File

@ -547,9 +547,15 @@ void FormatNopcodeBytes(WORD nBaseAddress, DisasmLine_t& line_)
sprintf( pDst, "0" );
else
{
double f = fac.mantissa * pow( 2.0, fac.exponent - 32 );
//sprintf( "s%1X m%04X e%02X", fac.negative, fac.mantissa, fac.exponent );
sprintf( pDst, "%c%f", aSign[ fac.negative ], f );
double f = fac.mantissa * pow( 2.0, fac.exponent - 32.0 );
#if DEBUG_FAC
sprintf( "s%1X m%04X e%02X", fac.negative, fac.mantissa, fac.exponent );
#else
//sprintf( pDst, "%c%12.11e", aSign[ fac.negative ], f ); // HACK: Magic Number 12, should be DISASM_DISPLAY_MAX_IMMEDIATE_LEN ??
// = 32-bit mantissa * log(2)
// = 9.6 digits of precision
sprintf( pDst, "%c%9.8e" , aSign[ fac.negative ], f );
#endif
}
iByte += 5;
break;

View File

@ -495,9 +495,10 @@ Update_t CmdDisasmDataDefAddress8L (int nArgs)
//===========================================================================
Update_t CmdDisasmDataDefAddress16 (int nArgs)
{
int iCmd = NOP_WORD_1 - g_aArgs[0].nValue;
int iCmd = g_aArgs[0].nValue; // delta command: NOP_WORD_1 == 0
if (! ((nArgs <= 2) || (nArgs == 4)))
//if (! ((nArgs <= 2) || (nArgs == 4)))
if (nArgs > 4) // 2.9.1.14 DA D000:D007
{
return Help_Arg_1( CMD_DEFINE_DATA_WORD1 + iCmd );
}