|
Forum Index : Microcontroller and PC projects : PicoMite V7.00.00b8 and release candidates
| Author | Message | ||||
| terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 164 |
Hello Peter! What is the reason of this behavior?: PRINT “a”,”aa” will output a aa PRINT “aa”,”aa” will output aa aa PRINT ”aaa”,”aa” will output aaa aa, etc If there is odd number of character in the first string comma will produce one character space between strings. If there is even number of character comma will produce two spaces (this is a TAB (set 2 in OPTION TAB). Second string isn’t matter can be any string. Question is the odd cases why only just one space instead of tab? Webmite version of RC8, Picocalc. G@bor Edited 2026-11-14 19:42 by terekgabor |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9341 |
Comma moves the cursor to the next tab position, measured from the first column on the screen it has nothing to do with the number of spaces. TAB(2) PRINT "a","b" a b 'because the cursor moves to column 2 ("a" is in column 0 and "b" is in column 2) PRINT "aa","b" aa b 'the space is in the TAB position so "b" appears in column 3 Small numbers of TAB positions are pointless really. It's not meant for that. OPTION TAB works differently. It has nothing to do with the commas in the printout. It's for data entry, not printout. . Edited 2026-11-14 20:15 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 164 |
This is clear now! Thank you! |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 881 |
Hi Peter, Just had a chance to test RC9 I am now getting a different error but am unsure what it is complaining about. It appears to be the subscripts being used in variable fire2? I can't see anything wrong, and it works as a pure MMBasic program. It was failing on the original program I attached above, so I attempted to make changes to cure it, but it still fails with my latest incarnation, also attached. Any advice appreciated. Regards Kevin. flamedemo.zip python mmb2csub.py ../examples/flamedemo.bas animate -O2 C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c: In function 'f_animate': C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c:42:50: error: subscripted value is neither array nor pointer nor vector 42 | if (((__gp___s0_fire2[(int)((*p_yi))][(int)(v_x)]) == (v_fr))) { | ^ C:\Users\Kevin\pico\mmb2csub\mmb2csub\examples\flamedemo_animate.c:46:48: error: subscripted value is neither array nor pointer nor vector 46 | __gp___s0_fire2[(int)((*p_yi))][(int)(v_x)] = v_fr; | ^ Traceback (most recent call last): File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 312, in <module> main() ~~~~^^ File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 273, in main objs = [compile_c(s, args.include, args.opt, args.cpu) for s in objs] ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Kevin\pico\mmb2csub\mmb2csub\user-tools\armcfgen.py", line 221, in compile_c subprocess.run([GCC, *CPUS[cpu], "-O" + opt, *inc, "-o", obj, src], check=True) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python313\Lib\subprocess.py", line 579, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['arm-none-eabi-gcc', '-c', '-mcpu=cortex-m0plus', '-mthumb', '-ffreestanding', '-fno-exceptions', '-fpie', '-mpic-data-is-text-relative', '-msingle-pic-base', '-ffunction-sections', '-fdata-sections', '-fno-jump-tables', '-O2', '-I', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub', '-I', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub\\user-tools', '-o', 'C:\\Users\\Kevin\\AppData\\Local\\Temp\\tmpekddl9jx.o', 'C:\\Users\\Kevin\\pico\\mmb2csub\\mmb2csub\\examples\\flamedemo_animate.c']' returned non-zero exit status 1. error: the CSUB did not compile. 'undefined reference to mm_xxx' means that MMBasic feature has no CSUB runtime yet; 'undefined reference to __aeabi_xxx' means an arithmetic helper is missing from mmcsub.h. Either way the tool is telling you the truth - do not work around it. Edited 2026-11-14 20:45 by Bleep |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12203 |
Thanks Kevin, two bugs in mmb2csub, both fixed . A STATIC array with two or more dimensions was given the wrong pointer type in the C. Worse, Static Integer fire2(160,20) was declared without its bounds in the BASIC wrapper the tool writes, so once it compiled the CSUB would have written past a single number. Your animate now converts. The fix is all in mmb2csub.py, so replacing that one file in your RC9 tools is enough, or take the new zip. mmb2csub also now refuses any routine with a line its translator can't handle, instead of quietly leaving the line out of the CSUB. |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 744 |
OPTION TAB sets the tab positions for the comma in a PRINT statement as well as the TAB key. I wish they were independent but they're not. PRINT "a","b" will print differently depending on OPTION TAB. I've modified my own copy of MMBasic to use OPTION TAB 10 (for PicoCalc) and 18 (for Pico Computer 3) as well as the standard TAB positions. |
||||
| mozzie Guru Joined: 15/06/2020 Location: AustraliaPosts: 511 |
G'day Peter, It looks like there may still be a gremlin in the USB system, although this may be an edge-use case. With a Combo Keyboard / Mouse on USB port 1 (USB 1/2), Generic Gamepad on USB port 2 (USB 3) and a CDC device on USB port 3 (USB 5) the PC3 will freeze the USB hub after a random interval, the PC3 is still running and will work from the console. This seems to be random but is also sensitive to mouse usage, fast movement of the mouse is far more likely to cause the fault. It is possible that having the Keyboard / Mouse in port 4 makes it more prevalent but hard to confirm. At times the USB stops working with no obvious signs and at others the HUB and port indicators turn off as well, only a reset / power cycle brings it back. Voltage at the ports is 4.98V and no problems with the current setup have been noticed before, although this is with the new USB gamepad now supported. > option list PicoMitePC3 MMBasic USB RP2350B Edition V7.00.00RC9 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION SYSTEM I2C GP20,GP21 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION MOUSE SENSITIVITY 1.0000 OPTION KEYBOARD US OPTION PICO OFF OPTION RESOLUTION 1024x600 @ 252000KHz OPTION DISPLAY 50, 128 OPTION HDMI PINS 1, 3, 5, 7 OPTION RADIO BLUETOOTH OPTION GUI CONTROLS 128 OPTION SDCARD GP33, GP30, GP31, GP28 OPTION AUDIO BLUETOOTH 30 OPTION RTC AUTO ENABLE OPTION COUNT GP34,GP35,GP36,GP37 OPTION PLATFORM PICO COMPUTER 3 OPTION PSRAM PIN GP47 > Also seeing this: ���w���/��cD�1B�� (or similar) when I power up the PC3 in TeraTerm, is this expected? RC9 was re-loaded after flash-nuke with no change. The Flash_Nuke_Universal also does not wipe the "A" drive. I will re-load rc8 and see if that is different. Regards, Lyle. UPDATE: the CDC device is not necessary to cause the problem, the Keyboard / Mouse and Gamepad are enough, the CDC device causes it to happen earlier. On a couple of resets, just typing a couple of keys on the keyboard will either lockup or go into auto repeat by itself. Edited 2026-11-14 23:01 by mozzie |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 881 |
Hi Peter, Yes that's working great now thanks :-) The rest of this post was removed, because I found out in the the docs that a Static is effectively declared as a global in the main body of the code, when it is compiled, so will have no effect on speed. Regards Kevin. Edited 2026-11-15 03:58 by Bleep |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |