lauer
Starting Member
- Total Posts : 38
- Reward points : 0
- Joined: 2003/11/07 12:35:15
- Status: offline
Minibasic for Pic32
I saw a nice implementation of the Minibasic interpreter for an NXP LPC2000 Arm chip, done by Dan Marks. The project is created with the GNU tool chain and move easy to the PIC C32 compiler. You can find it at the yahoo lpc2000 group. That might be something nice to implement for the PIC32 too. The PIC32 has a 'real' stack now and can execute code from RAM, which makes it a lot easier to port some source code projects. regards Peter
|
Kiwi Mike AZ
Super Member
- Total Posts : 2056
- Reward points : 0
- Status: offline
RE: Minibasic for Pic32
2007/11/28 13:08:51
(permalink)
I presume you are talking about This link I have been looking for a GNU/GPL version of basic interpreter to port ... so far nothing really suitable (most are for Linux/Windows and are LARGE as far as code size goes) I will see what licencse his code is released under and will evaluate it. Otherwise may have to write one (Haven't written an interpreter since the late 80's) Mike
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/11/28 13:12:31
(permalink)
Yeah, I'm taking a look as well. Same here, I've been developing some interpreters in the past - I should have a Z80 Basic (written in C) from 1994... EDIT: I found it http://adpm.homeip.net/files/skybasic.c (be kind with it, I was very young  )
post edited by DarioG - 2007/11/28 13:20:57
|
jarin
Super Member
- Total Posts : 848
- Reward points : 0
- Joined: 2005/05/23 13:50:02
- Status: offline
RE: Minibasic for Pic32
2007/11/28 13:36:05
(permalink)
Dario, I was curious how looks that code, but I've got message "La pagina specificata non esiste", and as far as I understand Italian (and I really don't understand a word) it's something like "Haha man, it's not there, go on searching" Is that link broken or you removed that source?
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/11/28 13:50:21
(permalink)
There was an error - try again now Jarin
|
jarin
Super Member
- Total Posts : 848
- Reward points : 0
- Joined: 2005/05/23 13:50:02
- Status: offline
RE: Minibasic for Pic32
2007/11/28 13:56:32
(permalink)
I tried http://adpm.homeip.net/files/skybasic.c and again, non trovato. But I can reach this http://adpm.homeip.net so I assume there is still problem with this particular file. But it's really not urgent, I was just curious. EDIT: I've got it, problem was on my side. Lack of intelligence between chair and keyboard.
post edited by jarin - 2007/11/28 13:58:46
|
Kiwi Mike AZ
Super Member
- Total Posts : 2056
- Reward points : 0
- Status: offline
RE: Minibasic for Pic32
2007/11/28 15:23:29
(permalink)
License from Mini BASIC source code follows So should not have any problems wit porting it - and I see someone has already asked permission. Mike /***************************************************************** * Mini BASIC * * by Malcolm McLean * * version 1.0 * * (modified by DLM) * * DLM changes under same permissive license as original McLean * * license * *****************************************************************/ /* License from http://www.personal.leeds.ac.uk/~bgy1mm/Minibasic/MiniBasicHome.html You can do virtually anything you like with this code, including incorporating it into your own programs, or modifying as the basis for a scripting language of your own. It would be nice to be acknowledged but I don't insist on it - you can pretend that you created the program on your own if it makes your boss happy. The only thing you can't do is restrict my rights in the program in any way. So any derivative works or enhancements I can use as I see fit. */
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/11/28 17:00:30
(permalink)
Good Jarin - thanks for your interest! (8 downloads so far  ) PS: Thank you Mike!
|
lauer
Starting Member
- Total Posts : 38
- Reward points : 0
- Joined: 2003/11/07 12:35:15
- Status: offline
RE: Minibasic for Pic32
2007/11/29 08:51:58
(permalink)
Dan Marks replied that he is fine with using and porting his code to the PIC32. His and the original minibasic author's reference have to be in the code and the documentation. I was able to download the code from the yahoo groups site. There are nice extentions to the minbasic, like functions for PWM and ADC. Peter
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/11/29 12:29:31
(permalink)
For those interested, I compiled both my SkyBasic and Minibasic in C18, for a generic 18F2620. Since first won't probably be of any interest  I place a link to the project for the second one: http://adpm.homeip.net/files/MiniBasic.zip I just adapted a few things (namely, Max FOR Depth from 32 to 8, and Max Identifier names length from 32 to 8). I've left out Peripheral Support at the moment (BTW, Peter, where can I find those nice hardware extensions? thanks) and, what probably would be more important, an Output (and Input as well) device - maybe a LCD and a keyboard would do fine, or a serial RS232 link. Oh, Last but very important: I simply skipped malloc() - if someone wants to implement it, maybe using one of the hints that were given in the past... or just "fake" it with a fixed block of RAM ... ! PS: Code sizes 29K unoptimized and 14K optimized. 450bytes of RAM used, apart from any malloc. Extended mode. PS/2: My SkyBasic is much smaller
post edited by DarioG - 2007/11/29 14:50:50
|
barbiani
Super Member
- Total Posts : 246
- Reward points : 0
- Status: offline
RE: Minibasic for Pic32
2007/11/29 13:21:40
(permalink)
DarioG, please run an empty FOR X=0 to 10000 : NEXT X loop. I want to know how fast the interpreter do this.
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/11/29 14:53:25
(permalink)
Ok, I'll try to. On simulator or real hardware, now I'll take a look. Now that I'm considering, I'm not sure if MiniBasic is Tokenized. I took a look at its site yesterday, and at the code too, and did not see anything about this. In theory, modern BASICs are not tokenized since CPU are fast nowadays. Well, my SkyBasic is tokenized, being a clone of C64 basic and having been born on Z80  . This could make a difference.
|
lauer
Starting Member
- Total Posts : 38
- Reward points : 0
- Joined: 2003/11/07 12:35:15
- Status: offline
RE: Minibasic for Pic32
2007/11/30 20:14:57
(permalink)
Dario, the extentions are in the io.c for the setpin, outd, pwm and other functions. Peter
|
lauer
Starting Member
- Total Posts : 38
- Reward points : 0
- Joined: 2003/11/07 12:35:15
- Status: offline
RE: Minibasic for Pic32
2007/11/30 20:41:57
(permalink)
here are the sources, if you could not find them: Peter
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/12/01 13:51:05
(permalink)
Thank you Peter! By the way, I've called "io.c" my "extension" file containing USART/LCD I/O routines Posting something more soon...
|
Kiwi Mike AZ
Super Member
- Total Posts : 2056
- Reward points : 0
- Status: offline
RE: Minibasic for Pic32
2007/12/02 16:16:44
(permalink)
Hi Dario, Would you mind releasing your code under a GNU/GPL or LGPL or other license?? I am setting up pic32.org for private and community projects like your basic interpreter. Mike
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/12/03 08:45:58
(permalink)
@Lauer: I've got a question: I got your file, and I was wondering how those extensions are used: i.e. they can be compiled (I was moving them to PIC's world)... but how are you calling them from the BASIC itself, since no Keyword are defined? Do we have to define them (what I was going to do for my implementation) ? And... actually I've now seen a ReadMe file by Dan Marks in which he talks about his extensions to original code. But... I can't see where this code can be downloaded (it's not there at MiniBasic home, nor Google can find it.) I'm writing to him, but if you have any hint... Thank you! @Mike: sure I'll do. I'm attempting to get some debug done, and I have a nice problem with a "strncmppgm()" function at the moment  Then I'll post the code.
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/12/03 09:37:15
(permalink)
Hmm, by the way, Yahoo groups seem to be down at the moment... EDIT: WONDERFUL, as usual, soon after I posted this, the Groups were working again... after 3 hours! [:@]
post edited by DarioG - 2007/12/03 09:40:18
|
lauer
Starting Member
- Total Posts : 38
- Reward points : 0
- Joined: 2003/11/07 12:35:15
- Status: offline
RE: Minibasic for Pic32
2007/12/03 12:15:58
(permalink)
the tokens are defined in the basic.c file Peter I got he files from the arm group at yahoo, unfortunatly you can't create a link to their file area. The only thing I stripped out were the hex and executable files for the arm. Peter
|
DarioG
Allmächtig.
- Total Posts : 54081
- Reward points : 0
- Joined: 2006/02/25 08:58:22
- Location: Oesterreich
- Status: offline
RE: Minibasic for Pic32
2007/12/03 12:19:41
(permalink)
No problem Peter, I figured it out As I wrote, the Yahoo Groups were down today: I had already registered there but I could not download the latest version. And yes, Google can't find those files ! Now I'm struggling on another thing (see my post).
|