The <compat.h> Header File

Various calc-dependent and AMS-dependent pseudo-constants

This header file contains a set of various pseudo-constants (i.e. macros defined to look and work like constants), dedicated to increase compatibility between the TI-89 and TI-92 Plus and between AMS versions. These "constants" have different values on the TI-89 and TI-92 Plus (or on AMS 1.xx and AMS 2.xx). Using these pseudo-constants, you can, for example, perform keyboard reading and graphic calculations in a more sophisticated way, check the AMS version and perform some AMS-dependent actions (although this is not recommended if not really necessary), etc.

The following table shows all defined pseudo-constants. A lot of them are known from DoorsOS, but they are defined here to work in both "nostub" and "Doors" mode.

Functions

PSEUDO_CONST_CALC
A macro to construct a pseudo-constant from calculator-based values.
PSEUDO_CONST_KBD
A macro to construct a pseudo-constant from keyboard-based values.
PSEUDO_CONST_SCREEN
A macro to construct a pseudo-constant from screen-based values.

Constants

AMS_1xx
TRUE on AMS 1.xx, FALSE on AMS 2.xx and AMS 3.xx.
AMS_2xx
TRUE on AMS 2.xx, FALSE on AMS 1.xx and AMS 3.xx.
AMS_3xx
TRUE on AMS 3.xx, FALSE on AMS 1.xx and AMS 2.xx.
CALCULATOR
Describes the calculator model.
HW_VERSION
Describes the hardware version.
KEY_DIAMOND
The number added to the key code if the Diamond key is pressed with it (see ngetchx).
KEY_DOWN
Key code for the down arrow key (see ngetchx).
KEY_DOWNLEFT
Key code for simultaneous pressing of the down and left arrow keys (see ngetchx).
KEY_LEFT
Key code for the left arrow key (see ngetchx).
KEY_OFF2
The key code for Diamond+ON (see ngetchx).
KEY_RIGHT
Key code for the right arrow key (see ngetchx).
KEY_SHIFT
The number added to the key code if the Shift key is pressed with it (see ngetchx).
KEY_UP
Key code for the up arrow key (see ngetchx).
KEY_UPRIGHT
Key code for simultaneous pressing on up and right arrow keys (see ngetchx).
LCD_HEIGHT
Height of the screen in pixels.
LCD_LINE_BYTES
Number of bytes in the visible part of a screen line.
LCD_WIDTH
Width of the screen in pixels.
ROM_base
Base address of the ROM (0x200000 on TI-89 or V200, 0x400000 on TI-92 Plus, 0x800000 on TI-89 Titanium).
RR_0
A pseudo-constant pair for the '0' key.
RR_1
A pseudo-constant pair for the '1' key.
RR_2
A pseudo-constant pair for the '2' key.
RR_3
A pseudo-constant pair for the '3' key.
RR_4
A pseudo-constant pair for the '4' key.
RR_5
A pseudo-constant pair for the '5' key.
RR_6
A pseudo-constant pair for the '6' key.
RR_7
A pseudo-constant pair for the '7' key.
RR_8
A pseudo-constant pair for the '8' key.
RR_9
A pseudo-constant pair for the '9' key.
RR_2ND
A pseudo-constant pair for the '2nd' key.
RR_A
A pseudo-constant pair for the 'A' key.
RR_ALPHA
A pseudo-constant pair for the Alpha key.
RR_APPS
A pseudo-constant pair for the 'APPS' key.
RR_B
A pseudo-constant pair for the 'B' key.
RR_BCKSPC
A pseudo-constant pair for the backspace key.
RR_C
A pseudo-constant pair for the 'C' key.
RR_CATALOG
A pseudo-constant pair for the 'CATALOG' key.
RR_CLEAR
A pseudo-constant pair for the 'CLEAR' key.
RR_COMMA
A pseudo-constant pair for the ',' key.
RR_COS
A pseudo-constant pair for the 'COS' key.
RR_D
A pseudo-constant pair for the 'D' key.
RR_DIAMOND
A pseudo-constant pair for the Diamond key.
RR_DIVIDE
A pseudo-constant pair for the '/' key.
RR_DOT
A pseudo-constant pair for the '.' key.
RR_DOWN
A pseudo-constant pair for the down arrow key.
RR_E
A pseudo-constant pair for the 'E' key.
RR_EE
A pseudo-constant pair for the 'EE' key.
RR_ENTER1
A pseudo-constant pair for the first 'ENTER' key.
RR_ENTER2
A pseudo-constant pair for the second 'ENTER' key.
RR_ENTER
A pseudo-constant pair for the 'ENTER' key.
RR_EQUALS
A pseudo-constant pair for the '=' key.
RR_ESC
A pseudo-constant pair for the 'ESC' key.
RR_F1
A pseudo-constant pair for the 'F1' key.
RR_F2
A pseudo-constant pair for the 'F2' key.
RR_F3
A pseudo-constant pair for the 'F3' key.
RR_F4
A pseudo-constant pair for the 'F4' key.
RR_F5
A pseudo-constant pair for the 'F5' key.
RR_F6
A pseudo-constant pair for the 'F6' key.
RR_F7
A pseudo-constant pair for the 'F7' key.
RR_F8
A pseudo-constant pair for the 'F8' key.
RR_F
A pseudo-constant pair for the 'F' key.
RR_G
A pseudo-constant pair for the 'G' key.
RR_H
A pseudo-constant pair for the 'H' key.
RR_HAND
A pseudo-constant pair for the Hand key.
RR_HOME
A pseudo-constant pair for the 'HOME' key.
RR_I
A pseudo-constant pair for the 'I' key.
RR_J
A pseudo-constant pair for the 'J' key.
RR_K
A pseudo-constant pair for the 'K' key.
RR_L
A pseudo-constant pair for the 'L' key.
RR_LEFT
A pseudo-constant pair for the left arrow key.
RR_LN
A pseudo-constant pair for the 'LN' key.
RR_M
A pseudo-constant pair for the 'M' key.
RR_MINUS
A pseudo-constant pair for the '-' key.
RR_MODE
A pseudo-constant pair for the 'MODE' key.
RR_MULTIPLY
A pseudo-constant pair for the '*' key.
RR_N
A pseudo-constant pair for the 'N' key.
RR_NEGATE
A pseudo-constant pair for the negation key.
RR_NO_KEY
A constant which means that a specific key does not exist.
RR_O
A pseudo-constant pair for the 'O' key.
RR_P
A pseudo-constant pair for the 'P' key.
RR_PAREN_CLOSE
A pseudo-constant pair for the ')' key.
RR_PAREN_OPEN
A pseudo-constant pair for the '(' key.
RR_PLUS
A pseudo-constant pair for the '+' key.
RR_POWER
A pseudo-constant pair for the '^' key.
RR_Q
A pseudo-constant pair for the 'Q' key.
RR_R
A pseudo-constant pair for the 'R' key.
RR_RIGHT
A pseudo-constant pair for the right arrow key.
RR_S
A pseudo-constant pair for the 'S' key.
RR_SHIFT
A pseudo-constant pair for the Shift key.
RR_SIN
A pseudo-constant pair for the 'SIN' key.
RR_SPACE
A pseudo-constant pair for the space key.
RR_STORE
A pseudo-constant pair for the Store key.
RR_T
A pseudo-constant pair for the 'T' key.
RR_TAN
A pseudo-constant pair for the 'TAN' key.
RR_THETA
A pseudo-constant pair for the 'q' key.
RR_U
A pseudo-constant pair for the 'U' key.
RR_UP
A pseudo-constant pair for the up arrow key.
RR_V
A pseudo-constant pair for the 'V' key.
RR_W
A pseudo-constant pair for the 'W' key.
RR_WITH
A pseudo-constant pair for the '|' key.
RR_X
A pseudo-constant pair for the 'X' key.
RR_Y
A pseudo-constant pair for the 'Y' key.
RR_Z
A pseudo-constant pair for the 'Z' key.
TI89_CLASSIC
TRUE on a classic TI-89 (i.e. a TI-89 which is not a TI-89 Titanium), FALSE otherwise.
TI89_TITANIUM
TRUE on a TI-89 Titanium, FALSE otherwise.
TI89
TRUE on a TI-89, FALSE otherwise.
TI92PLUS
TRUE on TI-92 Plus, FALSE otherwise.
TIOS_entries
Number of entries in the TIOS jump table.
V200
TRUE on V200, FALSE otherwise.

Note: All of these pseudo-constants are in fact macros. Although they expand to relatively small code (in "Doors" mode they are mainly implemented as RAM calls and managed by kernel), it is recommended to store a pseudo-constant in an ordinary variable if you use it a lot of times in the program (especially in "nostub" mode), and to use this variable instead. For example, if you use the KEY_LEFT pseudo-constant too often, it is recommended to define

int key_left = KEY_LEFT;

somewhere at the beginning of the program, and to use

if (key == key_left) ...

instead of

if (key == KEY_LEFT) ...

Such indirection will save memory, but note that this is necessary only if you use the same pseudo-constant a lot in the program (say, more than 5 times).

There is yet another note. Pseudo-Constants work as constants in nearly all cases, but they are not really constants, so they cannot be used in case labels inside switch statements, i.e. the following is not legal:

switch (ngetchx ())
  {
    case KEY_LEFT:
      ...
    case KEY_RIGHT:
      ...
    ...
  }

Instead, use if...else constructions:

key = ngetchx ();
if (key == KEY_LEFT)
  {
    ...
  }
else if (key == KEY_RIGHT)
  {
    ...
  }
...

The pseudo-constants really become constants if you compile only for one calculator model. For example, if you define USE_TI89 and nothing else, CALCULATOR will have the value 0, and all other pseudo-constants will be optimized into single values. Or, if you define MIN_AMS to be 200, AMS_1xx will always be false.


