Re: LZ: Compression program (and questions for asm programmers)
[Prev][Next][Index][Thread]
Re: LZ: Compression program (and questions for asm programmers)
On Thu, 12 Sep 1996, Ben Shakal wrote:
> At 05:18 PM 9/12/96 -0700, you wrote:
> >I was just responding to his question. Anyways, I was looking in
> >ti-ram.txt to remember the pointers. $8b25 is the pointer to last byte
> >of free mem. $8b27 is the first byte. You can subtract those to see if
> >you have enough room to uncompreess, and then write it there. Since only
> >your program is running, (besides interuppts), you can be sure nothing
> >will mess eith it. Dont' change the pointers though...
> >
> >Alan B.
> >
> >oh yeah, you can leave stuff there, you don't have to clear it.
>
> What if the program being run used those pointer to find out how much memory
> is left, as in the case of graylib (gray8lib) programs? Wouldn't it end up
> overwriting itself? I suppose it would confuse the calc during a ROM call
> if those pointers had been changed, so I don't think we can do that. But
> the uncompressed program must seem, at least to itself, like it is part of
> _used_ memory so it doesn't overwrite itself. I think...
>
> In order for this to be compatible with every ZShell program, we must make
> it believe it exists in memory and that it is being run straight from ZShell.
Good point. If zshell strings run within used memory, as you say, and
use that empty ram, there could be a problem.
It might be worth finding out if they're needed by rom calls that
don't add or delete or modify the size of variables. Also, interrupts
might need them, or might not. These will be good things to know, and
not just for this program.
On my model 100 there are pointers to the bottom and top of memory and
they can be changed if you know what youre doing. The same is true of
MS Basic interpreters. I've modified start of program pointers and
end of program pointers and top of memory pointers, back in my TRS-80
Basic days.
In the long run, this kind of information is probably worth a lot more
than a compression program.
Barry
References: