[A83] Re: Battery checking


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

[A83] Re: Battery checking





> On the subject of TI Explorer, have you checked to see if its "battery
> thing" is actually just a contrast level indicator?

It is a contrast indicator. Here's the source for the battery thing in TI
Explorer...

.NOLIST

#define equ .equ
#define EQU .equ
#define end .end

#include "ti83asm.inc"
#include "tokens.inc"

.LIST

.org     9327h

        nop
        jr start
        .dw 0000h
        .dw discription
        .dw icon
start:
        ld a,(8008h)
        add a,a
        ld b,a
        ld a,80
        sub b
        add a,6
        ld bc,0630h
        ld e,c
        ld h,1
        ld d,88
        call _ILine
        ld c,33h
        ld e,c
        call _ILine
        ld c,31h
        ld e,c
        ld d,a
        call _ILine
        ld c,32h
        ld e,c
        call _ILine

        ld hl,0103h
        ld (CURROW),hl
        ld hl,BatOK

        bit 5,(iy+18h)
        jr nz,ok
        ld hl,BatRe
ok:
        call _puts
        jp _getkey

discription:
        .db "Battery check",0
icon:   .db 00000000b                   ; 8 byte icon (8x8 pixels) for
        .db 00011000b                   ; this program
        .db 00111100b
        .db 00100100b
        .db 00100100b
        .db 00100100b
        .db 00100100b
        .db 00111100b
BatOK:.db "Battery OK",0
BatRe:.db "Change Battery",0
.END





References: