Shop OBEX P1 Docs P2 Docs Learn Events
Embedded Basic Programming Guide — Parallax Forums

Embedded Basic Programming Guide

HumanoidoHumanoido Posts: 5,770
edited 2011-03-07 10:35 in Propeller 1
unofficial programming guide to Bean's
Embedded BASIC language for the Propeller Chip


I have attached my unofficial programming guide to Bean's Embedded BASIC language for the Propeller Chip, to show some of the new things happening with this language. It's a work in progress and only a personal reference. It may help as an introduction to this language. Previously there was only one text document, the original, which did not include the added commands for the updates or all the programming and timing examples in various threads. This now combines all the found information into one document. As the new document is a collection of various information from the Parallax Forum posts, most are Bean's comments and instructions and may apply to various versions of Embedded BASIC. The intention is this will be a helpful resource, promote this remarkable language, and serve as a getting started point.

Comments

  • BeanBean Posts: 8,129
    edited 2011-02-23 17:37
    Humanoido,
    Thanks for creating this. I really hope to continue to improve it.
    I'm good at programming, but not so much at writing documentation.

    Bean
  • $WMc%$WMc% Posts: 1,884
    edited 2011-02-23 18:42
    Humanoido
    '
    Great work!!!
    '
    We needed the DOCs for Embedded PropBasic.
    '
    Parallax advertised the S2 in Nut&Volts and listed PropBasic as a third party to program it.
    '
    Really Cool
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-23 20:06
    Bean wrote: »
    Humanoido, Thanks for creating this. I really hope to continue to improve it. I'm good at programming, but not so much at writing documentation. Bean
    Bean, thank you, as your programming skill is fantastic and by all means please keep at it! IMO, Embedded BASIC is a real gem, easy to program, works well in my Propeller projects, and is so natural a language that it just flows smoothly. I took notice when it could auto boot my code, worked flawlessly in my applications, can reside in the Propeller chip eeprom and start up automatically, and included very useful features like Peek, Poke, Load, Save, Locate, Pin control, Input, Output, Read Data, Restore, Nodebug, Inkey, Display,Debug, Color, Gosub, etc.. to name a few favorites! PS: Bean, when you're making versions of this language, please remember the people who use small TV displays and need the Parallax driver that uses the ROM fonts. Thanks!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-02-23 20:44
    This documentation is brilliant!

    I'm already bursting with ideas for cool things you could do. Save to an sd card? If you can do that, then you can upload and download programs with Kyedos, so you could do some of the development on a PC if you wanted to.

    Does INKEY assume a keyboard?

    Are there any startup instructions one needs to tell the program "VGA vs TV" and Keyboard present, etc?
  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-23 22:53
    The driver I did for this will have a VGA port soon. Not sure how Bean will do VGA, but that will be a option with potatotext here in the very near future.

    I love this little BASIC. It's FAST, and it's FUN! I've been goofing around with some simple little programs, and I've been very impressed with speed and overall quality. Didn't know about the autostart deal. Nice touch!

    @humanodo: Thanks for compiling the info. Many will appreciate that.
  • BeanBean Posts: 8,129
    edited 2011-03-07 09:41
    Been thinking about storing the BASIC code in the EEPROM (would need to have a 64KB eeprom, so demo board won't work).

    I'm just wondering how much slower that would be ?

    I think if I keep the variables in RAM, it might not be too slow since it will pretty much be sequencial access.

    It really sucks that the demo board doesn't have a 64KB eeprom, but there is nothing that can be done now...

    Any thoughts ?
  • SapiehaSapieha Posts: 2,964
    edited 2011-03-07 09:55
    Hi Bean.

    That can be good idea ---- BUT how You have stored Line numbers in Program lines.
    As it is 2 methods for that.....
    Sequential --- Only line number as start of NEW line
    SLOW - as every time interpreter need goto not Sequential line need much time to find NEW one.

    Next type --- I don't know how You will name it -- BUT
    IT stores -- LINE number and Bytes total in LINE inclusive Line number and THAT Byte index --- And for find NEXT RUN line it not need scan entire Text lines Only ADD Byte index to find next line number IF match RUN if NOT -- ADD its Byte index to find next line --- AND so on.

    If You have more questions on it ASK --- I will answer all of them -- As I used that in one of My old Control system ---- That type Of Scanning give good SPEED in RUNTIME and some extra possibility in EDIT mode --- AS Lines NOT need be stored Sequential in Memory Foe RUN mode else EDIT mode



    Bean wrote: »
    Been thinking about storing the BASIC code in the EEPROM (would need to have a 64KB eeprom, so demo board won't work).

    I'm just wondering how much slower that would be ?

    I think if I keep the variables in RAM, it might not be too slow since it will pretty much be sequencial access.

    It really sucks that the demo board doesn't have a 64KB eeprom, but there is nothing that can be done now...

    Any thoughts ?
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-03-07 10:31
    Bean wrote: »
    Been thinking about storing the BASIC code in the EEPROM (would need to have a 64KB eeprom, so demo board won't work). It really sucks that the demo board doesn't have a 64KB eeprom, but there is nothing that can be done now...Any thoughts ?
    Bean! It's ok. We can easily put a 32K EEPROM on the Demo Board's breadboard and save programs to it. Have an option for setting the pin number in the basic code.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-03-07 10:35
    Positively fantastic!! This needs to be added to a sticky somewhere.

    OBC
Sign In or Register to comment.