Author Topic: [Question] The edit buffer  (Read 4970 times)

0 Members and 1 Guest are viewing this topic.

Offline Mighty Moose

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +4/-0
    • View Profile
[Question] The edit buffer
« on: June 15, 2011, 11:58:19 am »
Okay, so I know that the TIOS uses the edit buffer for things like the program editor, etc.  My question is this:  Is there a way to set up the edit buffer without opening the promptEdit/program editor?  Thanks in advance :thumbsup:.
Cheers!
I beta test, so...yeah.  PM me if you want me to test anything :D.

Almost only counts in horseshoes and handgrenades.

Cogito ergo sum.

Calcs:
TI-84+, OS 2.43, Boot Code 1.02, 128k RAM
TI-84+SE VSC, OS 2.43, Boot Code 1.00, 128k RAM  (I'm spoiled :P)
TI-81, OS 1.6K (only borrowed)
Casio fx-CG10 (Prizm), OS 01.04.0200
TI-Nspire Clickpad, OS 1.4
TI-Nspire Clickpad, OS 3.1.0.392
TI-Nspire CAS Clickpad, OS 1.6.10110 (!?) now OS 3.1.0.392

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: [Question] The edit buffer
« Reply #1 on: June 15, 2011, 12:39:37 pm »
Yes there is. Firstly, you are going to want this. This was a guide released by TI when they actually liked us.

I could copy and paste the example out of editbuf.pdf. But I feel it would be more beneficial if you saw it in it's original format.


Also, the edit buffer is not set up like you would expect it to be, so here is my guide to someone else.

When the calculator puts info into an edit buffer, it splits the data up into two sections: What is in front of the cursor, and what is behind the cursor. These two sections are stored at either end of the free ram.

Code: [Select]
Edit buffer:
        a                   b                   c
    |----------|------------------------------|-----|
    1          2                              3     4

1 - EditTop
2 - EditCursor
3 - EditTail
4 - EditBtm

a - Before the cursor
b - unused data
c - under and after the cursor


So the data: ABCDEFGHIJK|L|MNOPQRSTUVWXYZ, would look like this: (|| is cursor)
Code: [Select]
|ABCDEFGHIJK|---------------------------------|LMNOPQRSTUVWXYZ|


Edited for clarity about what happens to the byte under the cursor.
« Last Edit: June 16, 2011, 02:28:45 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: [Question] The edit buffer
« Reply #2 on: June 15, 2011, 01:30:38 pm »
Is the character the cursor is currently on stored in section a or section c?

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: [Question] The edit buffer
« Reply #3 on: June 15, 2011, 01:33:41 pm »
That was exacty the question I had before I started a recent venture. It is in C. You could almost image that the cursor is a normal computer cursor, and that it is in front of the byte you are currently on. That makes sense anyways because insert mode puts the character before the character you are currently on.

This means, editCursor is always pointing to nothing. (Unless of course you're out of space)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Mighty Moose

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +4/-0
    • View Profile
Re: [Question] The edit buffer
« Reply #4 on: June 16, 2011, 09:15:09 am »
Thanks a lot!  This should be really helpful.
Cheers!
I beta test, so...yeah.  PM me if you want me to test anything :D.

Almost only counts in horseshoes and handgrenades.

Cogito ergo sum.

Calcs:
TI-84+, OS 2.43, Boot Code 1.02, 128k RAM
TI-84+SE VSC, OS 2.43, Boot Code 1.00, 128k RAM  (I'm spoiled :P)
TI-81, OS 1.6K (only borrowed)
Casio fx-CG10 (Prizm), OS 01.04.0200
TI-Nspire Clickpad, OS 1.4
TI-Nspire Clickpad, OS 3.1.0.392
TI-Nspire CAS Clickpad, OS 1.6.10110 (!?) now OS 3.1.0.392

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [Question] The edit buffer
« Reply #5 on: June 16, 2011, 01:11:11 pm »
Woah thepenguin, nice explaination. will be useful for me!
I'm not a nerd but I pretend: