Re: A86: Re: i need an equate here


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

Re: A86: Re: i need an equate here




This is the same as the routine I found at $0E0B.  Kirk says it is
really at $0DFB.  Maybe due to different ROM vers?  I have 1.3.  I was
about to post the routine for anyone who wanted it, but it looks like
once again Mr. Phillips beat me to it :)  There IS a reference in the
call table, it's just a little indirect of a way to get to it, and it
unfortunately also turns the calc off.  Clem has it titled
'_setChecksum', at $4101, which I could have sworn was called '_off' or
'_calcOff' or some such thing.  I remember that number because I used to
have lots of fun typing in CD0141 on a friend's calc and amazing them
cause they thought I was turning off the calc through BASIC... although
occasionally I used CD0941 when I didn't like the person :)

Anyway, I put that routine in Lockdown, and now it doesn't reset the
calc when you pull the batteries to charge them!  It's about time!

Cassady Roop


David Phillips wrote:
> 
> CalcChecksum:
>  ld a,$42
>  out (6),a
>  ld ix,$8000
>  ld bc,$3fff
>  ld hl,8
>  ld d,8
> CalcChecksumLoop:
>  ld e,(ix)
>  inc ix
>  add hl,de
>  dec bc
>  ld a,b
>  or c
>  jr nz,CalcChecksumLoop
>  ld e,d
>  ex de,hl
>  sbc hl,de
>  ld (_onChecksum),hl
>  ret
> 
> >
> > Does anyone have an equate for ROM call $0E0B ?  Better yet, anyone know
> > of a reference to this from the page 0D call table, so it is compatible
> > across versions?
> >
> > It calculates the _onChecksum value and stores it to HL.


Follow-Ups: References: