Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic Popularity - Page 6 — Parallax Forums

PropBasic Popularity

12346»

Comments

  • jonesjones Posts: 281
    edited 2013-05-24 10:38
    David Betz wrote: »
    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.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 10:48
    jones wrote: »
    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.
    Sure. Do you have a pointer to the docs?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 10:54
    David Betz wrote: »
    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.
  • Dave HeinDave Hein Posts: 6,347
    edited 2013-05-24 11:03
    David,

    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
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 11:18
    Dave Hein wrote: »
    David,

    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.
  • ColeyColey Posts: 1,110
    edited 2013-05-24 11:23
    http://forums.parallax.com/attachment.php?attachmentid=72594&d=1282143321
    PropBASIC Syntax Guide

    http://forums.parallax.com/attachment.php?attachmentid=83709&d=1312406887
    PropBASIC Manual
    David Betz wrote: »
    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.
  • tritoniumtritonium Posts: 543
    edited 2013-05-24 12:28
    Hi
    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
  • tritoniumtritonium Posts: 543
    edited 2013-05-24 12:45
    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
    


    Dave
  • jmgjmg Posts: 15,173
    edited 2013-05-24 13:35
    Dave Hein wrote: »
    .. 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.
Sign In or Register to comment.