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

From WikiTI
Jump to: navigation, search
m
 
(Added special behavior discovered by me: B register is destroyed sometimes)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
[[Category:83Plus:BCALLs:By_Name:Input|GetKey]] [[Category:83Plus:BCALLs:By_Name|GetKey]] [[Category:83Plus:BCALLs:By_Address|4972 - GetKey]]
 
+
Use this template for ROMCalls on calculators that don't use banked OS calls. Simply replace every occurance of bcall/BCALL/b_call with romcall/ROMCall/call.
+
 
+
The BCALLs are named by their b_call address, in hexadecimal. An example is [[83Plus:BCALLs:4009]].
+
 
+
Also, please put the following code (edited to reflect your call) in your page:
+
NaodW29-nowikie5367714ce60c1f00000001
+
This will cause your page to show in the appropriate categories. (Change the ProveTheRiemannHypothesis, 0042, and Utility to match your call. Also, change the 83Plus to whatever category, and change the BCALLs to ROMCalls if needed.) You may put a BCALL in any number of "By Name" categories. Put it in all the ones that make sense.
+
 
+
----
+
 
+
 
== Synopsis ==
 
== Synopsis ==
'''Official Name:''' ProveTheRiemannHypothesis
+
'''Official Name:''' GetKey
  
'''BCALL Address:''' 0042
+
'''BCALL Address:''' 4972h
''Use "Call Address" for regular 83.''
+
  
Proves the Riemann Hypothesis, storing the proof in an AppVar.
+
The standard key input routine.
  
 
=== Inputs ===
 
=== Inputs ===
* [[83Plus:RAM:8478|OP1]]: AppVar to save proof into
+
* bit [[83Plus:Flags:24#Bit_3|lwrCaseActive, (iy+appLwrCaseFlag)]] set to enable lowercase entry
* HL: Maximum length of proof, in pages (must be at least 200)
+
* bit [[83Plus:Flags:28#Bit_7|7, (iy+28h)]] set to disable the usual action of 2nd+Off
* bit proofCorrect, (iy + proofFlags): Set to generate a correct proof
+
* [[83Plus:Flags:12|(iy+shiftFlags)]] contains shift settings
  
 
=== Outputs ===
 
=== Outputs ===
* Proof stored in AppVar
+
* A = keycode
* Zero Flag: Set if successful
+
* [[83Plus:RAM:8446|(keyExtend)]] = extended keycode
 +
* 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
  
 
=== Destroys ===
 
=== Destroys ===
* af
+
* DE, HL
 +
* B, in some cases (mostly when some ''2nd'' key combination is pressed; needs further testing to determine the exact circumstances)
  
 
== Comments ==
 
== Comments ==
This B_CALL proves the Riemann Hypothesis, giving a proof under the required number of pages. It does this by randomly guessing proofs until it finds one that works. Needless to say, the calculator's batteries will run out before this B_CALL completes.
+
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 [[83Plus:BCALLs:500B|GetKeyRetOff]].
  
 
== Example ==
 
== Example ==
  NaodW29-nowikie5367714ce60c1f00000002
+
  <nowiki> B_CALL GetKey
 
+
cp kPi
== Credits and Contributions ==
+
call z,Moo</nowiki>
* '''/dev/null:''' For not answering my questions about this B_CALL
+

Latest revision as of 15: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