Difference between revisions of "83Plus:BCALLs:4972"

From WikiTI
Jump to: navigation, search
m (Comments)
(Added special behavior discovered by me: B register is destroyed sometimes)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:83Plus:BCALLs:By_Name|GetKey]]
+
[[Category:83Plus:BCALLs:By_Name:Input|GetKey]] [[Category:83Plus:BCALLs:By_Name|GetKey]] [[Category:83Plus:BCALLs:By_Address|4972 - GetKey]]
[[Category:83Plus:BCALLs:By_Name:Input|GetKey]]
+
[[Category:83Plus:BCALLs:By_Address|4972 - GetKey]]
+
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' GetKey
 
'''Official Name:''' GetKey
Line 17: Line 15:
 
* A = keycode
 
* A = keycode
 
* [[83Plus:RAM:8446|(keyExtend)]] = extended keycode
 
* [[83Plus:RAM:8446|(keyExtend)]] = extended keycode
* bit [[83Plus:Flags:9#Bit_4|onInterrupt, (iy+onFlags)]] set (and A=0) if the On key was pressed
+
* bit [[83Plus:Flags:09#Bit_4|onInterrupt, (iy+onFlags)]] set (and A=0) if the On key was pressed
 
* [[83Plus:Flags:12|(iy+shiftFlags)]] contains shift settings
 
* [[83Plus:Flags:12|(iy+shiftFlags)]] contains shift settings
  
 
=== Destroys ===
 
=== Destroys ===
 
* DE, HL
 
* DE, HL
 +
* B, in some cases (mostly when some ''2nd'' key combination is pressed; needs further testing to determine the exact circumstances)
  
 
== Comments ==
 
== Comments ==

Latest revision as of 14:23, 25 November 2020

Synopsis

Official Name: GetKey

BCALL Address: 4972h

The standard key input routine.

Inputs

Outputs

Destroys

  • DE, HL
  • B, in some cases (mostly when some 2nd key combination is pressed; needs further testing to determine the exact circumstances)

Comments

This routine will wait for a key to be pressed and return it. It will handle the 2nd and Alpha keys, and the values it returns reflect this distinction.

It transparently handles the screen capture and remote control link commands, as well as (on OS 1.15 and higher) the TI-Keyboard. Other silent link commands will cause it to exit from the current app so that data can be transferred. It also handles 2nd+Off, 2nd+Up, and 2nd+Down in the expected ways.

See also GetKeyRetOff.

Example

 B_CALL GetKey
 cp kPi
 call z,Moo