Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on January 06, 2013, 02:27:09 am

Title: Ti-83+ RAM from $8000
Post by: Hot_Dog on January 06, 2013, 02:27:09 am
I have some RAM code that takes up 478 bytes, and I'm storing it at $8000.  If I run an application, is there anything from $8000 on that needs to be preserved? 

I'm asking because it seems like exiting the app with JForceCmdNoChar might be causing problems.  It could be another reason, but I don't know.
Title: Re: Ti-83+ RAM from $8000
Post by: Hot_Dog on January 06, 2013, 10:57:15 am
*bump*
Title: Re: Ti-83+ RAM from $8000
Post by: Xeda112358 on January 06, 2013, 11:53:40 am
Hmm, the first 256 bytes I've never had a problem with using, but the 119 bytes immediately following is called "ramcode". I believe I have seen the OS back up data there when calling a bcall and when copying code that needs to access off-page calls (such as for working with the archive). That might be causing the problem :/

EDIT: Hopefully somebody who actually knows will come along. Have you tried stepping through the code? Maybe create some code that just edits that area of RAM and tries to exit, see if that causes problems.
Title: Re: Ti-83+ RAM from $8000
Post by: Hot_Dog on January 06, 2013, 01:49:43 pm
That was a good idea, so I did that.  Apparently it's something else I'm doing wrong, nothing to do with $8000 and beyond.

EDIT:  Apparently my problem was plotsscreen wasn't enough space for a graph buffer.  Chicken Dude's routine requires 1120 bytes of RAM, so I copied anything past plotsscreen onto extra RAM to avoid corruption.  I should have guessed ;D
Title: Re: Ti-83+ RAM from $8000
Post by: thepenguin77 on January 06, 2013, 02:19:51 pm
I'm going to guess you haven't seen this (http://ourl.ca/16406/306283) yet.

Anyways, at 478 you shouldn't have to worry about anything. However, if you go past 560 on specifically the 83+, you'll have to use bcall(_fillBasePageTable) when you quit.
Title: Re: Ti-83+ RAM from $8000
Post by: Hot_Dog on January 06, 2013, 02:35:31 pm
No I haven't, and that's an impressive list!  I forgot entirely about _fillBasePageTable.

Looking at that list, I've confirmed that my problem was not backing up anything after plotsscreen
Title: Re: Ti-83+ RAM from $8000
Post by: FloppusMaximus on January 06, 2013, 02:39:58 pm
Indeed, all of that space (up to 822Fh) is used as scratch space by the OS; there's nothing wrong with using it for your own temporary storage.  But as Xeda says, many system routines will use ramCode themselves, and could be overwriting your data.
Title: Re: Ti-83+ RAM from $8000
Post by: Hot_Dog on January 06, 2013, 02:44:13 pm
But as Xeda says, many system routines will use ramCode themselves, and could be overwriting your data.

Which did happen, so I solved that problem.  But the problem was the application crashed upon B_CALL _JForceCmdNoChar.