<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


KMODE Search:

In Built-in Variables in TurboForth Kernal

Word Name: KMODE
Type: Standard word
Data Stack Signature: -- address
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Pushes the address of the keyboard scan mode variable.

Example:

$0500 KMODE ! \ sets the keyboard mode.

KMODE @ \ fetches the keyboard mode to the stack.

Comment:

Setting this mode influences the ASCII codes returned by the TI KSCAN ROM routine. Default value is 5. Valid values are:

  • $0100 - scans the left side of the keyboard
  • $0200 - scans the right side of the keyboard
  • $0300 - TI-99/4 scan mode. In this mode, lower case characters are returned as upper case characters. FCTN codes 1 thru 15 are returned. Control characters are ignored.
  • $0400 - Pascal mode. Upper and lower case characters are returned. FCTN keys return codes in the range 129 thru 143. Control characters return codes in the range 1 thru 31.
  • $0500 - BASIC mode (TurboForth default). Upper and lower case characters are returned. FCTN keys return codes from 1 thru 15. Control keys return codes from 128 thru 159 (1nd 187).

Note: TurboForth sets KMODE to $0500 (the default) whenever the command line is active.

Note: The keyboard mode should be placed in the high-byte.

See Also: JOYST  KEY  KEY? 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>