Author Topic: Length of Strings  (Read 3927 times)

0 Members and 1 Guest are viewing this topic.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Length of Strings
« on: December 12, 2010, 03:49:31 pm »
How big are strings on a Ti-83+ allowed to get?

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Length of Strings
« Reply #1 on: December 12, 2010, 03:51:30 pm »
Free RAM


Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Length of Strings
« Reply #2 on: December 12, 2010, 03:52:31 pm »
Err. Ram strings? As big as you want them, I guess. Actually, the size is two bytes, IIRC, so probably only 2^16 in length, but I'm not sure.

Also, ninja'd. (Hey look, no edit)

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Length of Strings
« Reply #3 on: December 12, 2010, 03:54:20 pm »
good ol' TIBD.

edit, and yeah i guess the limit would be 2^16 bytes. but since there isn't that much RAM on the calculator it'd be pointless.
« Last Edit: December 12, 2010, 03:55:33 pm by nemo »


Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Length of Strings
« Reply #4 on: December 12, 2010, 04:13:47 pm »
good ol' TIBD.

edit, and yeah i guess the limit would be 2^16 bytes. but since there isn't that much RAM on the calculator it'd be pointless.
I guess you could have it go across an entire sector of memory.  Considering the other stuff you would need, that's a little less than 2^16 bytes still. So yeah, free ram. ;-)

Offline lookitsan00b

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 173
  • Rating: +37/-3
    • View Profile
Re: Length of Strings
« Reply #5 on: December 12, 2010, 08:12:29 pm »
good ol' TIBD.

edit, and yeah i guess the limit would be 2^16 bytes. but since there isn't that much RAM on the calculator it'd be pointless.
I guess you could have it go across an entire sector of memory.  Considering the other stuff you would need, that's a little less than 2^16 bytes still. So yeah, free ram. ;-)
The most free ram possible with TI-OS is about 24k, but the max length depends upon how you are writing to them.
If you use a built in command (ie anything other than an assembly routine) the string also has to be stored to Ans, so 12k.  I have gotten a string to about 10k before... using a TI-Basic program.

Every token was 'GarbageCollect', so, of course, I had to RCL it :P

EDIT: I guess you could have a longer archived string (but only if written by assembly), but I'm not sure how useful a 2-page string would be... after all, loading it with a TI-OS routine would give a memory error.
« Last Edit: December 12, 2010, 08:14:47 pm by lookitsan00b »
My TI-94+SE is broken.  I used some flawed existential conditioning on it, and it crashed. :(

Activity level:
{====______}

Spoiler For Securite:
{=========_}

A couple security flaws
Need a good backdoor short of reinstalling the OS
Completely immobilized and invalidated by Zstart. And rendered incompatible.
Spoiler For FFTATIA:
{====______}

framework: mostly done
graphics engine: undergoing complete rewrite
still need character and enemy sprites!!! :P

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Length of Strings
« Reply #6 on: December 12, 2010, 09:56:12 pm »
Ya, as everyone else has said. Pretty much as many tokens as you can fit into about half of your free ram. Unless you used an Assembly routine to store directly into an archived string. Then depending on how things worked you could either get full archive or half of archive, about. But to be exact on how many spots in the length you have it depends on if you're just using single byte tokens, two byte tokens, or both.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Length of Strings
« Reply #7 on: December 13, 2010, 04:22:19 pm »
It depends how you store the strings. Something like
Code: [Select]
StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars+ "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + AnotherStringOf200IshChars + "LOLOLOL" + StringOf200IshChars stored to Ans can cause a massive memory leak of over 8000 bytes and slow down the calc to about 40% of its original speed until you break the BASIC program execution or exit. I had this happen during Illusiat 13 and Dark Link Quest development. It appears to be a TI-OS glitch causing an overflow somewhere in memory or something.

When storing huge series of concatenated strings, you must do it in multiple parts instead of all at once, to prevent that glitch.
« Last Edit: December 13, 2010, 04:23:00 pm by DJ Omnimaga »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Length of Strings
« Reply #8 on: December 13, 2010, 04:45:28 pm »
I think that bug is a bit easier to forgive than some of their others tho :P they would have probably had a hard time finding that bug during normal beta testing XD Then again, i wonder if its because of just general bad coding practices :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Length of Strings
« Reply #9 on: December 14, 2010, 02:45:33 am »
Yeah, not a lot of people concatene this much string data at once anyway. :P It kinda reminds me the bug causing the calc to screw up if you recall a 2 byte token from ans or a string and you have 1 byte of RAM left (although that one should be fixed since it could randomly happen to anyone not being careful with how much RAM they have left)
« Last Edit: December 14, 2010, 02:46:48 am by DJ Omnimaga »