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

Function CmdDisasmDataDefCode

source/Debugger/Debugger_DisassemblerData.cpp:209–306  ·  view source on GitHub ↗

Undefine Data X X addr X addr:addr Example: DB hgr 2000:3FFF U 1FFF X 1FFF:2001 ===========================================================================

Source from the content-addressed store, hash-verified

207// X 1FFF:2001
208//===========================================================================
209Update_t CmdDisasmDataDefCode (int nArgs)
210{
211 // treat memory (bytes) as code
212 if (! ((nArgs <= 2) || (nArgs == 4)) && (nArgs != 3))
213 {
214 return Help_Arg_1( CMD_DISASM_CODE );
215 }
216
217 DisasmData_t tData; // X 1FFF:2001
218 WORD nAddress = 0; // 8191
219 int iArg = 0;
220
221 if (nArgs == 3)
222 {
223 iArg = 1; // #### : ####
224 nAddress = _GetDataRange( nArgs, iArg, tData );
225 }
226 else
227 {
228 iArg = 2;
229 nAddress = _GetDataRange( nArgs, iArg, tData );
230 }
231
232 // Need to iterate through all blocks
233 // DB TEST1 300:320
234 // DB TEST2 310:330
235 // DB TEST3 320:340
236 // X TEST1
237
238 /*
239 // Edge cases:
240 U 1FFF
241 DB 2000:2005
242 X 1FFF:2001 // Chop 2 head
243 X 2004:2006 // Chop 2 tail
244 X 1FFF:2006 // Chop entire
245
246 U 1FFF
247 DB 2000:2000
248 X 2000:2000 // Chop entire
249
250 U 1FFF
251 DB 2000:2002
252 X 2001:2001 // Chop middle
253
254 U 1FFF
255 DB 2000:2005
256 X 2002:2003 // Chop middle
257 */
258 while (nAddress <= tData.nEndAddress)
259 {
260 DisasmData_t *pData = Disassembly_IsDataAddress( nAddress );
261 if ( pData )
262 {
263 if (( nAddress <= pData->nStartAddress)
264 && (tData.nEndAddress >= pData->nEndAddress ))
265 {
266 // remove entire

Callers

nothing calls this directly

Calls 8

Help_Arg_1Function · 0.85
_GetDataRangeFunction · 0.85
Disassembly_DelDataFunction · 0.85
_GetAutoSymbolNameFunction · 0.85
SymbolUpdateFunction · 0.85
Disassembly_AddDataFunction · 0.85
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected