![]() |
Forum Index : Microcontroller and PC projects : Pure BASIC with none of this new-fangled stuff
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 8068 |
Pico_TinyBasic.zip Connects via USB ![]() |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
Ooh.... must play! This one is very BASIC, isn't it? There doesn't appear to be any strings and @() isn't implemented. What is it based on? Hurray for WHAT? HOW? SORRY! I see it uses the first 2 characters of a command followed by a full stop. :) Edited 2023-01-22 21:55 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 2983 |
This is tiny basic. 16 bit integers only, no float, no strings, only 26 variables. I modified it 5 years ago to run on a arduino uno. Volhout PETSCII ROBOTS for PicoMiteVGA |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
Yes, but I've had a Tiny BASIC (Palo Alto Tiny BASIC) with a single array called @(). You didn't dimension it, it was automatically dimensioned to use the rest of the memory! It may have been a later version, but variables could hold short strings (but only to print). THere was no string identifier IIRC so it could get interesting. :) This version also has commands that I don't recognise, which is why I asked. :) Edited 2023-01-22 22:07 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 8068 |
I got the source from here There was one major gotcha in running on the PICO. Line numbers are stored as 2 byte values and used in various ways. The Arduino source assumes you can use them as an index but 32 bit processor like the RP2040 can't cope when 2-byte or 4-byte values aren't aligned in memory and the TinyBasic source didn't force this so I had to. Implemented in my version is: |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
Thanks. :) I've been playing, using JustPicoBasic documentation as a guide (although it's a lot bigger it's similar in many ways). Nothing appears to mention MILS. I wondered if it went with DELAY n MILS but apparently not. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 8068 |
MILS a print a |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
cryptic :) Loads the current value of the delay counter into the variable? Edited 2023-01-22 23:34 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
knivd![]() Regular Member ![]() Joined: 07/09/2014 Location: United KingdomPosts: 67 |
@Peter, want to try porting my Bitling BASIC? I have worked hard on optimisations, so it should be quite fast and requires less than 2k RAM for system needs. I just published the sources for the first time: https://github.com/knivd/Bitling-BASIC |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 8068 |
Interesting. It's quite a bit of work (TinyBasic was trivial and done to show the GOSUB and line-number lovers how much things have moved on) and I'm not sure that porting as a general purpose Basic is worthwhile given the huge amount of work now in the PicoMite MMBasic port. However, it might be interesting if targetted to a stand-alone dedicated bit of H/W like you have done with the Ello LC1. Obviously the RP2040 has far more capability than a PIC18F but is relatively short of I/O pins. Driving a RGB LCD panel is feasible though the PIO mechanism (same as VGA) although the colour palette would be limited in order to have a memory resident framebuffer. Keyboard is more tricky. The ELLO approach is one way as is on screen touch. Send me a PM if this makes any sense |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 2824 |
Any chance to add or alias DO ... LOOP? PicoMite, Armmite F4, SensorKits on fruitoftheshed |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 2983 |
Hihi, MILS a is something I added to tinybasic. And VARS and HELP. And SERVO (timer controlled). They must have taken my source...hihi The big issue with it was that there is no edit function. You have to retype the whole line. It was fast though, 30k lines per second on an UNO. Volhout PETSCII ROBOTS for PicoMiteVGA |
||||
knivd![]() Regular Member ![]() Joined: 07/09/2014 Location: United KingdomPosts: 67 |
There is... REPEAT... UNTIL |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 343 |
Peter! This is really cool. Before I know that something more powerful like MMBASIC exists, I used exact this TinyBasic for Arduino stuff and modified it with my own statements and functions. Making it available for the Pico is cool too! I will definitly give it a try, especially for really simple stuff! Thank you very much! -Daniel |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
I was running it on a 2MHz Z80 on a Nascom-1. IIRC it was in an EPROM as there probably wouldn't have been enough space for it, with the user program, in 960 (?) bytes of RAM. It's a few years ago now. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 2983 |
The UNO version also only had 800-900 bytes free (2k RAM) for program. Apparantly someone did compile it with AVR-gcc, and squeezed another 200 bytes out of it (improved stack usage ? the Arduino toolchain did not have the best settings for memory usage on RAM. PETSCII ROBOTS for PicoMiteVGA |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
The Nascom-1 had a 2k EPROM area for the monitor (the early monitors were only 1k). Then there was 1k RAM for the memory-mapped video. Characters outside the scan area weren't used so some people actually managed to write programs for the video RAM! Then there was a second 1k of RAM, but part of it was used by the monitor. The user was left with about 960 bytes IIRC. The monitor was clever though, using the Z80 restart addresses to create commands. e.g. 0EFH followed by a string of ASCII characters terminated by 00H would send the text to the current output stream. A later one was RCAL, which implemented a relative call for subroutines. That allowed the monitor to be relocated anywhere in memory. The monitor's command table could be expanded as the address of it was in RAM, as were the addresses of the input and output routines. Pretty clever stuff for a SBC in 1977/78. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 116 |
This should fit on a RISC V |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 5052 |
Well, you know what to do..... ;) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() |