Texas Instruments TI-83 Plus Manual page 75

Third release
Hide thumbs Also See for TI-83 Plus:
Table of Contents

Advertisement

Chapter 2: TI-83 Plus Specific Information
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:
anykeylp:
;
foundkey:
;
GetCSC:
TI-83 Plus Developer Guide
RES
indicOnly,(IY+indicFlags)
B_CALL
RunIndicOff
RES
onInterrupt,(IY+onFlags)
RES
apdAble,(IY+apdFlags)
EI
HALT
BIT
onInterrupt,(IY+onFLags)
JR
NZ,foundkey
CALL
GetCSC
OR
A
JR
Z,anykeylp
SET
apdAble,(IY+apdFlags)
RES
onInterrupt,(IY+onFlags)
RET
LD
HL,kbdScanCode
DI
LD
A,(HL)
LD
(HL),0
RES
kbdSCR,(IY+kbdFlags)
EI
RET
; make sure keys are
; scanned
; turn off run indicator
; reset On key flag
; turn off APD
; turn on interrupts
; low power state
; On key pressed
; return if yes
; local routine to look
; for scan code
; if non zero then have
; a scan code
; jump if no scan code
; present
; turn on APD
; reset On key flag
; interrupts off
; get possible scan code
; clear out for next
; scan
; needed for system
; key scan to work
; interrupts on
Third Release May 28, 2002
65

Advertisement

Table of Contents
loading

Table of Contents