diff --git a/doc/Extended-BASIC.md b/doc/Extended-BASIC.md index 0e0e09cf..42765376 100644 --- a/doc/Extended-BASIC.md +++ b/doc/Extended-BASIC.md @@ -7,19 +7,19 @@ NOTE: Command syntax, behaviour details, and tokens are still subject to change! The DOS Wedge commands are only available in direct mode, and they have to start from the first character of the line. -### `@` +### `@` (all) Displays the error/status read from the current drive. Current drive is either the last device used by any I/O command, the one set by DOS Wedge command, or 8 as a fallback. -### `@$` +### `@$` (all) Displays the directory of the current drive. Does not destroy BASIC program in memory. -### `@device_number` +### `@device_number` (all) Changes the current drive number. -### `@command` +### `@command` (all) Sends the DOS command to the current drive. @@ -27,55 +27,55 @@ Sends the DOS command to the current drive. The Tape Wedge commands are only available in direct mode, and they have to start from the first character of the line. -### `←L ["file_name"]` +### `←L ["file_name"]` (all) Loads the file from tape. Depending on the configuration, it tries to load the file in TurboTape 64 format, in the standard CBM format, or autodetects the file format. -### `←M ["file_name"]` +### `←M ["file_name"]` (all) Like above, but merges a BASIC program to the one already stored in memory. -### `←H` +### `←H` (Mega65) Launches a built-in tape head alignment tool. Destroys program in memory. Press `RUN/STOP` to terminate the tool. ## Additional BASIC commands - I/O -### `MERGE "file_name" [, device_number]` +### `MERGE "file_name" [, device_number]` (all) Appends the BASIC program from a storage medium to the one currently present in memory. -### `BLOAD "file_name", device_number, start_address` +### `BLOAD "file_name", device_number, start_address` (all) Loads a binary file starting from the given memory location. Does not clear variables, does not perform BASIC program relinking, etc. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented. -### `BVERIFY "file_name", device_number, start_address` +### `BVERIFY "file_name", device_number, start_address` (all) Verify operation for the binary data starting from a given addres. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented. -### `BSAVE "file_name", device_number, start_address, end_address` +### `BSAVE "file_name", device_number, start_address, end_address` (all) Saves the binary data from the given memory area. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented. ## Additional BASIC commands - misc -### `COLD` +### `COLD` (Mega65) Resets the machine. In direct mode asks for confirmation first. -### `FAST` +### `FAST` (all) Tries to switch the machine to turbo mode - details differ depending on the configured machine / motherboard. -### `SLOW` +### `SLOW` (all) Tries to switch the machine back to 1 MHz operation mode. -### `OLD` +### `OLD` (all) Tries to restore program destroyed by the `NEW` command or a reset. -### `MEM` +### `MEM` (Mega65) Displays BASIC memory usage information: * `TEXT` - size of BASIC program text, always at least 2 bytes are used @@ -84,10 +84,10 @@ Displays BASIC memory usage information: * `STRS` - bytes occupied by strings, also the ones belonging to arrays * `FREE` - unused space -### `CLEAR` +### `CLEAR` (all) Clears the screen content. -### `DISPOSE` +### `DISPOSE` (all) Runs the garbage collector - disposes outdated strings. diff --git a/src/basic/basic_commands_CC/cmd__jumptable_CC.s b/src/basic/basic_commands_CC/cmd__jumptable_CC.s index 68245e36..97109edf 100644 --- a/src/basic/basic_commands_CC/cmd__jumptable_CC.s +++ b/src/basic/basic_commands_CC/cmd__jumptable_CC.s @@ -6,6 +6,7 @@ // Jumptable for BASIC commands with tokens prefixed by $CC // +#if !HAS_SMALL_BASIC .const command_CC_list = List().add( @@ -17,12 +18,31 @@ cmd_bsave, cmd_bverify, - cmd_cold, cmd_clear, varstr_garbage_collect, // cmd_dispose + + cmd_cold, cmd_mem ) +#else + +.const command_CC_list = List().add( + + cmd_old, + + cmd_merge, + + cmd_bload, + cmd_bsave, + cmd_bverify, + + cmd_clear, + varstr_garbage_collect // cmd_dispose +) + +#endif + #if !HAS_OPCODES_65C02 diff --git a/src/basic/basic_commands_CC/cmd_cold.s b/src/basic/basic_commands_CC/cmd_cold.s index e7300a4a..21f9cc05 100644 --- a/src/basic/basic_commands_CC/cmd_cold.s +++ b/src/basic/basic_commands_CC/cmd_cold.s @@ -3,6 +3,8 @@ // #LAYOUT# * * #IGNORE +#if !HAS_SMALL_BASIC + cmd_cold: jsr helper_ask_if_sure @@ -12,3 +14,5 @@ cmd_cold: jmp (vector_reset) // hardware CPU vector !: rts + +#endif diff --git a/src/basic/basic_commands_CC/cmd_mem.s b/src/basic/basic_commands_CC/cmd_mem.s index ded5d334..debd0e0c 100644 --- a/src/basic/basic_commands_CC/cmd_mem.s +++ b/src/basic/basic_commands_CC/cmd_mem.s @@ -4,6 +4,7 @@ // #LAYOUT# * * #IGNORE +#if !HAS_SMALL_BASIC #if (!ROM_LAYOUT_M65 || SEGMENT_BASIC_0) @@ -144,3 +145,5 @@ cmd_mem_next: #endif // ROM layout + +#endif // !HAS_SMALL_BASIC diff --git a/src/basic/basic_commands_CC/helper_ask_if_sure.s b/src/basic/basic_commands_CC/helper_ask_if_sure.s index 2d554b7c..e274b38e 100644 --- a/src/basic/basic_commands_CC/helper_ask_if_sure.s +++ b/src/basic/basic_commands_CC/helper_ask_if_sure.s @@ -9,6 +9,8 @@ // +#if !HAS_SMALL_BASIC + helper_ask_if_sure: #if (ROM_LAYOUT_M65 && SEGMENT_BASIC_0) @@ -75,3 +77,5 @@ helper_ask_if_sure_ok: #endif // ROM layout + +#endif // !HAS_SMALL_BASIC diff --git a/src/basic/basic_commands_CC/helper_mem_tab_str.s b/src/basic/basic_commands_CC/helper_mem_tab_str.s index 816add66..8bf56176 100644 --- a/src/basic/basic_commands_CC/helper_mem_tab_str.s +++ b/src/basic/basic_commands_CC/helper_mem_tab_str.s @@ -7,6 +7,7 @@ // Helper table for 'MEM' command - list of strings to print // +#if !HAS_SMALL_BASIC helper_mem_tab_str: @@ -15,3 +16,5 @@ helper_mem_tab_str: .byte IDX__STR_MEM_ARRS .byte IDX__STR_MEM_VARS .byte IDX__STR_MEM_TEXT + +#endif \ No newline at end of file diff --git a/src/basic/basic_commands_CC/helper_mem_tab_x.s b/src/basic/basic_commands_CC/helper_mem_tab_x.s index 2df7e5f9..ec74d04a 100644 --- a/src/basic/basic_commands_CC/helper_mem_tab_x.s +++ b/src/basic/basic_commands_CC/helper_mem_tab_x.s @@ -7,6 +7,7 @@ // Helper table for 'MEM' command - list of minuend zeropage variables // +#if !HAS_SMALL_BASIC helper_mem_tab_x: @@ -15,3 +16,5 @@ helper_mem_tab_x: .byte STREND .byte ARYTAB .byte VARTAB + +#endif diff --git a/src/basic/basic_commands_CC/helper_mem_tab_y.s b/src/basic/basic_commands_CC/helper_mem_tab_y.s index 74861e4a..d8a02f22 100644 --- a/src/basic/basic_commands_CC/helper_mem_tab_y.s +++ b/src/basic/basic_commands_CC/helper_mem_tab_y.s @@ -7,6 +7,7 @@ // Helper table for 'MEM' command - list of subtrahend zeropage variables // +#if !HAS_SMALL_BASIC helper_mem_tab_y: @@ -15,3 +16,5 @@ helper_mem_tab_y: .byte ARYTAB .byte VARTAB .byte TXTTAB + +#endif diff --git a/src/basic/wedge/wedge_dos.s b/src/basic/wedge/wedge_dos.s index ace10a2c..dae70840 100644 --- a/src/basic/wedge/wedge_dos.s +++ b/src/basic/wedge/wedge_dos.s @@ -60,6 +60,8 @@ wedge_dos: wedge_dos_command: +#if !HAS_SMALL_BASIC + // Check if command needs confirmation ldy #$00 @@ -106,6 +108,8 @@ wedge_dos_command_ask: wedge_dos_command_confirmed: +#endif // !HAS_SMALL_BASIC + // Provide command name jsr wedge_dos_setnam diff --git a/tools/generate_strings.cc b/tools/generate_strings.cc index 1c6da077..623e6a46 100644 --- a/tools/generate_strings.cc +++ b/tools/generate_strings.cc @@ -183,10 +183,10 @@ const StringEntryList GLOBAL_Keywords_CC = { ListType::KEYWORDS, "keywords_CC", { true, true, true, true, "KCC_03", "BLOAD", }, // http://www.antonis.de/qbebooks/gwbasman/bload.html { true, true, true, true, "KCC_04", "BSAVE", }, // http://www.antonis.de/qbebooks/gwbasman/bsave.html { true, true, true, true, "KCC_05", "BVERIFY", }, - { true, true, true, true, "KCC_06", "COLD", }, // Not present in CBM BASIC dialects, but common to some extensions (*) - { true, true, true, true, "KCC_07", "CLEAR", }, // Not present in CBM BASIC dialects, OpenROMs specific - { true, true, true, true, "KCC_08", "DISPOSE", }, // Not present in CBM BASIC dialects, OpenROMs specific - { true, true, true, true, "KCC_09", "MEM", }, // Not present in CBM BASIC dialects, OpenROMs specific + { true, true, true, true, "KCC_06", "CLEAR", }, // Not present in CBM BASIC dialects, OpenROMs specific + { true, true, true, true, "KCC_07", "DISPOSE", }, // Not present in CBM BASIC dialects, OpenROMs specific + { false, true, false, false, "KCC_08", "COLD", }, // Not present in CBM BASIC dialects, but common to some extensions (*) + { false, true, false, false, "KCC_09", "MEM", }, // Not present in CBM BASIC dialects, OpenROMs specific // (*) see https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/petcat.c } }; @@ -316,17 +316,17 @@ const StringEntryList GLOBAL_MiscStrings = { ListType::STRINGS_BASIC, "misc", { true, true, true, true, "STR_READY", "\rREADY.\r" }, // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser { true, true, true, true, "STR_ERROR", " ERROR" }, // simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html { true, true, true, true, "STR_IN", " IN " }, - { true, true, true, true, "STR_IF_SURE", "\rARE YOU SURE? " }, // https://docs.microsoft.com/en-us/windows/win32/uxguide/mess-confirm + { false, true, false, false, "STR_IF_SURE", "\rARE YOU SURE? " }, // https://docs.microsoft.com/en-us/windows/win32/uxguide/mess-confirm // STD M65 U64 X16 --- misc strings specific to OpenROMs, not present in CBM ROMs { true, true, true, true, "STR_BRK_AT", "\rBRK AT $" }, - { true, true, true, true, "STR_MEM_HDR", "\r\x12 AREA START SIZE \r" }, - { true, true, true, true, "STR_MEM_1", " $" }, - { true, true, true, true, "STR_MEM_2", " " }, - { true, true, true, true, "STR_MEM_TEXT", "\r TEXT" }, - { true, true, true, true, "STR_MEM_VARS", "\r VARS" }, - { true, true, true, true, "STR_MEM_ARRS", "\r ARRS" }, - { true, true, true, true, "STR_MEM_STRS", "\r STRS" }, - { true, true, true, true, "STR_MEM_FREE", "\r\r FREE" }, + { false, true, false, false, "STR_MEM_HDR", "\r\x12 AREA START SIZE \r" }, + { false, true, false, false, "STR_MEM_1", " $" }, + { false, true, false, false, "STR_MEM_2", " " }, + { false, true, false, false, "STR_MEM_TEXT", "\r TEXT" }, + { false, true, false, false, "STR_MEM_VARS", "\r VARS" }, + { false, true, false, false, "STR_MEM_ARRS", "\r ARRS" }, + { false, true, false, false, "STR_MEM_STRS", "\r STRS" }, + { false, true, false, false, "STR_MEM_FREE", "\r\r FREE" }, // Note: depending on configuration, additional strings will be added here } };