PSEUDO_CONST_CALC

#define PSEUDO_CONST_CALC(calc92,calc89,calc92plus,calcv200) (CALCULATOR ? ((CALCULATOR == 1) ? (calc92plus) : (calcv200)) : (calc89))

A macro to construct a pseudo-constant from calculator-based values.

PSEUDO_CONST_CALC is a macro used by PSEUDO_CONST_SCREEN and PSEUDO_CONST_KBD. Most of the time, you should not use it directly, but use these two macros instead.

It takes several values for the different calculators that GCC4TI can currently compile code for, and returns one of them based on the calculator that the program currently uses. The values must be plain positive integers up to 65535 (0xFFFF) in decimal or hexadecimal notation, otherwise this macro may fail in some cases.

Uses of this macro may be optimized by defining OPTIMIZE_CALC_CONSTS.

See also: PSEUDO_CONST_SCREEN, PSEUDO_CONST_KBD


PSEUDO_CONST_KBD

#define PSEUDO_CONST_KBD(kbd89,kbd92) PSEUDO_CONST_CALC(kbd92, kbd89, kbd92, kbd92)

A macro to construct a pseudo-constant from keyboard-based values.

PSEUDO_CONST_KBD takes several values for different keyboard layouts, and returns one of them based on the keyboard that the program currently uses. The values must be plain positive integers up to 65535 (0xFFFF) in decimal or hexadecimal notation, otherwise this macro may fail in some cases.

Currently, there are two different keyboard layouts: The TI-89 keyboard, which looks like a normal calculator keyboard with extra keys, and the TI-92/TI-92+/V200 keyboard, which has a QWERTY layout. The two parameters specify the values to use whichever keyboard layout is encountered, which means that the number of parameters may increase as new hardware becomes available. If you want to use this macro in your application, you must decide for yourself whether this feature is desirable: On the one hand, it can prevent your code from being compiled in future releases of GCC4TI; on the other hand, you can easily port your programs to new hardware just by fixing all of the compile-time errors.

See also: PSEUDO_CONST_CALC, PSEUDO_CONST_SCREEN


PSEUDO_CONST_SCREEN

#define PSEUDO_CONST_SCREEN(screen89,screen92) PSEUDO_CONST_CALC(screen92, screen89, screen92, screen92)

A macro to construct a pseudo-constant from screen-based values.

PSEUDO_CONST_SCREEN takes several values for different types of screens, and returns one of them based on the screen that the program currently uses. The values must be plain positive integers up to 65535 (0xFFFF) in decimal or hexadecimal notation, otherwise this macro may fail in some cases.

Currently, there are two types of screens: The TI-89 LCD with a size of 160x100 pixels, and the TI-92/TI-92+/V200 LCD with a size of 240x128 pixels. The two parameters specify the values to use whichever screen type is encountered, which means that the number of parameters may increase as new hardware becomes available. If you want to use this macro in your application, you must decide for yourself whether this feature is desirable: On the one hand, it can prevent your code from being compiled in future releases of GCC4TI; on the other hand, you can easily port your programs to new hardware just by fixing all of the compile-time errors.

See also: PSEUDO_CONST_CALC, PSEUDO_CONST_KBD


AMS_1xx

TRUE on AMS 1.xx, FALSE on AMS 2.xx and AMS 3.xx.

This pseudo-constant is in fact defined globally, in default.h.


AMS_2xx

TRUE on AMS 2.xx, FALSE on AMS 1.xx and AMS 3.xx.

This pseudo-constant is in fact defined globally, in default.h.


AMS_3xx

TRUE on AMS 3.xx, FALSE on AMS 1.xx and AMS 2.xx.

This pseudo-constant is in fact defined globally, in default.h.


CALCULATOR

Describes the calculator model.

This pseudo-constant is 0 on the TI-89, 1 on the TI-92 Plus, and 3 on the V200.


HW_VERSION

Describes the hardware version.

This pseudo-constant is 1 on a HW1 calculator and 2 on a HW2 calculator. It reads the value of the gateArray field in the HARDWARE_PARM_BLOCK structure returned by FL_getHardwareParmBlock.


KEY_DIAMOND

#define KEY_DIAMOND (PSEUDO_CONST_KBD (16384, 8192))

The number added to the key code if the Diamond key is pressed with it (see ngetchx).


KEY_DOWN

#define KEY_DOWN (PSEUDO_CONST_KBD (340, 344))

Key code for the down arrow key (see ngetchx).


KEY_DOWNLEFT

#define KEY_DOWNLEFT (PSEUDO_CONST_KBD (342, 345))

Key code for simultaneous pressing of the down and left arrow keys (see ngetchx).


KEY_LEFT

#define KEY_LEFT (PSEUDO_CONST_KBD (338, 337))

Key code for the left arrow key (see ngetchx).


KEY_OFF2

#define KEY_OFF2 (PSEUDO_CONST_KBD (16651, 8459))

The key code for Diamond+ON (see ngetchx).


KEY_RIGHT

#define KEY_RIGHT (PSEUDO_CONST_KBD (344, 340))

Key code for the right arrow key (see ngetchx).


KEY_SHIFT

#define KEY_SHIFT (PSEUDO_CONST_KBD (8192, 16384))

The number added to the key code if the Shift key is pressed with it (see ngetchx).


KEY_UP

#define KEY_UP (PSEUDO_CONST_KBD (337, 338))

Key code for the up arrow key (see ngetchx).


KEY_UPRIGHT

#define KEY_UPRIGHT (PSEUDO_CONST_KBD (345, 342))

Key code for simultaneous pressing on up and right arrow keys (see ngetchx).


LCD_HEIGHT

#define LCD_HEIGHT (PSEUDO_CONST_SCREEN (100, 128))

Height of the screen in pixels.

This value is 100 on the TI-89, and 128 on the TI-92 Plus and V200.


LCD_LINE_BYTES

#define LCD_LINE_BYTES (PSEUDO_CONST_SCREEN (20, 30))

Number of bytes in the visible part of a screen line.

This value is 20 on the TI-89, and 30 on the TI-92 Plus and V200.


LCD_WIDTH

#define LCD_WIDTH (PSEUDO_CONST_SCREEN (160, 240))

Width of the screen in pixels.

This value is 160 on the TI-89, and 240 on the TI-92 Plus and V200.


ROM_base

Base address of the ROM (0x200000 on TI-89 or V200, 0x400000 on TI-92 Plus, 0x800000 on TI-89 Titanium).


RR_0

#define RR_0 (PSEUDO_CONST_KBD (4, 9)), (PSEUDO_CONST_KBD (0, 5))

A pseudo-constant pair for the '0' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_1

#define RR_1 (PSEUDO_CONST_KBD (4, 1)), (PSEUDO_CONST_KBD (1, 5))

A pseudo-constant pair for the '1' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_2

#define RR_2 (PSEUDO_CONST_KBD (3, 1)), (PSEUDO_CONST_KBD (1, 6))

A pseudo-constant pair for the '2' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_3

#define RR_3 (PSEUDO_CONST_KBD (2, 1)), (PSEUDO_CONST_KBD (1, 7))

A pseudo-constant pair for the '3' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_4

#define RR_4 (PSEUDO_CONST_KBD (4, 2)), (PSEUDO_CONST_KBD (2, 5))

A pseudo-constant pair for the '4' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_5

#define RR_5 (PSEUDO_CONST_KBD (3, 2)), (PSEUDO_CONST_KBD (2, 6))

A pseudo-constant pair for the '5' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_6

#define RR_6 2, (PSEUDO_CONST_KBD (2, 7))

A pseudo-constant pair for the '6' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_7

#define RR_7 (PSEUDO_CONST_KBD (4, 3)), (PSEUDO_CONST_KBD (3, 5))

A pseudo-constant pair for the '7' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_8

#define RR_8 3, (PSEUDO_CONST_KBD (3, 6))

A pseudo-constant pair for the '8' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_9

#define RR_9 (PSEUDO_CONST_KBD (2, 3)), (PSEUDO_CONST_KBD (3, 7))

A pseudo-constant pair for the '9' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_2ND

#define RR_2ND 0, (PSEUDO_CONST_KBD (4, 0))

A pseudo-constant pair for the '2nd' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_A

#define RR_A (PSEUDO_CONST_KBD (RR_NO_KEY, 9)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'A' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_ALPHA

#define RR_ALPHA (PSEUDO_CONST_KBD (0, RR_NO_KEY)), (PSEUDO_CONST_KBD (7, RR_NO_KEY))

A pseudo-constant pair for the Alpha key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_APPS

#define RR_APPS (PSEUDO_CONST_KBD (5, 7)), (PSEUDO_CONST_KBD (0, 6))

A pseudo-constant pair for the 'APPS' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_B

#define RR_B (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'B' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_BCKSPC

#define RR_BCKSPC (PSEUDO_CONST_KBD (2, 8)), (PSEUDO_CONST_KBD (6, 0))

A pseudo-constant pair for the backspace key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_C

#define RR_C (PSEUDO_CONST_KBD (RR_NO_KEY, 3)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'C' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_CATALOG

#define RR_CATALOG (PSEUDO_CONST_KBD (3, RR_NO_KEY)), (PSEUDO_CONST_KBD (6, RR_NO_KEY))

A pseudo-constant pair for the 'CATALOG' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_CLEAR

#define RR_CLEAR (PSEUDO_CONST_KBD (1, 7)), (PSEUDO_CONST_KBD (6, 5))

A pseudo-constant pair for the 'CLEAR' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_COMMA

#define RR_COMMA (PSEUDO_CONST_KBD (2, 4)), (PSEUDO_CONST_KBD (4, 7))

A pseudo-constant pair for the ',' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_COS

#define RR_COS (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 6))

A pseudo-constant pair for the 'COS' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_D

#define RR_D (PSEUDO_CONST_KBD (RR_NO_KEY, 2)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'D' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_DIAMOND

#define RR_DIAMOND 0, (PSEUDO_CONST_KBD (6, 1))

A pseudo-constant pair for the Diamond key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_DIVIDE

#define RR_DIVIDE (PSEUDO_CONST_KBD (1, 5)), (PSEUDO_CONST_KBD (4, 0))

A pseudo-constant pair for the '/' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_DOT

#define RR_DOT (PSEUDO_CONST_KBD (3, 9)), (PSEUDO_CONST_KBD (0, 6))

A pseudo-constant pair for the '.' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_DOWN

#define RR_DOWN 0, (PSEUDO_CONST_KBD (2, 7))

A pseudo-constant pair for the down arrow key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_E

#define RR_E (PSEUDO_CONST_KBD (RR_NO_KEY, 2)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'E' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_EE

#define RR_EE (PSEUDO_CONST_KBD (5, RR_NO_KEY)), (PSEUDO_CONST_KBD (2, RR_NO_KEY))

A pseudo-constant pair for the 'EE' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_ENTER1

#define RR_ENTER1 (PSEUDO_CONST_KBD (1, 9)), (PSEUDO_CONST_KBD (0, 1))

A pseudo-constant pair for the first 'ENTER' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_ENTER2

#define RR_ENTER2 (PSEUDO_CONST_KBD (1, 6)), (PSEUDO_CONST_KBD (0, 6))

A pseudo-constant pair for the second 'ENTER' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_ENTER

#define RR_ENTER RR_ENTER1

A pseudo-constant pair for the 'ENTER' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_EQUALS

#define RR_EQUALS (PSEUDO_CONST_KBD (5, 7)), (PSEUDO_CONST_KBD (4, 0))

A pseudo-constant pair for the '=' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_ESC

#define RR_ESC (PSEUDO_CONST_KBD (6, 8)), (PSEUDO_CONST_KBD (0, 6))

A pseudo-constant pair for the 'ESC' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F1

#define RR_F1 (PSEUDO_CONST_KBD (5, 6)), (PSEUDO_CONST_KBD (7, 4))

A pseudo-constant pair for the 'F1' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F2

#define RR_F2 4, (PSEUDO_CONST_KBD (7, 4))

A pseudo-constant pair for the 'F2' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F3

#define RR_F3 (PSEUDO_CONST_KBD (3, 2)), (PSEUDO_CONST_KBD (7, 4))

A pseudo-constant pair for the 'F3' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F4

#define RR_F4 (PSEUDO_CONST_KBD (2, 9)), (PSEUDO_CONST_KBD (7, 4))

A pseudo-constant pair for the 'F4' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F5

#define RR_F5 (PSEUDO_CONST_KBD (1, 7)), (PSEUDO_CONST_KBD (7, 4))

A pseudo-constant pair for the 'F5' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F6

#define RR_F6 (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 4))

A pseudo-constant pair for the 'F6' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F7

#define RR_F7 (PSEUDO_CONST_KBD (RR_NO_KEY, 3)), (PSEUDO_CONST_KBD (RR_NO_KEY, 4))

A pseudo-constant pair for the 'F7' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F8

#define RR_F8 (PSEUDO_CONST_KBD (RR_NO_KEY, 1)), (PSEUDO_CONST_KBD (RR_NO_KEY, 4))

A pseudo-constant pair for the 'F8' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_F

#define RR_F (PSEUDO_CONST_KBD (RR_NO_KEY, 3)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'F' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_G

#define RR_G (PSEUDO_CONST_KBD (RR_NO_KEY, 4)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'G' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_H

#define RR_H (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'H' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_HAND

#define RR_HAND (PSEUDO_CONST_KBD (RR_NO_KEY, 0)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the Hand key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_HOME

#define RR_HOME (PSEUDO_CONST_KBD (5, RR_NO_KEY)), (PSEUDO_CONST_KBD (6, RR_NO_KEY))

