1231
Axe / Re: CheckSums in Axe?
« on: September 17, 2010, 07:24:19 pm »
Here's the source code and hex for the checksumming routine
On my calc, it took a couple seconds to run (I enclosed it in an Axe program).
Code: [Select]
di
in a,($06)
push af
ld hl,$0000
ld bc,$0700
jr go
ComeBack:
in a,($02)
bit 5,a
jr nz,TI84P
bit 7,a
jr nz,TI83PSE
ld bc,$1F18
jr go
TI83PSE:
ld b,$7F78
jr go
TI84P:
in a,($21)
bit 0,a
jr nz,TI84PSE
ld bc,$3F34
jr go
TI84PSE:
ld bc,$7F74
go:
ld a,b
out ($06),a
ld de,$4000
loopi:
ld a,(de)
add a,l
ld l,a
adc a,h
sub l
ld h,a
inc de
ld a,d
cp $80
jr c,loopi
dec b
ld a,c
cp b
jr c,go
ld a,c
or a
jr z,ComeBack
pop af
out ($06),a
ret
Code: [Select]
F3DB06F52100000100071821DB02CB6F200DCB7F200501181F18120678180EDB21CB47200501343F180301747F78D3061100401A856F8C9567137AFE8038F40579B838E979B728C4F1D306C9
I've tested it and it doesn't crash. Note that it should be its own subroutine because it returns when it's done.On my calc, it took a couple seconds to run (I enclosed it in an Axe program).