Shop OBEX P1 Docs P2 Docs Learn Events
Could you program a programable programmer? — Parallax Forums

Could you program a programable programmer?

Dan TaylorDan Taylor Posts: 207
edited 2009-04-29 01:20 in General Discussion
Is it possible to make a program that would incorporate a keyboard and display. And without the computer you could enter a program and run it. I doubt this is possible but I was just wondering.

Couldn't you save the keys to memory and convert them to commands somehow?

Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 18:21
    You're talking about a computer with a keyboard and display and some memory. It doesn't have to be a PC to be able to run an interpreter of some kind. For example, a Propeller is big enough and fast enough to do what you want. You can take a Propeller Demo Board with a program called FemtoBasic loaded in it, connect a TV video or VGA display and PS/2 keyboard to it, and you can enter and run Basic programs in a simple subset of Basic (with integer arithmetic instead of floating point and no string variables). FemtoBasic is just a program written in Spin that reads lines of text from the keyboard and stores them in memory after checking for line numbers so the lines can be kept in order in memory and after replacing keywords like IF and THEN with special codes to simplify later processing. When you enter a RUN command, the Spin program detects this and starts interpreting the stored lines of the entered program. FemtoBasic also can save the entered Basic program in EEPROM or in an attached SD or MMC card.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-28 19:03
    Most programmers are programmable.· A few years before I retired, I managed a group of MVS systems programmers.· Management is defined as getting things done through other people, and my job as manager was to program my programmers to accomplish a variety of necessary tasks.· Only one turned out to unprogrammable -- a crusty old dog who had·learned his last new trick decades before.

    Ummm -- was that what you meant?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-28 19:51
    Yes! I was talking about a program were you would type your program out on your VGA display. You would be entering your program in a program.

    Wow! I didn't think it was possible!
    Is this the version of FemtoBasic that your talking about: http://forums.parallax.com/showthread.php?p=634092·?

    Thank you both for your fast replies!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 20:00
    The link you showed is to the discussion thread. The latest version is in the Propeller Object Exchange along with specialized versions for a Propeller BoeBot and some specific Propeller "boards". There's an included document describing the variation of Basic used.
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-28 21:07
    I can't really figure out how to use it. Whenever I enter a command it always says Syntax Error or IN LINE 1 Syntax Error.

    I am just trying to enter in the command Pause 1000. Please help!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor

    Post Edited (Dan Taylor) : 4/28/2009 9:58:38 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-28 22:26
    What are you actually entering? Typing "PAUSE 1000" (without the quotes) does work. The following is also an easy test:
    new
    10 for i = 1 to 10
    20 print "The number is "; i
    30 next i
    run
    

    FemtoBasic will display OK after each line typed up to the RUN.· There it will display
    The number is 1
    The number is 2
    The number is 3
    The number is 4
    The number is 5
    The number is 6
    The number is 7
    The number is 8
    The number is 9
    The number is 10
    
    OK
    



    Post Edited (Mike Green) : 4/28/2009 10:33:12 PM GMT
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-29 01:20
    Ok. Thanks Mike Green! That was really helpful!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
Sign In or Register to comment.