| 4894 | //=========================================================================== |
| 4895 | #if 0 // Original - TODO: delete this old "original" code |
| 4896 | Update_t CmdMemorySave (int nArgs) |
| 4897 | { |
| 4898 | // BSAVE ["Filename"] , addr , len |
| 4899 | // BSAVE ["Filename"] , addr : end |
| 4900 | // 1 2 3 4 5 |
| 4901 | static WORD nAddressStart = 0; |
| 4902 | WORD nAddress2 = 0; |
| 4903 | static WORD nAddressEnd = 0; |
| 4904 | static int nAddressLen = 0; |
| 4905 | |
| 4906 | if (nArgs > 5) |
| 4907 | return Help_Arg_1( CMD_MEMORY_SAVE ); |
| 4908 | |
| 4909 | if (! nArgs) |
| 4910 | { |
| 4911 | if (nAddressLen) |
| 4912 | { |
| 4913 | ConsoleBufferPushFormat( "Last saved: $%04X:$%04X, %04X", |
| 4914 | nAddressStart, nAddressEnd, nAddressLen ); |
| 4915 | } |
| 4916 | else |
| 4917 | { |
| 4918 | ConsoleBufferPush( "Last saved: none" ); |
| 4919 | } |
| 4920 | } |
| 4921 | else |
| 4922 | { |
| 4923 | bool bHaveFileName = false; |
| 4924 | |
| 4925 | if (g_aArgs[1].bType & TYPE_QUOTED_2) |
| 4926 | bHaveFileName = true; |
| 4927 | |
| 4928 | // if (g_aArgs[1].bType & TOKEN_QUOTE_DOUBLE) |
| 4929 | // bHaveFileName = true; |
| 4930 | |
| 4931 | int iArgComma1 = 2; |
| 4932 | int iArgAddress = 3; |
| 4933 | int iArgComma2 = 4; |
| 4934 | int iArgLength = 5; |
| 4935 | |
| 4936 | if (! bHaveFileName) |
| 4937 | { |
| 4938 | iArgComma1 = 1; |
| 4939 | iArgAddress = 2; |
| 4940 | iArgComma2 = 3; |
| 4941 | iArgLength = 4; |
| 4942 | |
| 4943 | if (nArgs > 4) |
| 4944 | return Help_Arg_1( CMD_MEMORY_SAVE ); |
| 4945 | } |
| 4946 | |
| 4947 | // if ((g_aArgs[ iArgComma1 ].eToken != TOKEN_COMMA) || |
| 4948 | // (g_aArgs[ iArgComma2 ].eToken != TOKEN_COLON)) |
| 4949 | // return Help_Arg_1( CMD_MEMORY_SAVE ); |
| 4950 | |
| 4951 | char sLoadSaveFilePath[ MAX_PATH ]; |
| 4952 | strcpy( sLoadSaveFilePath, g_sCurrentDir ); // g_sProgramDir |
| 4953 |
nothing calls this directly
no test coverage detected