Shop OBEX P1 Docs P2 Docs Learn Events
Questions to Sphinx: My program leads to sphinx crashing. - Solved — Parallax Forums

Questions to Sphinx: My program leads to sphinx crashing. - Solved

Christof Eb.Christof Eb. Posts: 1,282
edited 2010-04-11 22:43 in Propeller 1
Hi, can someone please give me some hints?

I try to read the file test.dat with the Program firead.spn.
At the beginning of its lines, there is a number, that shall be read into a long.
The rest of each line is a text and this shall be read into a string buffer with zero end.

The file is produced by the editor ed.

Questions:
1. What is the line end code(s) for Sphinx?
2. Is there a possibility to read the next byte of the file buffer, but to give it back to the buffer?
3. Why does sphinx crash (at least the keyboard driver) after doing my program?
4. What must I do to protect the drivers?
5. Has anyone got the isxkb.spn file?

Thank you very much.
Christof

Post Edited (Christof Eb.) : 4/11/2010 7:38:12 PM GMT

Comments

  • mparkmpark Posts: 1,306
    edited 2010-04-11 15:00
    isxkb.spn is attached.

    I don't know why Sphinx is crashing. I'll look into it soon. (The PropBasic incompatibility is still on my list too. Sorry for the delay.)

    Meanwhile, try changing firead.spn to test for CR followed by LF:
    if ch == 13
          f.Read( @ch, 1 )  ' could use ReadByte here instead
        if ch == 10
          ch:= 0
    



    There's no way currently to give a byte back to the file buffer. I think you could add some sort of "unget" to sxfile.
  • Christof Eb.Christof Eb. Posts: 1,282
    edited 2010-04-11 18:36
    Thank you, Michael,

    I wondered, if something special has to be done to protect the rendevous area?

    Your Sphinx gives such a great new area of possibilities to run a minimal propeller computer as stand alone! Sorry please, that I am some kind of demanding without paying for nothing....

    Best regards, Christof
  • Christof Eb.Christof Eb. Posts: 1,282
    edited 2010-04-11 19:34
    Ups, that was missing @. Had thought that for arrays always adress would be passed. Grrrrrr cost me a day....

    shakehead.gif Christof
  • mparkmpark Posts: 1,306
    edited 2010-04-11 22:43
    Christof,

    Sphinx is free and worth every penny [noparse]:)[/noparse] I'm just glad you're getting some use out of it.


    m
Sign In or Register to comment.