EasyManuals Logo

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 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 #692 background imageLoading...
Page #692 background image
650
Appendix A: System Routines — Keyboard
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_getkey
Declaration:
void
push_getkey
(void)
Category(ies):
Keyboard
Description:
Pushes the current key code onto the estack, zero if no key is currently
held down.
Inputs:
None
Outputs:
For a listing of key codes, see
Appendix B
in the TI
-
92 Guidebook. Note
that in the standard include file, tiams.h, some keys are conditionally
defined differently on the TI
-
89 versus the TI
-
92 Plus. So, for example,
KB_LEFT is defined to have the value 0x151 when _92 is defined whereas
it has the value 0x152 if _89 is defined. The
push_getkey
routine will
always return the value 0x151 which is the remapped TI
-
92 Plus value.
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
On AMS 1.05 and higher.
TI-89 / TI-92 Plus
Differences:
This routine remaps the TI
-
89 keys to match the TI
-
92 Plus. This is the
TI
-
BASIC GetKey routine and not the low level keyboard routine. Some of
the return values are different than those returned by
GKeyIn
or the event
handler.
See Also: pushkey, GKeyIn
Example:
This example routine waits for
¸
or
N
to be pressed. It returns TRUE
if
¸
was pressed, FALSE if
N
was pressed.
Boolean tKey( void )
{ Access_AMS_Global_Variables;
unsigned short key, result;
do {
push_getkey();
result = estack_to_ushort(top_estack, &key)
delete_expression( top_estack );
if (1 == result) {
if (KB_ENTER == key)
return TRUE;
if (KB_ESC == key)
return FALSE;
}
} while (TRUE);
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

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

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals