;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; -=- Battery Saver II -=- ; ; ; ; (c) December 1997 ; ; ; ; by Nicolas HANNEBICQUE - < nhannebi@ireste.fr > ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; last update : 7th of December 1997 ; you can of course use this routine in your own programs, since it is ; only 106 bytes big, as long as you give me credit... ; it is not commented but it's also too simple (if you don't understand, ; do not hesitate to e-mail me !!) #include "ti82.h" #include "oldcall.h" .org START_ADDR .db "Battery Saver II by Éoc",0 key: call GET_KEY cp 9 ret z cp 4 jr z,up cp 1 jr z,down jr key up: ld a,(CONTRAST) cp $2A jr z,key inc a jr change down: ld a,(CONTRAST) cp 0 jr z,key dec a change: ld (CONTRAST),a update_contrast: ; courtesy ld a,(CONTRAST) ; of add a,$D7 ; Randy call DISP_DELAY ; Gluvna out ($10),a ; ... ld hl,$0F00 ld (CURSOR_ROW),hl ld a,(CONTRAST) add a,48 ROM_CALL(TX_CHARPUT) jr key .end .end