0 Members and 1 Guest are viewing this topic.
di in a,($06) push af ld hl,$0000 ld bc,$0700 jr goComeBack: in a,($02) bit 5,a jr nz,TI84P bit 7,a jr nz,TI83PSE ld bc,$1F18 jr goTI83PSE: ld b,$7F78 jr goTI84P: in a,($21) bit 0,a jr nz,TI84PSE ld bc,$3F34 jr goTI84PSE: ld bc,$7F74go: ld a,b out ($06),a ld de,$4000loopi: 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
F3DB06F52100000100071821DB02CB6F200DCB7F200501181F18120678180EDB21CB47200501343F180301747F78D3061100401A856F8C9567137AFE8038F40579B838E979B728C4F1D306C9
Here's the source code and hex for the checksumming routineCode: [Select] di in a,($06) push af ld hl,$0000 ld bc,$0700 jr goComeBack: in a,($02) bit 5,a jr nz,TI84P bit 7,a jr nz,TI83PSE ld bc,$1F18 jr goTI83PSE: ld b,$7F78 jr goTI84P: in a,($21) bit 0,a jr nz,TI84PSE ld bc,$3F34 jr goTI84PSE: ld bc,$7F74go: ld a,b out ($06),a ld de,$4000loopi: 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 retCode: [Select]F3DB06F52100000100071821DB02CB6F200DCB7F200501181F18120678180EDB21CB47200501343F180301747F78D3061100401A856F8C9567137AFE8038F40579B838E979B728C4F1D306C9I'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).
Disp sub(C)>DecReturnLbl C.ASM code from above
Return!If GetCalc("appvCHECKSUM",2)->Xsub(C)->{X}r