Download PropBasic Version 1.48 (Aug 9, 2018) Here...
Bean
Posts: 8,129
Here is the latest version of the PropBasic Compiler.
Bean
Bean
Version 00.01.00 Fixed: Compiler crash on COGSTART if task name has not been defined Fixed: Calculated constant using a long constant mSec = _Freq / 1000 value1 CON 10_000 value2 CON value1 / 10 ---------------------------------------------------------------------------- Version 00.01.01 Fixed: COGSTART doesn't add "par" to __temp1 Fixed: / doesn't error if first parameter is invalid Fixed: minWaitCnt in tasks was 128 instead of 80 Fixed: str = str + longvar Fixed: str = "" ' comment ---------------------------------------------------------------------------- Version 00.01.02 Fixed: test $,#1 WC ' Set Carry (doesn't work in LMM) I2CWrite Fixed: COGINIT if taskname doesn't exist crashes Fixed: Glitch on PinGroup = PinGroup Fixed: IF pinName THEN Changed: In LMM use "LONG label * 4" instead of "LONG @label - @__Init" Changed: Use relative jumps for LMM SUB __PC,#(($-label)*4)+4 ' Jump backward ADD __PC,#((label-$)*4)-4 ' Jump forward ---------------------------------------------------------------------------- Version 00.01.03 Fixed: RDWORD buffer($1C0), temp Fixed: name HUB STRING(10) = "Hello" Fixed: trailing "," in data causes offset in next data label (counts it as element). Now causes a syntax error. Fixed: PULSIN hangs with RCSLOW ---------------------------------------------------------------------------- Version 00.01.04 Fixed: INC, DEC where second parameter is an array with a variable index Added: I2CSpeed multiplier. "I2CSpeed 2" is double speed, "I2CSpeed 0.5" is half speed. ---------------------------------------------------------------------------- Version 00.01.05 Added: Allows embedded escape sequences in strings. \r = 13 \n = 10 \\ = 92 \" = 34 \123 = 123 [must use 3 digits, so 16 would be \016 ] \x20 = $20 [must use 2 characters, so $A would be \x0A ] ---------------------------------------------------------------------------- Version 00.01.06 Added: "CLKSET mode,freq" command Fixed: Allow more nested IF...ELSEIF loops, increased c_iMaxLoops from 127 to 1024 LET pingroup= doesn't do "shl __temp1,#0" if pingroup starts at 0 HIGH,LOW,TOGGLE,INPUT,OUTPUT,REVERSE if pin # is a constant < 9 then do shift as literal Allow I2C pins to be variables Removed: Copyright notice ---------------------------------------------------------------------------- Version 00.01.07 Changed LMM to use @@@ (still need offset for start address) ---------------------------------------------------------------------------- Version 00.01.08 Fixed data offsets (all messed up) from allowing embedded escape sequences Fixed @@@ issues in _LETLong and _LetStr ---------------------------------------------------------------------------- Version 00.01.09 Fixed: I2CSTART with pins as variables ---------------------------------------------------------------------------- Version 00.01.10 Fixed: SHIFTIN - REV was using bits instead of (32-bits) Fixed: SHIFTIN and SHIFTOUT when using a variable for 2nd parameter ---------------------------------------------------------------------------- Version 00.01.11 Fixed: ON var GOSUB label0, label1, label2 Fixed: Allow constant with COGSTOP Fixed: Embedded escape sequences "\" ---------------------------------------------------------------------------- Version 00.01.12 Changed: Create a return stack for LMM this will save 1 instruction for every subroutine call and 1 long from every subroutine Optimized: SERIN use "waitpne" and "waitpeq" to wait for state (saves 2) use "muxz" or "muxnz" to set/clear data bits (saves 1) use data variable to do bit count (1 shifts out) (saves 1) ---------------------------------------------------------------------------- Version 00.01.13 Optimized: WRLONG, WRWORD, WRBYTE (don't reload short constants) Added: "STACK value" to change stack size (defaults to 16) (4 to 255 allowed) NOTE: STACK only affects LMM code Fixed: pin = var (didn't set zero flag) Fixed: array(pos) = array(pos) + array(pos2) ---------------------------------------------------------------------------- Version 00.01.14 Fixed: Using long constant in LDATA Jul 26, 2011 ---------------------------------------------------------------------------- Version 00.01.15 - 00.01.18 Fixed: multiply gets hung-up Sept 21, 2011 Add support for ViewPort Added: WATCH VarName Added: UNWATCH LongVarName turns off watching ---------------------------------------------------------------------------- Version 00.01.19 Fixed WATCH order for arrays Allow multiple parameters for WATCH and UNWATCH Allow WATCH and UNWATCH without any parameters for ALL Allow Viewport modifiers as WATCH varname "modifier" Example: WATCH time "unit=msec" * Modifier must be used at first WATCH ---------------------------------------------------------------------------- Version 00.01.20 Fixed: remove WATCH modifier strings from HUB DATA Fixed: Multiply (2 bits) Added: Viewport Video support Fixed: Fix pinvar1 = ~pinvar2 ---------------------------------------------------------------------------- Version 00.01.26 FIXED: WDATA and LDATA (no data generated) Version 00.01.27 ADDED: __txtermAdr to support viewport terminal Version 00.01.28 Added: Support floating point values with # prefix Fixed: FREQ command caused abort if DEVICE is misspelled Fixed: Allow constant with COGSTOP (was NOT fixed in 1.11) Fixed: tempStr = STR temp (needs ",len" but causes abort) [Oct 10,2012] Version 00.01.29 Fixed: PAUSE XXXX does not cause an error Version 00.01.30 Added: Directive VIEWPORT defined if using viewport Version 00.01.31 FIXED: DO...LOOP x => y ' should be >= but no error Version 00.01.40 Changed from Delphi to Lazarus Version 00.01.41 Changed path character "\" to "/" for compatiblity with Mac and Linux Fixed PulsOut that hangs at lower clock speeds Aug 19, 2013 Version 00.01.42 Changed to add "/" to end of g_sInputDir because Mac version seems to be lacking it Added code to avoid Lazarus warnings Version 00.01.43 Changed SERIN so it doesn't wait for stop bit Optimize Divide and remainder operation [June 27,2014] Version 00.01.44 Made PAUSE a subroutine Made *, */, **, /, and // operator subroutine Allow FREQ with RCSLOW or RCFAST "ProcessFreq" Feb 3, 2016 Version 00.01.45 Changed A = x - A to generate neg A,A adds A,x Fixed two range errors Fixed __remainder was __temp1, but should be __temp4 now Mar 7, 2016 Fixed: I2C commands in LMM mode require minimum of 150 WAITCNT Jun 28,2017 Fixed: I2CSTART locks up if no pull-ups (should only try 10 times) Jun 29,2017 Fixed: PAUSE, Mult, and Div subroutines were added to TASKs when not used. Jul 18,2017 Fixed: Bug in >> and << when using var = x >> var caused by A = x - A optimization Jul 28, 2017 Fixed: Optimize X=X*0 X=X*1, X=X*3, X=Y*0, X=Y*1 REMOVE "shl x,#0" instructions Jul 29,2017 Fixed: Optimize X=Y*3 "MOV,ADD,ADD" Jul 30,2017 Version 00.01.46 Fixed 12-23-2017: Fix WRLONG hubVar(undefined) does not error Fixed 12-29-2017: __RAM() does not work in TASKs Version 00.01.47 July 17, 2018 Fixed: 4-1-2018: Firmware CON 0000_000C causes abort (no $ prefix) Fixed: 7-16-2018 I2C Write needs 9th bit to be a 1 so slave can assert ACK Added: 7-16-2018 Ability to disable warnings (Simple IDE will not download if a warning occurs) Use /D on command line or '{$NOWARNINGS} directive Version 00.01.48 August 8, 2018 Fixed: 00.01.47 was posted as 64-app, now is 32-bit app Fixed: var = #pin_name doesn't like underscores in pin name Added: Support for FreeBASIC IDE with /FB switch --------------------------------------------------------------------------
Comments
I just upgraded my PropellerIDE to the latest PropBasic and PropBASIC PDF. Now, I think I just might consider converting one of my smaller PropGCC programs to PropBasic. That should be an interesting exercise.
Ray
I've just posted to github, minor changes to code that was on github, that
1) adds /FB switch, so FreeBasic formatted error messages are exported - useful for FB targeting IDEs
2) fixed file name parser bug, so this now compiles ok
..\src\PropBasic.exe "Freq Counter3.pbas" /FB
See screen shot here of PoseidonFB IDE calling PropBASIC, and catching the compile error.
You cannot use pin 31 in a pin range (it works fine by itself).
For example:
LED PIN 31 ' Works
LEDS PIN 30..28 ' Works
LEDS PIN 31..28 ' Runtime Error
P.S. Found another one
If you use an underscore in a pin name, then the # prefix won't work. (The #prefix returns the pin number not the state of the pin).
Bean
Did you merge the 2 minor fixes/extensions I posted above ? (uploaded to Github link given)
Sorry I've never used github.
If you can post screenshots or text of what needs to be changed I will incorporate into the next build.
Bean
Oh, oops, maybe someone else posted PropBASIC there, I wondered why it was not being updated....
The code I started from is here
https://github.com/parallaxinc/PropBASIC
and my fork is here
https://github.com/gh-jmg/PropBASIC
The two files changed are GLOBAL.PAS & PropBasic.lpr
github does a nice highlighted compare, so you can see what changed
https://github.com/parallaxinc/PropBASIC/compare/master...gh-jmg:master
Thanks that is exactly what I needed.
I will post version 00.01.48 that will have these changes incorporated.
Bean
Version 00.01.48 August 8, 2018
Fixed: 00.01.47 was posted as 64-app, now is 32-bit app
Need to fix: var = #pin_name doesn't like underscores in pin name
Added: Support for FreeBASIC IDE with /FB switch
Enjoy,
Bean
So you mean this ?
https://www.sublimetext.com/
Such editors usually have some parts that can be language portable.
eg Syntax Highlighters can usually be added.
Next, is console error parsers - I added a error format switch to PropBASIC to allow FreeBASIC error extraction, which allows jump-to-error in some of the IDE's supporting FreeBASIC.
example:
Other things like declaration and type hints etc, are likely to be rather more language-centric
Would it be possible for you to post sources? I've been building PropBasic sources from the Parallax github repository (https://github.com/parallaxinc/PropBASIC) and just now from JMG's github (https://github.com/gh-jmg/PropBASIC) for macOS. It would be great to sync your sources with one of those branches so Mac & Linux users can build from your latest sources.
I've mangled :-) PropellerIDE's Qt sources in order to build PropBasic code via openspin (vs bst)... This gives me a decent IDE for PropBasic!
dgately
Best/cleanest idea would be for Bean to update the github 'master', but I'm not sure how easy that is, as it seems he did not create that ?
I'm not sure who uploaded the 'master'. I may have been me. I had a github account, and I remember play around with it, but I couldn't really figure it out.
I don't mind making the source code available (in case I get hit by a bus or something). But I don't want 20 versions of it floating around that people have made changes too.
jmg, would you be able to put the source on github if I sent it to you ?
Bean
Yes, that is best avoided, so I think the master should be updated, and I can delete my fork (I hope), when the main one is updated.
Looks like you need to contact Brett Weir, as he seems to have posted that, with other Parallax sources.
He can probably give you some shared access, as the originator. Can you still get into github on your account ?
I'm not great at github, but a quick browse shows other forks
These 3 seem to all be the same
https://github.com/parallaxinc/PropBASIC/compare/master...gh-jmg:master 2 files with 14 additions and 5 deletions. << master
https://github.com/RogueM/PropBASIC/compare/master...gh-jmg:master 2 files with 14 additions and 5 deletions. << could be deleted, or updated ?
https://github.com/cbmeeks/PropBASIC/compare/master...gh-jmg:master 2 files with 14 additions and 5 deletions. << could be deleted, or updated ?
but this one has some more variations - who is EsterlineResearch hehe, oops just spotted that is you, so that's your fork, there already.. If I had spotted that before, I would have cloned that one...
https://github.com/EsterlineResearch/PropBASIC/compare/master...gh-jmg:master
8 files with 139 additions and 5 deletions.
Looks to be able to be merged, as that is not source-code, but more around docs and make examples.
And in the future, I'd be happy to manage contribs and updates.
It's enough that you donate PropBasic to the community, Bean, without you needing to fuss with Admin too.
Bean- I think you have my email since last time, but I'll forward you the contact details again in just a moment.
Thanks. I have sent you an e-mail with the source files.
Let me know when you receive it as I got an error sending it. So I'm not sure it went correctly.
Bean
Received fine, thank you.
Aside the source code updates, I created the new pdf doc version from the source given, and removed the old docs
Examples stay as currently given on Github.
Files are already staged ready to merge into https://github.com/parallaxinc/PropBASIC
Should happen Monday morning, once some permissions are updated.
Will update here when live.
ps... If anyone thinks it's a good idea to add a folder of user samples or libraries, would be happy to do that. I was thinking of the well established code libraries linked in recent PropBasic threads.
It's an excellent idea!
Great to see a little more PropBasic activity.
The link above https://github.com/EsterlineResearch/PropBASIC/compare/master...gh-jmg:master included an example file, and there are many on here.
I like the FrequencyCounter ones here
http://forums.parallax.com/discussion/123170/propbasic-reciprocal-frequency-counter-0-5hz-to-40mhz-40mhz-now
and there was this too
https://forums.parallax.com/discussion/168100/deploying-bean-s-frequency-counter-code-across-multiple-cogs
for those using FLiP, I posted a data-sheet grab of the ppm errors here https://forums.parallax.com/discussion/download/120420/SIT8918BE_ppm.png
You can not upload .exe files on this forum because of security concerns.
https://github.com/parallaxinc/PropBASIC/tree/master/bin/1-48
Again, thanks for your help...
Things seem a little crossed here ?
The PropBASIC compiler (PropBasic.exe) is at version 1.48, but you are mentioning PropellerIDE - what exactly are you looking for ? - given PropBasic.exe is not PropellerIDE (but can be called from PropellerIDE)
That link gets me to the PropBasic.exe download, not any PDF files.
On the GitHub page, click on PropBasic.exe, then on the next page click the download button (over on the right).
Thinking about it, I could grab the actual download link for you.... here goes:
https://github.com/parallaxinc/PropBASIC/raw/master/bin/1-48/PropBasic.exe
Try that. After clicking the link, your browser may take a few second to connect to GitHub, then you'll see the download automatically start. You might be asked by your version of Windows if you want to accept the download or not.
Once you've downloaded PropBasic.exe you'll need a couple steps to integrate with PropellerIDE
1. Rename the downloaded file from "PropBasic.exe" to "propbasic.exe" (PropellerIDE is case sensitive)
2. Copy the file into the PropellerIDE folder, replacing the old version of propbasic.exe
- On my computer, the PropellerIDE folder is here: C:\Program Files (x86)\PropellerIDE
3. Restart PropellerIDE (if you had it open) to recognise the changes.
From a windows command prompt try: propbasic.exe -v
Or just propbasic.exe. as that will list the available commands.