Re: A86: Re: LCD stuff


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

Re: A86: Re: LCD stuff




here's how the rom does the checksum.  unfortunately there's no page d
equivalent.
calling $4101 will do this checksum before turning off the calc.  in
fact, ti calls this _setChecksum

0dfb  3e42      ld      a,#42
0dfd  d306      out     (#06),a
0dff  dde5      push    ix
0e01  dd210080  ld      ix,#8000
0e05  01ff3f    ld      bc,#3fff
0e08  210800    ld      hl,#0008
0e0b  54        ld      d,h
0e0c  dd5e00    ld      e,(ix+#00)
0e0f  dd23      inc     ix
0e11  19        add     hl,de
0e12  0b        dec     bc
0e13  79        ld      a,c
0e14  b0        or      b
0e15  20f5      jr      nz,#0e0c
0e17  5a        ld      e,d
0e18  eb        ex      de,hl
0e19  ed52      sbc     hl,de
0e1b  dde1      pop     ix
0e1d  c9        ret

-josh


On Fri, 19 Nov 1999 18:35:58 -0800 (PST) Matt C <snoborder420@yahoo.com>
writes:
>
>are you going to release the code for the new version
>of ZAC?
>this little tip would be great to use in onther
>programs or a shell
>
>--- Clem <darkclem@wanadoo.fr> wrote:
>> 
>> > As near as I can tell, if the cpu hits $0000, the
>> calc's going to be reset.
>> > Somehow, when the lithium battery is in there,
>> that doesn't happen.  But
>> > why?
>> 
>> I know !!! :)  I use a trick in the (upcoming) ZAC
>> memory recovery system...
>> When the cpu hits $0000, the TI-OS will test a
>> checksum to determine
>> whether the calc has been turned off correctly, or
>> crashed...
>> This checksum is located at _onCheckSum, and it's
>> the 16 bit sum of the
>> whole ram page 2... if you set this checksum
>> correctly and your program
>> crashes, when you remove one battery, put it back in
>> and turn the calc on,
>> it should work as if it was turned off correctly ;-)
>> 
>> ---
>> Clem Vasseur <darkclem@wanadoo.fr>
>> Icarus Productions <http://icarus.ticalc.org>
>> 
>> 
>> 
>> 
>
>__________________________________________________
>Do You Yahoo!?
>Bid and sell for free at http://auctions.yahoo.com
>

___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.