Re: LZ: Variables and Compression


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

Re: LZ: Variables and Compression



Michael Wyman wrote:
> 
> First thing, I'm wondering if any of you could tell me how to find the
> address and length of variables on the calculator using an assembler
> program in ZShell.  Does it have something to do with the VAT that is in
> the ti-85.h file?  If so, is there any relatively easy way to search
> through it and find the names of variables.  Then, how do I find their
> lengths.


Yu can find the functions which does all this in the rom, but since
Zshell
does not support them (yet) you will have to check the persons rom
version.
IF you want to make your own rutine (which is probably best when zshell
does 
not support this), try  looking at the rutines in your own rom. When you
have seen how it is done there is should not be hard to write your own
rutines.


What you need to do to find the length of a variable is to go through
the VAT
and find the adress of th variable. The first two bytes of the data
found 
at that location is the size of the variable.


If you do not know how information is stored in the VAT, Rob Taylor
worte a
small document once explaining this. I am planing to make a document
which
explains how the ram is used and how data is stored in the ram, but i
wont
start on this before ti-rom and ti-ram has been released.


> 
> Also, is there any way to delete variables (such as strings and
> programs usable by the calculator in TI-OS) using assembler, or at least
> delete part of them?  Then, is there any way to create such variables or at
> least increase their length?
> 


The problem with doing this kind of stuff is that the ti85 moves stuff
around 
when it deletes or creates new variables. Therefore if you used these
runtines
in you asm program, it might get moved and the calc would probably
crash.


If you do need to create new vars, i would recommen that you did it your
self,
but thgis ican be very difficult. The problem is that the system uses
the top 
of the used memory as a floating point stack, and the size of it is not
stored
any were in ram. So unless this stack is never used when Zshell is
running
you might get into problems when your new variable end up at the top of
the mem
(the calc might start poping parts of your new variable). If you want to
try
creating vars, have a loook at the rom functions first.


> Then, does anyone know any way in which I could compress these files using
> assembler so that I could pack them into smaller space and later decompress
> them?  I was thinking about writing a program to compress .85p and .85s
> files on the calculator to make more room (never mind about running these
> programs while compressed).  It sometimes annoys me how few good games it
> seems like I can have on my calc and still preform calculations (in
> TI-OS) at a decent speed!
> 


There are alot of ways to compress the data, but the problem is that to
compress
random data (like programs) your program will probably have to be fairly
large.
Since you can not compress 32k that much I dubt if it is usefull to
compress the
variables.


> Oh, and could anybody tell me how to exit out of a ZShell program and go
> directly to TI-OS?


I have never done that in a program, but just storing the code for the
exit key
in the keyboard "buffer" should work. Look at ti-ram for the location.
<pre>
-- 
_______________________________________


Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________
</pre>


References: