Excited About PropBasic
Shawna
Posts: 508
I love basic, I started with the basic stamp and then moved to Pic Micro's and used PicBasicPro. I don't remember why I switched to the propeller but I do not see myself switching back any time soon.
I am happy to hear that Bean and Batang are working on a package for basic for the Prop.
I have a couple questions regarding PropBasic.
1) Is there an OBEX for PropBasic?
2) Is there any way to do Trig functions in PropBasic?
3) Is it possible to take a PASM OBJ and insert the code inline in PropBasic? The manual says something about not using multiple line PASM code. I did not really understand that because the examples in the manual had multiple lines.
I remember trying PropBasic when I first started playing with the prop, I don't remeber why I abandoned it.
I can't wait to play with it again.
I am happy to hear that Bean and Batang are working on a package for basic for the Prop.
I have a couple questions regarding PropBasic.
1) Is there an OBEX for PropBasic?
2) Is there any way to do Trig functions in PropBasic?
3) Is it possible to take a PASM OBJ and insert the code inline in PropBasic? The manual says something about not using multiple line PASM code. I did not really understand that because the examples in the manual had multiple lines.
I remember trying PropBasic when I first started playing with the prop, I don't remeber why I abandoned it.
I can't wait to play with it again.
Comments
2) I wrote some CORDIC code that can do SIN,COS and ATAN2. What functions do you need ?
3) You can embed PASM code easily. Just put the keyword ASM before it and ENDASM after it.
Bean
The main trig function I am looking for is ATAN2, but I can see in the future I may need to use a variety of them.
More questions.
1) Since PropBasic uses LMM mode, does that mean a section of embedded PASM code can be larger than 496 longs?
2) And if question 1 is true, then does this mean that the Cogs can all be running code that is longer than 496 longs? I am not sure if I worded that correctly.
3) If I understand correctly PropBasic compiles to PASM. So how much slower does PASM run when its is being loaded in LMM mode vs the PASM code living in the cog? Maybe that is not a fair question or it is impossible to answer.
4) I am pretty sure the answer to my next question is no, but is there a way to do floating point in PropBasic? Most everything I have read says most things can be done with integers that can be done with floats, one just needs to understand how to do it.
I read your PDF on cordic tables. It was very well written, I cannot write a cordic table yet but I understand the principle.
When do you think PropBasic 2 will be done.
Thanks
Shawn
For questions about the PropBasic compiler Bean will no doubt provide any answers you require.
As for the IDE (PropBasic Studio), I hope to have a beta release in about 2 more weeks.
There are still a few I's to dot and T's to cross so to speak.
Below is a link to a screen shot of the current build of the IDE showing 2 code editors docked side by side. The serial terminal window likewise can be docked to the side/top/bottom of a code window.
Propbasic is compiled to spin and then to binary, the outputs of both compilers can be opened for viewing (spin and listing).
http://prx.sytes.net/PropBasicStudio_GUI.png
http://prx.sytes.net/PropBasicStudio_Windows.png
I am hoping that with the release of the IDE that PropBasic will garner a following of useres who will contribute code to the OBEX.
Cheers
That should be ASM / ENDASM (without the P).
My bad....
To answer your questions....
1) PropBasic can generate native or LMM code. With LMM code can be up to 32K (8K instructions instead of 496 instructions)
2) The main code and each TASK can be either native or LMM. Typically the main code is LMM (since it is usually longer) and the TASKs are native (for speed).
3) It is about 4 to 5 times slower. But depends on many factors.
4) You could, but you would have to write all the routines yourself. PropBasic does support embedded floating point constants when prefixed with a #. For example value=#3.14
Bean
some time ago, I started this:
http://forums.parallax.com/showthread.php/135852-Floating-Point-Library-for-PropBasic
Perhaps you can use something of it.
Christof
That is very interesting. At the top of the float.lib it lists the commands that are supported and not supported, it lists atan2 as supported but I do not see a function for it, am I missing something?
The manual says that you can run native PASM in a Task. I take this as meaning it will function just like a PASM snippet written in spin? Is that correct? Thats a pretty vague question, I quess I am concerned about timing and speed.
Playing with PropBasic is pretty entertaining and addictive. I still do not remember why I stopped playing with it the first time. I like spin a lot also, but it seems like some things in spin take forever, that may be my inexperience showing up.
The fact that it compiles the Basic to PASM so it can be viewed is very helpful.
Thank You Bean for making this, I can't imagine the amount of time required to do this. I can't wait to see the PropBasic Studio.
Batang I cannot get those links to work for some reason.
The links are back up.
Cheers.