A pseudo-constant pair for the 'HOME' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_I

#define RR_I (PSEUDO_CONST_KBD (RR_NO_KEY, 7)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'I' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_J

#define RR_J (PSEUDO_CONST_KBD (RR_NO_KEY, 6)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'J' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_K

#define RR_K (PSEUDO_CONST_KBD (RR_NO_KEY, 7)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'K' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_L

#define RR_L (PSEUDO_CONST_KBD (RR_NO_KEY, 8)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'L' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_LEFT

#define RR_LEFT 0, (PSEUDO_CONST_KBD (1, 4))

A pseudo-constant pair for the left arrow key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_LN

#define RR_LN (PSEUDO_CONST_KBD (RR_NO_KEY, 6)), (PSEUDO_CONST_KBD (RR_NO_KEY, 5))

A pseudo-constant pair for the 'LN' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_M

#define RR_M (PSEUDO_CONST_KBD (RR_NO_KEY, 7)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'M' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_MINUS

#define RR_MINUS (PSEUDO_CONST_KBD (1, 9)), (PSEUDO_CONST_KBD (2, 0))

A pseudo-constant pair for the '-' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_MODE

#define RR_MODE (PSEUDO_CONST_KBD (4, 8)), (PSEUDO_CONST_KBD (6, 5))

A pseudo-constant pair for the 'MODE' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_MULTIPLY

#define RR_MULTIPLY (PSEUDO_CONST_KBD (1, 7)), (PSEUDO_CONST_KBD (3, 7))

A pseudo-constant pair for the '*' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_N

#define RR_N (PSEUDO_CONST_KBD (RR_NO_KEY, 6)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'N' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_NEGATE

#define RR_NEGATE (PSEUDO_CONST_KBD (2, 9)), (PSEUDO_CONST_KBD (0, 7))

A pseudo-constant pair for the negation key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_NO_KEY

#define RR_NO_KEY 0xF

A constant which means that a specific key does not exist.

This constant is used whenever a specific key only exists on one calculator.


RR_O

#define RR_O (PSEUDO_CONST_KBD (RR_NO_KEY, 8)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'O' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_P

#define RR_P (PSEUDO_CONST_KBD (RR_NO_KEY, 6)), (PSEUDO_CONST_KBD (RR_NO_KEY, 7))

A pseudo-constant pair for the 'P' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_PAREN_CLOSE

#define RR_PAREN_CLOSE (PSEUDO_CONST_KBD (3, 4)), (PSEUDO_CONST_KBD (4, 6))

A pseudo-constant pair for the ')' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_PAREN_OPEN

#define RR_PAREN_OPEN 4, (PSEUDO_CONST_KBD (4, 5))

A pseudo-constant pair for the '(' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_PLUS

#define RR_PLUS (PSEUDO_CONST_KBD (1, 8)), (PSEUDO_CONST_KBD (1, 4))

A pseudo-constant pair for the '+' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_POWER

#define RR_POWER (PSEUDO_CONST_KBD (1, 6)), (PSEUDO_CONST_KBD (5, 0))

A pseudo-constant pair for the '^' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_Q

#define RR_Q (PSEUDO_CONST_KBD (RR_NO_KEY, 9)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'Q' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_R

#define RR_R (PSEUDO_CONST_KBD (RR_NO_KEY, 3)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'R' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_RIGHT

#define RR_RIGHT 0, (PSEUDO_CONST_KBD (3, 6))

A pseudo-constant pair for the right arrow key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_S

#define RR_S (PSEUDO_CONST_KBD (RR_NO_KEY, 1)), (PSEUDO_CONST_KBD (RR_NO_KEY, 2))

A pseudo-constant pair for the 'S' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_SHIFT

#define RR_SHIFT 0, (PSEUDO_CONST_KBD (5, 2))

A pseudo-constant pair for the Shift key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_SIN

#define RR_SIN (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 5))

A pseudo-constant pair for the 'SIN' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_SPACE

