I know "modern" Basics don't use GOTO or GOSUB but I believe that with PropBasic and pbasic GOSUB is the only way to call a subroutine .
I have to say that there seems to be some misunderstanding as to what PropBasic is. Pbasic it's not. Earlier in this thread Dave Hein called PropBasic a high-level assembler for the Prop. Is there any other implementation of Basic that would evoke such a description? This is NOT Bill G's BASIC, and I humbly request that those who would influence the future of PropBasic and/or its IDE take the time to at least look at Bean's example code.
I have to say that there seems to be some misunderstanding as to what PropBasic is. Pbasic it's not. Earlier in this thread Dave Hein called PropBasic a high-level assembler for the Prop. Is there any other implementation of Basic that would evoke such a description? This is NOT Bill G's BASIC, and I humbly request that those who would influence the future of PropBasic and/or its IDE take the time to at least look at Bean's example code.
I know "modern" Basics don't use GOTO or GOSUB but I believe that with PropBasic and pbasic GOSUB is the only way to call a subroutine .
Oops, sorry! I guess PropBasic has subroutines and functions that take parameters. It isn't like pbasic or original Dartmouth Basic in that regard. Sorry for the misinformation.
You can download PropBASIC and use it from the command line. If you try a few samples of code you'll see that the generated PASM has a one-to-one correlation with the original source code. It also generates the PASM code used by the intrinsic operators and functions, and it uses predefined variables to pass function parameters. That's why I think of it as a high-level assembler. PropBASIC is very similar to the SX/B language that was used on the SX chip.
I've always thought that it would be good to support the pbasic language that is used on the Stamp, which is different than PropBASIC. This would provide an easy path for Stamp programmers to transition to the Prop. It seems that a pbasic2c converter would be a useful thing to have.
You can download PropBASIC and use it from the command line. If you try a few samples of code you'll see that the generated PASM has a one-to-one correlation with the original source code. It also generates the PASM code used by the intrinsic operators and functions, and it uses predefined variables to pass function parameters. That's why I think of it as a high-level assembler. PropBASIC is very similar to the SX/B language that was used on the SX chip.
I've always thought that it would be good to support the pbasic language that is used on the Stamp, which is different than PropBASIC. This would provide an easy path for Stamp programmers to transition to the Prop. It seems that a pbasic2c converter would be a useful thing to have.
Dave
Thanks. I was mostly just looking for a manual for PropBASIC so I could understand its syntax but wasn't able to find one. I suppose it's bundled with the compiler itself.
Thanks. I was mostly just looking for a manual for PropBASIC so I could understand its syntax but wasn't able to find one. I suppose it's bundled with the compiler itself.
Hi again
Also, its tailor-made for the prop-
where else will you see this?
(from the manual)
COGINIT
Initializes a cog with a task. The cog ID must be provided.
COGINIT taskname, value
FlashLED TASK
PROGRAM START
Start:
COGINIT FlashLED, 1 ' Start task in COG 1
PAUSE 10_000 ' Let task run for 10 seconds
COGSTOP 1 ' Stop the task
END
TASK FlashLED
LED PIN 16 LOW
DO
TOGGLE LED
PAUSE 100
LOOP
.. It also generates the PASM code used by the intrinsic operators and functions, and it uses predefined variables to pass function parameters. That's why I think of it as a high-level assembler.
Anything that makes a practical High Level Assembler, especially one that creates PASM users can follow, and modify/re-insert, if they really need to, should be quite high up the desired tools list.
The syntax is reasonable different from FreeBASIC, but if PropBASIC added the same #Ifdef support, at least, you could have one source file that had sections for Prop, and PC algorithm testing.
Either of the FreeBASIC editors should modify easily to support the extra PropBASIC keywords, and the Help (which looks quite good in FBide) could morph to be PropBASIC help. The framework is all there.
Comments
You can download PropBASIC and use it from the command line. If you try a few samples of code you'll see that the generated PASM has a one-to-one correlation with the original source code. It also generates the PASM code used by the intrinsic operators and functions, and it uses predefined variables to pass function parameters. That's why I think of it as a high-level assembler. PropBASIC is very similar to the SX/B language that was used on the SX chip.
I've always thought that it would be good to support the pbasic language that is used on the Stamp, which is different than PropBASIC. This would provide an easy path for Stamp programmers to transition to the Prop. It seems that a pbasic2c converter would be a useful thing to have.
Dave
PropBASIC Syntax Guide
http://forums.parallax.com/attachment.php?attachmentid=83709&d=1312406887
PropBASIC Manual
Thanks!
On page 37 of the manual I had a terrible fright!!
I saw some of THESE { }
Fortunately, they are only used for multi-line comments!
Phew!
Dave
Also, its tailor-made for the prop-
where else will you see this?
(from the manual)
Dave
Anything that makes a practical High Level Assembler, especially one that creates PASM users can follow, and modify/re-insert, if they really need to, should be quite high up the desired tools list.
The syntax is reasonable different from FreeBASIC, but if PropBASIC added the same #Ifdef support, at least, you could have one source file that had sections for Prop, and PC algorithm testing.
Either of the FreeBASIC editors should modify easily to support the extra PropBASIC keywords, and the Help (which looks quite good in FBide) could morph to be PropBASIC help. The framework is all there.