![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - alphas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Edit "Click.bas Plasma |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Good morning Peter, Here are four for your delectation: 1. OPTION DEFAULT MODE without an argument (done through fat fingers) hangs and then crashes MMB4W. 2. Setting OPTION DEFAULT FONT <num> and then using FILES or causing an ERROR returns to the font that MMB4W was originally started with instead of the new DEFAULT FONT. 3. Weird EXECUTE sh*t, note the mysterious "0" at the start of the path it tried to open: ![]() Also can I suggest that: 4. You should actively prevent the user typing a command at the prompt longer than the window (ideally sound the bell) instead of: ![]() ... or even better support commands at the prompt that extend over multiple lines (up to the usual 255 character limit). Best wishes, Tom Edited 2022-02-23 20:40 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Tom Thanks for the reports - all trivial except 4. This is the same on all versions (certainly my ones) and is very difficult to trap - I'll think about it but can't see a sensible way at the moment. On 2 it will return to the default font if in the default mode. If in another mode it will return to a defined sensible default for that mode. This is because after an error you need to know the error message will display which if, for example, you were using the font with only large numbers, it couldn't MMBasic.zip Mauro: This version has OPTION ANGLE implemented as per CMM2 Edited 2022-02-23 21:05 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Yep, I thought it didn't happen with MMB4L, but fortunately I checked before gloating ![]() Will give latest version a spin tomorrow morning; I need to ration my time on this, I spent too much time shedding yesterday and not enough time on the day job. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
V5.07.03a9 MMBasic.zip This version will give a beep when entering a command at the command line as you type the second last character that fits on the screen or if you insert characters that cause the last character to be the second last one that fits on the screen. If you go past this the command will be corrupt but the firmware won't actually stop you. GUI BEEP [duration] also implemented QUIT was implemented some time ago in case you haven't noticed Edited 2022-02-23 22:01 by matherp |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Peter, maybe not so important, but SHIFT+SPACE does nothing, on CMM2 produces standard SPACE. I'm writing BASIC commands in upper case so I'm pretty often not fast enough to release SHIFT before I press SPACE. The because I'm looking to the keyboard and not the screen, I find later all my commands are one long word... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
V5.07.03a10 MMBasic.zip Getting close to beta status ![]() Option colourcode now working WATCHDOG command now working SHIFT-space sends the same as space Timeout on invalid EXECUTE commands now working option autorun now working option autorun will run the last file run, loaded, edited, or autosaved i.e. whatever is shown by mm.info(current) The last file will now be remembered between runs on MMBASIC so if you were working on myfile.bas and then shut down basic, next time you run it you can use EDIT without a filename. Likewise autorun will act as expected whenever MMbasic is started. RESTART command restarts the Basic thread (same as CPU RESTART on othe MMbasic ports) NB: If you specify a file name to run with the MMBasic command this will override any previous file due to be autorun NB: This version will clear all options the first time it is run NB: if you get into a mess with autorun then just delete the .options file in MyDocuments |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
first run (F2) from editor shows nothing second F2 then is working original cmm2 need only one hit on f2. it works but not like the original ![]() ![]() Edited 2022-02-24 12:21 by Plasmamac Plasma |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Is F1, or the FILES command, from the console screen going to work like the CMM2 where you can scroll the list of files/folder select a file to run/edit a file or display a picture, or play a mp3/wav/etc, or open a folder to select a file to to run/edit and that folder then becomes the default folder for the interim? I just want an easy way to manage program folders... and I'm assuming I haven't missed something obvious but I do have age as a factor! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Works perfectly for me - you need to describe exact sequence and provide problem code My current thoughts were that this isn't necessary on a machine with a full OS and separate filemanager application - what is the consensus on this? thoughts? |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
Hi, How to clear (delete) a program from MMBASICA memory? Why doesn't the console add lines with numbers to the program in memory, as is the custom of BASIC? Michal |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
NEW No versions of MMBasic do that since the original Maximite. Line numbers are only there for legacy support, are not needed, and should not be used for new programs. Use the editor to enter a new program |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7505 |
Regarding F1 and FILES, I'm unsure. If MMBasic is an application rather than an emulation then the OS's file management should be used, as that's what applications do. However, if you want to emulate the CMM2 then F1 and FILES should probably do something similar to that really. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
My only concern was that using separate folders for each programme seems iffy.... If I associate .bas files with MMB4W the programs run fine when double clicked as long as any associated files are in the option default folder - which can make it a very busy folder. Of course things work well if I use CHDIR/MKDIR etc commands but MMB4W is a mouse using program and I'm just used to point and click. So, no biggy - just have to change my working habits. |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
I'd rather see a Windows file selector come up rather than the text based CMM2 file selector. |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
Or maybe something like MC, NC, TC, FC? Michal |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Good morning Peter, A fresh selection for your delectation: 1. Setting OPTION DEFAULT PATH immediately changes the current working directory to the new default path. Is this intended? I was suprised. 2. CHDIR into a non-existing directory produces a "rubbish" error message: ![]() 3. I think you should add a mechanism to read environment variables (it would certainly help with my unit-test framework), especially HOMEDRIVE, HOMEPATH and TMP. MMB4L uses MM.INFO$(ENVVAR name$) though that obviously can't handle > 255 chars for which MMB4L users would currently need to use SYSTEM. 4. MM.INFO$(DIRECTORY) does not work the same in MMB4W as it does on the CMM2 (or MMB4L). On the CMM2 you always append the separator "/" but in MMB4W you currently don't append a separator ("\") except when the current directory is the root, e.g. "C:\". Note that CWD$ and MM.INFO$(DIRECTORY) historically have different behaviour in that CWD$ only appends the path separator when the current directory is the root, e.g. "A:/" 5. YMMV but it would aid portability if all your MMBasic implementations supported MM.INFO$(SEPARATOR) to return "/" or "\" as appropriate ... that's assuming you don't want to force MMB4W to automatically convert to the "/" separator used by the CMM2. Best wishes, Tom Edited 2022-02-24 20:15 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Yes, it was intended Fixed I can do TMP but have no idea what HOMEDRIVE, HOMEPATH are in a windows context? I can provide the users documents directory Fixed My ports allow / and \ to be used interchangeably ( except if I missed one) certainly the windows code does. |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
F2 double click 1 . Start mmb a10 2 . Type edit "fantasyname : enter 3 . Type print timer: enter 4 . Press F2 5. Window show : > + cursor 6. Press F2 7. window show Run Timerresult >+ cursor On cmm2 at point 4. the programm starts , show pointer and cursor. Hope this help Plasma |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
I can do TMP but have no idea what HOMEDRIVE, HOMEPATH are in a windows context? I can provide the users documents directory I believe HOMEDRIVE and HOMEPATH are standard Windoze. Open a CMD prompt and type "SET HOMEDRIVE" and "SET HOMEPATH". In any case I was hoping you could be persuaded do it generally not just for specific environment variables, i.e. implement MM.INFO$(ENVVAR name$) in terms of the Windows API function GetEnvironmentVariable(). In MMB4L the equivalent code looks like: static void mminfo_envvar(char *p) { char *name = getCstring(p); char *value = getenv(name); if (!value) value = ""; if (strlen(value) >= STRINGSIZE) { error("Environment variable value too long"); } g_string_rtn = GetTempStrMemory(); g_rtn_type = T_STR; strcpy(g_string_rtn, value); CtoM(g_string_rtn); } My ports allow / and \ to be used interchangeably ( except if I missed one) certainly the windows code does. That's true on input, but the problem is with returned paths where CMM2 uses "/" and MMB4W uses "\" which makes unit-testing the results a little harder than it might be. Anyway, just a suggestion I'm capable of working around it by defining a CONST SEPARATOR$ in terms of the value of MM.DEVICE$ or writing a "canonicalisation" function. Best wishes, Tom Edited 2022-02-24 21:02 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |