Re: LZ: New idea for compression program!


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

Re: LZ: New idea for compression program!



On Wed, 11 Sep 1996, Scott J. Rein wrote:


> >If it were me, I would keep it real simple.  I would have
> >zshell run the decompression program which would make an
> >uncompressed copy of the string and execute it.  Then,
> >when the copy is finished it will do a ret and return to
> >the decompressor, which will do a ret and return to zshell.
> 
> Exactly, but that is with a shell.  That is what I tried to
> get away from.  I personally don't know much about the graphics
> in ZShell.  I can, though, write software for the PC which will
> compress the string and write a small program which is actually
> added on to the comrpessed string.  Yah, yah, I told you this
> already, I know.
> 
> I just think that it would be easier and better to see all of
> the compressed programs just as if they were normal zshell
> programs and then unzip them on the fly.  Why make a shell just
> like zshell if I don't need to.


You have a good point.  It'll be better for the users if
you do it this way.  But how much code will you have to
put in the compressed program to make this work?  I would
get good, solid estimates of that before deciding.  You
might be right but if you're not you need to know it.


> >I'd also try real hard to avoid having either zshell or
> >the target program know anything about the compression,
> >even if that means giving up some features.  Flexibility
> >is much more important.
> 
> Why would they have to know about it?  ZShell will think they
> are normal programs, the target program won't know either because
> it will come out looking just like the original program stored on
> the computer.
> 
> >There's been some discussion of changing PROGRAM_ADDR in
> >zshell.  I would only do that after discussing it with the
> >zshell people, and only with their approval.  Also, I would
> >find out if it has to be restored before exiting.
> 
> I don't really see why.  Won't PROGRAM_ADDR automatically be set
> if and when the decomrpession program and target program are run?
> If I do a return from the decompression prgoram (after creating
> the temporary string) and then have the compressed string run the
> temp program, won't that work?


If you write a shell, you'll have to make PROGRAM_ADDR point
to the beginning of the program when you execute it.  If you
don't write a shell you'll need to make PROGRAM_ADDR point to
the beginning of the compressor before you run it, and then
set it back to the new address of the decompressed program.
You'll need to find out from the zshell people if you have to
reset it or not.


> >Also, what other features of zshell might have to be dealt
> >with.  Is PROGRAM_ADDR the only one?
> >
> >Memory is going to be needed to decompress the program into.
> >I have no idea how that memory is obtained in zshell.  Does
> >it have memory allocation routines or do you have all the
> >rest of the calcs memory or is there no real control?  I
> >haven't seen any discussion of this yet.  The memory needs
> >to be there and your program has to know it's there and know
> >how much, if possible.
> 
> That is what I am worried about (and this will be a problem
> no matter how we do the decompression program).  How can you
> create the variables and delete them?  Yes, the program needs
> to know exactly how much, and whether it is enough.


You might not need to create variables if you can just get
access to some ram that you know is unused to decompress the
program into and then execute it from.  There might be pointers
in the system to the bottom or top of available memory.  There
probably are.  I don't have any idea if they're known or not.
If not, you'll have to find out about using a variable.


Barry


References: