Re: LZ: Delete Strings in ASM?


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

Re: LZ: Delete Strings in ASM?



On Wed, 25 Sep 1996 08:09:12 -0500 (CDT), you wrote:
>On Wed, 25 Sep 1996, Mel Tsai wrote:
>
>> Actually, it is possible.  The program would be complex, however.  You
>> would first need to make sure your program was located in a lower
>> memory position, otherwise it may get moved and all of a sudden the
>> program crashes (I'm not sure when this will occur).  One solution
>> would be to move your program to the graph memory, move programs, and
>> then go back to your main program.  Probably the most difficult
>> aspect, however, is knowing which variables you must update, i.e. free
>> memory, vat and memory pointers, checksum, and of course moving the
>> entire memory down.  One thing I did notice is that the ROM doesn't
>> totally delete a file.  I deleted a zshell program, loaded hexview,
>> and fragments of the program were still in memory.  I'm not sure what
>> exactly happens.
>=20
>The same thing is true on most computers, both in memory and
>on disk.  There are pointers that tell the system where things
>are and they can delete these things by removing the pointers
>to them.
>
>That's why, after you delete a file on a pc, you can use the
>UNDELETE command to get it back.  In this case the pointer
>is in the directory, which is just a table of files and
>information about them.  The DEL command marks that directory
>entry as deleted and then it's done its work.  The mark is
>placed in the first character of the name, which is why you
>have to give the first letter to the undelete command, since
>it's been lost.
>
>If you're a MAC user you probably won't understand this, but
>then, MAC users aren't supposed to understand computers.  :)
>




Actually, the only reason why clusters don't get physically deleted on
disk is because of speed (also so you can undelete them).  If you
actually deleted the cluster on an MSDOS system, it would take as long
to delete a file as it would to copy it.  This will be the same
principle I'm using for my expander.  Now, even the slowest RAM chips
are hundreds of times faster than a hard disk, so there's no reason
why the TI shouldn't physically write 0's to the location.  There's no
undelete function, it makes no sense.  Granted, it is "easier" to just
delete the pointer, but then your memory would get fragmented, which
you don't want to happen.  This is where my understanding of the
memory stops, because I know the memory doesn't get fragmented, yet
variables are still present in memory after they're deleted.  I guess
that if the var is in the highest position in memory, it just deletes
the pointer and leaves it alone.  If it's between two variables, it
will have to move them.


-Mel


References: