EasyManuals Logo
Home>Texas Instruments>Calculator>TI-83-Plus

Texas Instruments TI-83-Plus User Manual

Texas Instruments TI-83-Plus
188 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #75 background imageLoading...
Page #75 background image
Chapter 2: TI-83 Plus Specific Information 65
TI-83 Plus Developer Guide Third Release May 28, 2002
Example one: This example will use the Z80 halt instruction to enter into low power
mode, and upon waking up, will check:
if a key had been pressed,
check for the É key being pressed,
turn off the run indicator while waiting for a key, and
disable APD while waiting and re-enable it after.
anykey:
RES indicOnly,(IY+indicFlags) ; make sure keys are
; scanned
B_CALL RunIndicOff ; turn off run indicator
RES onInterrupt,(IY+onFlags) ; reset On key flag
RES apdAble,(IY+apdFlags) ; turn off APD
anykeylp:
EI ; turn on interrupts
HALT ; low power state
BIT onInterrupt,(IY+onFLags) ; On key pressed
JR NZ,foundkey ; return if yes
;
CALL GetCSC ; local routine to look
; for scan code
OR A ; if non zero then have
; a scan code
JR Z,anykeylp ; jump if no scan code
; present
foundkey:
SET apdAble,(IY+apdFlags) ; turn on APD
RES onInterrupt,(IY+onFlags) ; reset On key flag
RET
;
GetCSC:
LD HL,kbdScanCode
DI ; interrupts off
LD A,(HL) ; get possible scan code
LD (HL),0 ; clear out for next
; scan
RES kbdSCR,(IY+kbdFlags) ; needed for system
; key scan to work
EI ; interrupts on
RET

Table of Contents

Other manuals for Texas Instruments TI-83-Plus

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-83-Plus and is the answer not in the manual?

Texas Instruments TI-83-Plus Specifications

General IconGeneral
BrandTexas Instruments
ModelTI-83-Plus
CategoryCalculator
LanguageEnglish

Related product manuals