#define RR_SPACE (PSEUDO_CONST_KBD (RR_NO_KEY, 4)), (PSEUDO_CONST_KBD (RR_NO_KEY, 0))

A pseudo-constant pair for the space key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_STORE

#define RR_STORE (PSEUDO_CONST_KBD (5, 3)), (PSEUDO_CONST_KBD (1, 0))

A pseudo-constant pair for the Store key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_T

#define RR_T (PSEUDO_CONST_KBD (2, 4)), (PSEUDO_CONST_KBD (5, 3))

A pseudo-constant pair for the 'T' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_TAN

#define RR_TAN (PSEUDO_CONST_KBD (RR_NO_KEY, 5)), (PSEUDO_CONST_KBD (RR_NO_KEY, 7))

A pseudo-constant pair for the 'TAN' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_THETA

#define RR_THETA (PSEUDO_CONST_KBD (RR_NO_KEY, 8)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'q' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_U

#define RR_U (PSEUDO_CONST_KBD (RR_NO_KEY, 6)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'U' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_UP

#define RR_UP 0, (PSEUDO_CONST_KBD (0, 5))

A pseudo-constant pair for the up arrow key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_V

#define RR_V (PSEUDO_CONST_KBD (RR_NO_KEY, 4)), (PSEUDO_CONST_KBD (RR_NO_KEY, 1))

A pseudo-constant pair for the 'V' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_W

#define RR_W (PSEUDO_CONST_KBD (RR_NO_KEY, 1)), (PSEUDO_CONST_KBD (RR_NO_KEY, 3))

A pseudo-constant pair for the 'W' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_WITH

#define RR_WITH (PSEUDO_CONST_KBD (5, RR_NO_KEY)), (PSEUDO_CONST_KBD (3, RR_NO_KEY))

A pseudo-constant pair for the '|' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_X

#define RR_X (PSEUDO_CONST_KBD (5, 2)), (PSEUDO_CONST_KBD (5, 1))

A pseudo-constant pair for the 'X' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_Y

#define RR_Y (PSEUDO_CONST_KBD (4, 5)), (PSEUDO_CONST_KBD (5, 3))

A pseudo-constant pair for the 'Y' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


RR_Z

#define RR_Z (PSEUDO_CONST_KBD (3, 1)), (PSEUDO_CONST_KBD (5, 1))

A pseudo-constant pair for the 'Z' key.

This pseudo-constant pair defines the location of a specific key in the keyboard matrix used in _keytest.


TI89_CLASSIC

#define TI89_CLASSIC (TI89 && HW_VERSION<3)

TRUE on a classic TI-89 (i.e. a TI-89 which is not a TI-89 Titanium), FALSE otherwise.

See also: TI89


TI89_TITANIUM

#define TI89_TITANIUM (TI89 && HW_VERSION>=3)

TRUE on a TI-89 Titanium, FALSE otherwise.

See also: TI89


TI89

#define TI89 (CALCULATOR == 0)

TRUE on a TI-89, FALSE otherwise.

See also: TI89_CLASSIC, TI89_TITANIUM


TI92PLUS

#define TI92PLUS (CALCULATOR == 1)

TRUE on TI-92 Plus, FALSE otherwise.


TIOS_entries

Number of entries in the TIOS jump table.

This pseudo-constant may also be used to determine the AMS version:

684 0x2AC AMS 1.00 (TI-92 Plus only)
972 0x3CC AMS 1.01 (or 1.00 for TI-89), AMS 1.05
1288 0x508 AMS 2.01
1463 0x5B7 AMS 2.02, AMS 2.03
1506 0x5E2 AMS 2.04
1519 0x5EF AMS 2.05
1543 0x607 AMS 2.06 (internal beta), 2.07, 2.08, 2.09
1544 0x608 AMS 3.00, 3.01

It is, in fact, defined globally, in default.h.

You can precisely determine the AMS version using ReleaseVersion.


V200

#define V200 (CALCULATOR == 3)

TRUE on V200, FALSE otherwise.


Return to the main index