Shop OBEX P1 Docs P2 Docs Learn Events
Better PropBasic Document — Parallax Forums

Better PropBasic Document

kevin@cachia.comkevin@cachia.com Posts: 23
edited 2011-01-24 14:47 in Propeller 1
Hello,

I'm really liking PropBasic. But the manuals I've found on the forums or with Google seem to be slightly incomplete. I'm trying to make a Task and the page is blank in the manuals, so I'm kind of using demos from Bean or the little snipets of how tos.

I'm kind of hoping someone has more info. on Tasks. I'm interested in how to initialize one, pass arguments, and the syntax of related commands.

I'm particularity wondering what does "AUTO" mean here: I'm taking this from Bean's keyboard to PC.pbas
' Define TASKs
ReadKey  TASK AUTO
Keyboard_to_PC.pbas

On a side note, is there anyway to pass arguments directly between COGs without having to "poll" HUB memory locations to see if there is new data to process?

Thanks for any help.
Kevin

Comments

  • BeanBean Posts: 8,129
    edited 2011-01-23 17:46
    AUTO means the task will start automatically.

    HUB memory and/or pins are the only way to communicate between cogs. A cog cannot read or write another cog's memory.

    Bean
  • $WMc%$WMc% Posts: 1,884
    edited 2011-01-23 18:02
    Bean:
    '
    Any chance of getting a completed PropBasic Manuel, I will gladly pay for this.
  • kevin@cachia.comkevin@cachia.com Posts: 23
    edited 2011-01-24 14:17
    Great! Thanks Bean. I had a suspicion but wanted to make sure I wasn't missing something.

    I got my PWM driver working for my LED Cube and am very excited. I had wrote it in Spin and it was slow and flickering. PropBasic is FAST! I compared the code side by side and would guess the PropBasic compiled to pasm is like x10 - x25 faster...lol :)

    As far as a more complete manual, I'm referencing the BS2 documents which helps since you modeled the many of the commands similarly.
    If you got around to to the empty pages, I think many of us beginners at micro-controller programming would be in your debt.

    I also noticed that the compiler can't parse complex lines like If (x+1) = 5 then ...., unless I'm missing something. I assume it's because since it compiles in-line that would require 2-3 lines.
    Do you have any plans to expand the compiler to accept a switch to do more advanced compiling and optimizing?

    Thank you for your great work.
    -Kevin
  • BeanBean Posts: 8,129
    edited 2011-01-24 14:33
    The compiler was really created to teach PASM that is why it doesn't support expression evaluation. It would require quite a bit of work to support it.

    As far as documentation, I'd appreciate any help with it. I really stink at writing documentation.

    Bean
  • JonnyMacJonnyMac Posts: 9,208
    edited 2011-01-24 14:47
    I just sent the OpenOffice source file for the "fancy" document to you, Terry. A PDF cover, made by Jen at Parallax, is also attached to that email. All the formatting stuff is in place, it just needs the text and demo code.
Sign In or Register to comment.