Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.01 release candidates - please test thoroughly
![]() ![]() ![]() ![]() |
||||||
javavi It can't and won't happen. For example the FILES command clears all variables to free up the space to load and sort the file list so is completely incompatible with being used from a running program. You keep asking for the same thing but however you frame the question it still is going to be NO - sorry |
||||||
Hi Peter/Geoff Running RC7 USB on a genuine 2040. Using a USB keyboard (via adaptor) and monitoring activity via the console using TeraTerm. Two observations as follows: 1: What are the valid parameters for OPTION BAUDRATE? Probably worth adding the values into the manual if not already done so 2: OPTION BREAK nn Does not appear to do anything. Is the example in the manual correct (value 4 for Ctrl-D)? I would understand hex 44 ( being the hex ascii value for ‘D’). As per manual, my project ideally requires using a parameter value of zero to disable the break capability. Note - I can enter the command and no error generated (and Pico doesn’t reset); however, there is also no acknowledgement in OPTION LIST Hope the above helps but do reach out if more info needed….. |
||||||
@javavi, The only concrete use case you've presented is calling FILES. Write your own BASIC implementation of this command (2 hours or less) and "call" it using RUN. Edit: OK, your recent post mentions OPTIONs too; that is a perennial bugbear, the source is on GitHub for the adventurous ![]() Best wishes, Tom Edited 2024-12-14 19:58 by thwill |
||||||
@matherp @thwill I give the FILES command only as an example, but in a broad sense it should allow to execute any string of commands since they can be executed from the shell (system) command line. I do not require that this be done directly without interrupting the program, let the program terminate when executing this command and pass the argument to the prompt command line. This is easy to implement, right?! For example, the user entered a command in the File Manager working as a shell and it will expect that this command will be executed. Or the program can offer the user to configure the hardware, buffer, etc. using OPTION ... Another example, in the shell I can execute a whole line of a basic program > For i=32 to 255:Print Chr$(i);:Next Edited 2024-12-14 20:27 by javavi |
||||||
I'm not saying you should do this Peter (because I suspect it is the thin end of a wedge), but have a new SYSTEM command work like my implementation of RUN/MM.CMDLINE$ and store the argument in a global after clearing the current state. Then have the prompt loop query that global and if it is set run the commands therein? Best wishes, Tom Edited 2024-12-15 02:25 by thwill |
||||||
Peter/Geoff, In my post above (regarding OPTION BREAK nn) could it be that it only applies to PS2 keyboards and not USB keyboards? |
||||||
Right, so as I suspected/feared STR_REPLACE is coded with some knowledge of what it might be expected to replace, except it is used to implement #DEFINE which takes a user specified argument so there are presumably some "random" argument values to #DEFINE that won't work as expected. Might be better if #DEFINE / STR_REPLACE didn't replace within string literals at all, but could still replace an entire literal, quotes and all. I may of course be talking out of my arse, Tom Edited 2024-12-14 23:10 by thwill |
||||||
javavi You can try this HDMIUSB version (as can anyone else) PicoMite.zip Any string after an explicit END command will be executed as if at the command prompt e.g. END "Option resolution 1024" |
||||||
I see Peter has offered a way to do that but note if the command causes an error you're pretty much guaranteed to be left at the prompt (>). BTW You keep mentioning shell or system. In the DOS MMBasic it runs inside a shell (COMMAND.COM or whatever) and has lots of RAM, in which it can run a sub-shell. There's no equivalent in MMBasic when it runs on the "bare metal" (as Maximite, Micromite, Picomite, etc, all do). There's no shell at all let alone a sub-shell. John Edited 2024-12-15 00:27 by JohnS |
||||||
@matherp Peter, You also gave me a problem in response 8)) Can I ask for any other version of PicoMite without USB for testing? And I will be happy to test it. PS: But I managed, I blindly directed OPTIONS to my scheme. Edited 2024-12-15 00:37 by javavi |
||||||
|
||||||
Yes, I checked it and it works, everything but again not the FILES command (for example)) I think that it is possible to make an optional start of line execution if the ENTER symbol is not inserted at the end of the line. END "Option list"+Ghr$(13) END "'Goodbye!" |
||||||
Try now PicoMite.zip Files should work Your suggestion is impracticable/impossible/crazy - what does end mean? |
||||||
See that wedge, it has a fat end too ![]() Edited 2024-12-15 02:25 by thwill |
||||||
I've not tested this but I suspect that nothing would happen after the 'END "Option list"' line as the line would be executed just like a normal BASIC statement (the +Chr$(13) is probably superfluous and may not be executed as it's not actually a part of the string). If you do something in that line that removes the current program from memory or you try to set an OPTION that needs a reboot then that's it, you're at the prompt. There isn't a way around that because the command has finished being processed. Once the MMBasic command interpreter stops running there's no underlying system other than dropping back into command line mode. While it is running all you can do is FLASH CHAIN or use GOTO to jump to sub-programs that form a part of your main one. Everything has to be currently in flash. |
||||||
Yes, I checked it, now the FILES command is executed too! But I noticed that if you type a non-existent command, the system freezes. I meant that if the carriage return symbol is not added to the argument line of the END command, the line is only entered in the prompt but is not executed. For example, you can return some comment as a message after executing the program. ... END "'The End!" > 'The End! Edited 2024-12-15 02:42 by javavi |
||||||
One more try PicoMite.zip You don't put a CR on the string MMBasic does this automatically END "FILES" is all that is needed |
||||||
Yes, now it works fine and even shows errors and does not reboot ![]() ... End "Files \q*\q,size" End "LIST COMMANDS" End "Option resolution 1024" End "'TheEnd" End "For i=32 to 255:Print Chr$(i);:Next" Well, this already pulls on PicoMite version 6.01.00 ![]() Edited 2024-12-15 03:06 by javavi |
||||||
V6.00.01RC8 PicoMiteRP2040V6.00.01RC8.zip PicoMiteRP2350V6.00.01RC8.zip Fixes OPTION BREAK for USB connected keyboards New functions for web firmware MM.INFO(TCP PORT) ' returns the TCP PORT set as a server or 0 if not set MM.INFO(UDP PORT) ' returns the UDP PORT set as a server or 0 if not set New capability for the end command END command$ if command$ is specified then it will be executed as though at the command prompt after the program finishes NB: if "END command$" is used but a subroutine MM.END exists it will be executed and cmd$ ignored. The new end facility adds a nice new capability. For web applications in particular it may be prudent to restart them every day in the same way as routers often have a routine reboot programmable. This can be done very simply as follows: if mm.info(uptime)>86400 then End "print "+Chr$(34)+"rebooting"+Chr$(34)+":CPU restart" endif Edited 2024-12-15 04:57 by matherp |
||||||
Wow that was quick! Thanks Peter ![]() I tried your 'END command$' example but got this error After which I get the WD firing (as it should) Am I missing something? re: Longstring UDP - No worries using 255 byte strings. Can be manipulated by other methods Edit: Scratch that... I was missing something - the MM.END sub Edited 2024-12-15 06:14 by Malibu |
||||||
![]() ![]() ![]() ![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. |