MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / _CmdDisasmDataDefWordX

Function _CmdDisasmDataDefWordX

source/Debugger/Debugger_DisassemblerData.cpp:430–467  ·  view source on GitHub ↗

Usage: DW DW symbol DW symbol address DW symbol range:range DW address Auto-define W_#### where # is the address DW range Auto-define W_#### where # is the address Examples: DW 3F2:3F3 */ ===========================================================================

Source from the content-addressed store, hash-verified

428*/
429//===========================================================================
430Update_t _CmdDisasmDataDefWordX (int nArgs)
431{
432 int iCmd = g_aArgs[0].nValue - NOP_WORD_1;
433
434 if (nArgs > 4) // 2.7.0.31 Bug fix: DB range, i.e. DB 174E:174F
435 {
436 return Help_Arg_1( CMD_DEFINE_DATA_WORD1 + iCmd );
437 }
438
439 DisasmData_t tData;
440 int iArg = 2;
441
442 if (nArgs == 3 ) // 2.7.0.33 Bug fix: DW range, i.e. DW 3F2:3F3
443 {
444 if ( g_aArgs[ 2 ].eToken == TOKEN_COLON )
445 iArg = 1;
446 }
447
448 WORD nAddress = _CmdDefineByteRange( nArgs, iArg, tData );
449
450// tData.iDirective = FIRST_M_DIRECTIVE + ASM_M_DEFINE_WORD;
451 tData.iDirective = g_aAssemblerFirstDirective[ g_iAssemblerSyntax ] + ASM_DEFINE_WORD;
452
453 tData.eElementType = (Nopcode_e)( NOP_WORD_1 + iCmd );
454 tData.bSymbolLookup = false;
455 tData.nTargetAddress = 0;
456
457 // Already exists, so update
458 DisasmData_t *pData = Disassembly_IsDataAddress( nAddress );
459 if ( pData )
460 {
461 *pData = tData;
462 }
463 else
464 Disassembly_AddData( tData );
465
466 return UPDATE_DISASM | ConsoleUpdate();
467}
468
469//===========================================================================
470Update_t CmdDisasmDataDefAddress8H (int nArgs)

Callers 3

CmdDisasmDataDefWord1Function · 0.85
CmdDisasmDataDefWord2Function · 0.85
CmdDisasmDataDefWord4Function · 0.85

Calls 5

Help_Arg_1Function · 0.85
_CmdDefineByteRangeFunction · 0.85
Disassembly_AddDataFunction · 0.85
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected