Shop OBEX P1 Docs P2 Docs Learn Events
Editor in Spin? — Parallax Forums

Editor in Spin?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2007-07-24 04:17 in Propeller 1
Outside of the editor in FemtoBASIC, (after a fashion) Has anyone created any code that resembles a text editor which would save/load from SD? One of my projects is to replace the brain of my TRS80 M100 with a propeller-addon (via terminal) and I'm curious if I'm re-inventing the wheel?

Thanks
Oldbit

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-24 02:04
    I at one point wrote a line edit object, however I got side tracked and haven't tested it. Your welcome to it if you want it, I wrote it so that you have a buffer and pass it characters it either adds or acts upon if it's a special character. It is not tied to any input or output device. It was written as a field editor, but it should be alterable to a general editor. Mike's might be a better starting point, I haven't compared the two.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-07-24 02:40
    Paul,

    Would love to take a look at your code.. It could be a helpful jumping off place for what I have in mind.

    Thanks
    Oldbit

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-24 03:03
    Here you go, like I said before it's untested so caveat emptor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-24 03:15
    Download the Propeller OS from the Object Exchange. It has the beginnings of an editor in it including a general purpose line/screen editor that allows one to edit the screen buffer. There are provisions for exiting when other control codes are entered, like for moving from screen to screen. It was never developed further.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-24 03:16
    Looking over the code quickly for any obvious mistakes, any charactor processed in the case statement should return from there, otherwise the routine will report it as an error.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-07-24 03:45
    Mike,

    Didn't find it in the Object Exchange... However it is listed in the "Good Links" Thread. Curious, Did you every release a version that incorporated the SD routines?

    Oldbit

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • MightorMightor Posts: 338
    edited 2007-07-24 03:47
    Think of all the uses you could have for a vi-clone running on your bot. You don't have to take your laptop with you anymore, just take your robot. When people ask, just say "Hey, backoff, that's my editor." No need to carry it either, just set it to follow you around.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | What the world needs is more geniuses with humility, there are so few of us left.
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-07-24 03:55
    Paul Baker (Parallax) said...
    Here you go, like I said before it's untested so caveat emptor.

    I'd say you are safe there Paul - with the 'buyer beware' bit unless some money passed hands unknown to us ! smilewinkgrin.gif

    Regards,
    Quattro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Post Edited (QuattroRS4) : 7/24/2007 4:02:04 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-24 04:17
    OldBitCollector,
    Sorry, you're right ... I haven't put it into the Object Exchange. I also didn't add any SD card support. What happened is that I got involved with FemtoBasic and BoeBotBasic. The SD card support is pretty large memory-wise and the Propeller OS wouldn't fit anymore into hub memory the way it was written (with SD card support). I'm slowly working on redoing it differently internally so it's smaller. It'll be a while since it's a complete rewrite.
Sign In or Register to comment.