This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Calculator Tech Support => Technology & Calculator Open Topic
Author Message
DJ Omnimaga
http://i-lost-the-ga.me


Calc Guru


Joined: 14 Nov 2003
Posts: 1196

Posted: 26 Aug 2004 11:29:52 am    Post subject:

In the old days of my secret BASIC project, I was making a map engine and I suddently noticed a mysterious bug with my game: After storing a very huge string using full of Sub( command, the calc would lose 8 KB of RAM during runtimeand slow down to half of the processor speed (3 MHz). After stopping the game everything came back to normal. The only way to counter this bug was to break the string into smaller pieces:

"::::::::::::::::::: ::YYYYYYYYYYYYY
Ans+Sub("AH",Z,1
Ans+"::::::::YYYYYYOOOOOOOOOOYYYYYYYYY

etc...
so the calc would not slow down.
Thsi happened on TI-OS 1.14 with 83+SE and 83+ Black model.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 26 Aug 2004 03:36:34 pm    Post subject:

How big was the command again?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Aug 2004 03:37:24 pm    Post subject:

" ->Ans
Repeat 0
Ans+Ans
End

: o Confused
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 26 Aug 2004 04:01:58 pm    Post subject:

Does "storing a huge string full of sub( command" mean "sub(sub(sub..."?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Aug 2004 04:08:25 pm    Post subject:

Judging from the example I'd say no, but I think it might both cause the same error and be part of the same problem.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 26 Aug 2004 04:14:06 pm    Post subject:

Also fun: "expr(Str1 -> Str1 :expr(Str1
This is one of the only ways to get an ILLEGAL NEST error.

Back ontopic, maybe the reason this might happen is if the line was too big to be executed and TIOS had to do some clever shuffling of data.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 26 Aug 2004 06:07:59 pm    Post subject:

i use 1.16 and have used sub( with strings over several hundred bytes before, no loss of spee or anything.
Back to top
DJ Omnimaga
http://i-lost-the-ga.me


Calc Guru


Joined: 14 Nov 2003
Posts: 1196

Posted: 10 May 2011 09:11:09 pm    Post subject:

Just an update: I had this issue happen again during the development of Illusiat 13: The Final Chapter, 2 years ago. Basically I had the following code: (It's messed up because SourceCoder doesn't display all tokens, but it should give you an idea)


Code:
:If G=14:Then
:If E=66:"XXXXXXXXXXXXXXXXWWWWWWWXXWWWWWWWWWWWWWWXXWWWWWWW       XX       XXXXXX XX XXXXXXWWWWWX XX XWWWWW     X XX X     XXXX=X XX X=XXXX
:If E=67:"XXXX=X XX X=XXXXXXXX X XX X XXXXXXXX X XX X XXXXXXXX X XX X XXXXXXXX W XX W XXXXXXXX W XX W XXXXXXXX   XX   XXXXXXXXXXXXXXXXXXXX
:If E=68:"XXWWWWWXXWWWWWXXXXWWWWWXXWW"+sub("H-",1+(L3(31)>L3(36)),1)+"WWXXXX     XX  =  XXXX     XX     XXWW  □  XX     WWWW     XX     WW       XX       XXXXXXXXXXXXXXXX
:If E=69:"WWXXXXXXXXXXXXWWWWXWWWWWWWWWWXWW  XWWWWWWWWWWX  X X    φφ    X XX W X      X W XX W X      X W XX   XXX  XXX   XXXXXXXX--XXXXXXX
:End
:If G=15:Then
:If E=66:"0000000000000000UUUUUUU00UUUUUUUUUUUUUU00UUUUUUU       00       000000 00 000000UUUUU0 00 0UUUUU     0 00 0     0000=0 00 0=0000
:If E=67:"0000=0 00 0=00000000 0 00 0 00000000 0 00 0 00000000 0 00 0 00000000 U 00 U 00000000 U 00 U 00000000   00   00000000000000000000
:If E=68:"00UUUUU00UUUUU0000UUUUU00UU"+sub("H-",1+(L3(32)>L3(36)),1)+"UU0000     00  =  0000     00     00UU  □  00     UUUU     00     UU       00       0000000000000000
:If E=69:"UU000000000000UUUU0UUUUUUUUUU0UU  0UUUUUUUUUU0  0 0    φφ    0 00 U 0      0 U 00 U 0      0 U 00   000  000   00000000--0000000
:End
:If G=16:Then
:If E=66:"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZ                ZZZZZ  ZZZZZ            =  =
:If E=67:"=  =             Z  Z  Z  Z       
:If E=68:"ZZZZZZZZZZZZZZZZZ"+sub("H-",1+(L3(33)>L3(36)),1)+"ZZ       =            ZZ  □       ZZZZ          ZZ             
:If E=69:"ZZZZZZZZZZZZZZZZZZ  ZZZZZZZZZZ       φφ      Z        Z  Z        Z         --
:End
:If G=17:Then
:If E=66:"LLLLLLLLLLLLLLLLIIIIIIILLIIIIIIIIIIIIIILLIIIIIII       LL       LLLLLL LL LLLLLLIIIIIL LL LIIIII     L LL L     LLLL=L LL L=LLLL
:If E=67:"LLLL=L LL L=LLLLLLLL L LL L LLLLLLLL L LL L LLLLLLLL L LL L LLLLLLLL I LL I LLLLLLLL I LL I LLLLLLLL   LL   LLLLLLLLLLLLLLLLLLLL
:If E=68:"LLIIIIILLIIIIILLLLIIIIILLII"+sub("H-",1+(L3(34)>L3(36)),1)+"IILLLL     LL  =  LLLL     LL     LLII  □  LL     IIII     LL     II       LL       LLLLLLLLLLLLLLLL
:If E=69:"IILLLLLLLLLLLLIIIILIIIIIIIIIILII  LIIIIIIIIIIL  L L    φφ    L LL I L      L I LL I L      L I LL   LLL  LLL   LLLLLLLL--LLLLLLL
:End


Basically to get rid of the repetitiveness I simply stored the needed characters in other strings, then Str1+Str1+Str1+Str1+Str1+Str2+Str2+" "+Str1+Str2... and so on, to reduce code size, but doing so caused the slow down I got when I developed Dark Link Quest. As a result I was stuck with the code above.

(Note: I tested this after a RAM clear, making sure no ASM program is ran prior testing this. I just ran parts of the game)

I am bringing this up again because I now tested it on OS 1.18, 1.19 and on my TI-Nspire running OS 1.7 and it happened anyway. I think the TI-OS might have issues with the concatenation of a certain amount of strings together (Not that this is something TI intended people to do anyway Razz).

The slow down seems similar to what happens with the For( command when you omit the closing parhentesis and it only contains a lone If that is false.

(Note: The data above were 16x8 ASCII tilemaps and the game, which was never finished, although still 90% complete, looked like this:
http://www.youtube.com/watch?v=yfad1g_1-mg


Last edited by Guest on 10 May 2011 09:15:34 pm; edited 1 time in total
Back to top
mrmprog


Newbie


Joined: 04 Feb 2011
Posts: 44

Posted: 10 May 2011 09:14:48 pm    Post subject:

I think I heard about something like that before...
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement