| 4524 | //=========================================================================== |
| 4525 | #if 0 // Original - TODO: delete this old "original" code |
| 4526 | Update_t CmdMemoryLoad (int nArgs) |
| 4527 | { |
| 4528 | // BLOAD ["Filename"] , addr[, len] |
| 4529 | // BLOAD ["Filename"] , addr[: end] |
| 4530 | // 1 2 3 4 5 |
| 4531 | if (nArgs > 5) |
| 4532 | return Help_Arg_1( CMD_MEMORY_LOAD ); |
| 4533 | |
| 4534 | bool bHaveFileName = false; |
| 4535 | int iArgAddress = 3; |
| 4536 | |
| 4537 | if (g_aArgs[1].bType & TYPE_QUOTED_2) |
| 4538 | bHaveFileName = true; |
| 4539 | |
| 4540 | // if (g_aArgs[2].bType & TOKEN_QUOTE_DOUBLE) |
| 4541 | // bHaveFileName = true; |
| 4542 | |
| 4543 | if (nArgs > 1) |
| 4544 | { |
| 4545 | if (g_aArgs[1].bType & TYPE_QUOTED_2) |
| 4546 | bHaveFileName = true; |
| 4547 | |
| 4548 | int iArgComma1 = 2; |
| 4549 | int iArgAddress = 3; |
| 4550 | int iArgComma2 = 4; |
| 4551 | int iArgLength = 5; |
| 4552 | |
| 4553 | if (! bHaveFileName) |
| 4554 | { |
| 4555 | iArgComma1 = 1; |
| 4556 | iArgAddress = 2; |
| 4557 | iArgComma2 = 3; |
| 4558 | iArgLength = 4; |
| 4559 | |
| 4560 | if (nArgs > 4) |
| 4561 | return Help_Arg_1( CMD_MEMORY_LOAD ); |
| 4562 | } |
| 4563 | |
| 4564 | if (g_aArgs[ iArgComma1 ].eToken != TOKEN_COMMA) |
| 4565 | return Help_Arg_1( CMD_MEMORY_SAVE ); |
| 4566 | |
| 4567 | std::string sLoadSaveFilePath = g_sCurrentDir; // TODO: g_sDebugDir |
| 4568 | |
| 4569 | WORD nAddressStart; |
| 4570 | WORD nAddress2 = 0; |
| 4571 | WORD nAddressEnd = 0; |
| 4572 | int nAddressLen = 0; |
| 4573 | |
| 4574 | RangeType_t eRange; |
| 4575 | eRange = Range_Get( nAddressStart, nAddress2, iArgAddress ); |
| 4576 | if (nArgs > 4) |
| 4577 | { |
| 4578 | if (eRange == RANGE_MISSING_ARG_2) |
| 4579 | { |
| 4580 | return Help_Arg_1( CMD_MEMORY_LOAD ); |
| 4581 | } |
| 4582 | |
| 4583 | // if (eRange == RANGE_MISSING_ARG_2) |
nothing calls this directly
no test coverage detected