Re: A85: Checksum Recalculation


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

Re: A85: Checksum Recalculation



Richardlewis wrote:
> 
> Maybe I should restate the question.
> 
> I am writing a shell, and I need an assembly code (source code) routine
> that can recalculate the checksum of a file.  I need this independant of a
> shell!  I'm trying to make a ZShell compatible shell, with checksum
> recalculation, and the Shell developers list isn't much help (nobody there cares about
> much of anything).
Just add all the bytes of the string, starting with the length byte of
the description string.  So basically all the bytes excluding the size
word and the signature word ($00, $FD).  The checksum is only a byte so
work with single byte addition (don't worry about carries).  You also
realize that the checksum byte is added by ZShell (by the string85.com
file).  The TI-85 doesn't require, nor does it check the checksum byte. 
It was implemented under ZShell to simply protect programs from changing
itself.  This really isn't necessary unless you are in the progess of
writing a game.  Therefore ZShell should have excluded the recalculation
of the checksum byte within their shell (saving space) and released a
string as a development package if you will (for programmers) to use to
check the checksum of their strings.  I think most people are aware when
they modify their strings contents (for storing high-scores or simply
using self-modifying code).


References: