Shop OBEX P1 Docs P2 Docs Learn Events
PropBASIC (Preliminary Examples) - Page 3 — Parallax Forums

PropBASIC (Preliminary Examples)

13»

Comments

  • technoweaseltechnoweasel Posts: 10
    edited 2009-10-24 15:36
    Looks like great work, Bean.· In case anyone was wondering (probably not) I gave up on my project because I don't have enough Propeller experience.· Although·I could write the C PC code alright, I encountered numerous problems because I had never used Prop ASM before.·

    Keep up the good work.· I would like to suggest that you (or anyone) write a matching IDE.· Since one of your compiler's aims is to make the Prop more accessible to beginners, an easy to use and install IDE would be nice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 types of people in the world, those who understand binary and those who don't.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-10-25 22:42
    Farnell UK were flagging the SX bits and bobs as *NEW* in this years catalog. I hadn't heard of the Propeller until the begining of this year, and now the PropII will eclipse it soon (hopefully).

    By the time it becomes widely known, here in the UK,it seems half way to EOL. But then, I still want a couple of Z180 PLCC's.

    I have finally managed to get a "blade2" to run CP/M, with a lot of help, the true compiler in native Prop speak, whilst lacking in nostalga, will run soooo much faster ( I know, learn Pasm .... )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • BaggersBaggers Posts: 3,019
    edited 2009-10-26 12:29
    Bean, have you got a release date for PropBASIC yet? [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-10-26 12:59
    What an amazing effort, Bean!

    Look at all the instructions already included. And I love the seamless integration with pasm code, eg allowing DJNZ as a Basic instruction. And why not, as it uses the strengths of both languages.

    Can you explain a bit more how you pass parameters to a Sub? Is it a list with spaces between the variables, or commas or some other delimiter?

    Just brainstorming here, but is it possible to include existing spin libraries? The way spin declares these is pretty logical eg
    UART     : "FullDuplexSerial"
    
    



    But, to my Basic eyes (small gripe coming up here), if Spin/Pasm are going to use esoteric symbols like >> and @@ and <| and |, then these ought to be consistent, and if | means bitwise OR, then where is the OR in
    PUB start | variable1
    
    



    There are many syntaxes to choose from and three possibilities could be
    PUB start (variable1,variable2,variable3) ' like vb.net
    or
    PUB start variable1,variable2,variable3 ' more like spin
    or
    PUB start (variable1 as long, variable2 as byte, variable3 as word) ' possibly not needed as already declared earlier

    And for Basic, one could argue that PUB might be SUB. Though it is unclear what PRI should be, and it almost might be easier to allow SUB PUB and PRI. PUB and PRI just get passed straight through, maybe with a tweak to convert ( to | and remove the trailing ).

    Are your SUBs public or private?

    I'm thinking of the power of calling all the existing spin routines and passing parameters, but with the slight tweak to the syntax so it looks like Basic. Very easy to convert to the Spin syntax with a |, and then you can call any of the existing routines from within Basic and you don't have to write all those drivers.

    Anyway this is an amazing effort and I'm very much looking forward to the next installment!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/build

    Post Edited (Dr_Acula) : 10/26/2009 1:06:13 PM GMT
  • BeanBean Posts: 8,129
    edited 2009-10-26 16:48
    Parameters are passed seperated by commas after the first parameter.
    Example: "MySub 1,2,3,4". Also variable number of parameters are supported.

    You cannot call spin from PropBASIC, but there is a curren thread about doing this, so I might look into it.

    SUBs are public to the COG they are in. So TASKs have their own SUBs. If the same sub is needed in the main program AND in a task, it will have to be written twice.

    The syntax of the language very much follows SX/B. Except that TASKs are run in a seperate COG on the propeller, so they have their own variables and SUBs.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Does that byte of memory hold "A", 65, $41 or %01000001 ?
    Yes it does...


    ·
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-10-26 22:44
    Simple and logical. I like it!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/build
  • BeanBean Posts: 8,129
    edited 2009-11-13 14:45
    Here is a simple keyboard driver program.
    It reads keys from the keyboard plugged into the Prop Demo board and sends them to the PC at 115200 baud.

    This program is kinda unique because everything runs in 1 cog.

    P.S. Send me a PM if you are interested in being a beta tester for PropBASIC.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Does that byte of memory hold "A", 65, $41 or %01000001 ?
    Yes it does...
Sign In or Register to comment.