slviajero / tinybasic

A BASIC interpreter for Arduino, ESP, RP2040, STM32, Infineon XMC and POSIX with IoT and microcontroller features.
GNU General Public License v3.0
203 stars 31 forks source link

LOAD command doenst clear the memory before loading #51

Closed guidol70 closed 1 year ago

guidol70 commented 1 year ago

Hi Stefan, I dont know if it is intended to work so, but when I got a program in memory and do a LOAD the loaded program will be merged with the program in memory (did see this when having a program without REMs in memory and loading CPINEW2.BAS).

MANUAL.md doesnt state that we have to use NEW before loading a new program or that the programs will be merged. On other systems the loaded program will completly replace the program in memory and a merge is only done if you load the program with MERGE "cpinew2.bas"

PS: the BASIC does also compile with the MinGW32 GCC 13.0.1 Snapshot from WinLibs ;)

Kind regards Guido

slviajero commented 1 year ago

;-). Thank you! Added this to the manual. Actually in interachtive mode LOAD = MERGE while in run mode LOAD = CHAIN i.e. truly replaces the program but not the data.

Am 25.03.2023 um 14:05 schrieb Guido Lehwalder @.***>:

Hi Stefan, I dont know if it is intended to work so, but when I got a program in memory and do a LOAD the loaded program will be merged with the program in memory (did see this when having a program without REMs in memory and loading CPINEW2.BAS).

MANUAL.md doesnt state that we have to use NEW before loading a new program or that the programs will be merged. On other systems the loaded program will completly replace the program in memory.

PS: the BASIC does also compile with the MinGW32 GCC 13.0.1 https://github.com/brechtsanders/winlibs_mingw/releases/download/13.0.1-snapshot20230122-10.0.0-msvcrt-r1/winlibs-i686-posix-dwarf-gcc-13.0.1-snapshot20230122-mingw-w64msvcrt-10.0.0-r1.7z Snapshot from WinLibs ;)

Kind regards Guido

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56EUVWFZUQTMIYQKYP3W53URRANCNFSM6AAAAAAWHQW4HY. You are receiving this because you are subscribed to this thread.

slviajero commented 1 year ago

Documented feature in the manual.