Re: A89: Crashing Program


[Prev][Next][Index][Thread]

Re: A89: Crashing Program




As I am used to the TI-86, where you have to use right-back routines to
save any program information permanently, I was surprised and initially
confused when I found that programs run a second time retain information
variables from the first time.  Perhaps your program relies on a
variable being within a certain range or value at the start, and it is
modified when you run the program to completion.  Then when you start it
the second time, the variable is still the modified value, and causes a
crash?

Cassady Roop

BrncAvFan2@aol.com wrote:
> 
> As all of you might know by now I have started programming using ti-gcc.  I
> just have one more question for the time being.  Why is it that my program
> crashes when I try to use it a second time?  When i run it once it works but
> when I run it again, it crashes.  The basic layout of my program goes:
> 
> static unsigned ints of sprites
> procedure to redraw map
> main procedure
> LCD_BUFFER buffer;
> LCD_save(buffer);
> SetCurAttr(A_NORMAL);
> getkey routine to check if player moved
> LCD_restore(buffer);
> return 0;
> 
> That's it.  I don't know what is different between my program and others.  It
> is a nostub program.
> 
> THANX
> Dan



References: