Difference between revisions of "83Plus:BCALLs:45CD"

From WikiTI
Jump to: navigation, search
(Comments)
(Carry flag output)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:83Plus:BCALLs:By Name:Utility|PullDownChk]] [[Category:83Plus:BCALLs:By Name|PullDownChk]] [[Category:83Plus:BCALLs:By Address|45CD - PullDownChk]]
 
[[Category:83Plus:BCALLs:By Name:Utility|PullDownChk]] [[Category:83Plus:BCALLs:By Name|PullDownChk]] [[Category:83Plus:BCALLs:By Address|45CD - PullDownChk]]
 +
{{missinfo|Destroys}}
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' PullDownChk
 
'''Official Name:''' PullDownChk
Line 11: Line 12:
  
 
=== Outputs ===
 
=== Outputs ===
* A = key press (might not be the same)
+
* Carry flag set if menu requires further keypresses.
 +
* Carry flag reset if a final keypress is returned in A (might be the same as the original keypress)
  
 
=== Registers Destroyed ===
 
=== Registers Destroyed ===
* ??
+
* unknown
  
 
=== Comments ===
 
=== Comments ===
Calling this immediately after GetKey will allow OS menus to appear during execution of your program.  The output of this routine may be an unprocessed key or it may be the result of a menu action.  For instance if a=kenter was sent to this routine while entry 2 is highlighted in the Draw menu, the output of this routine would be a=kLine.
+
Calling this immediately after [[83Plus:BCALLs:4972|GetKey]] will allow OS menus to appear during execution of your program.  The output of this routine may be an unprocessed key or it may be the result of a menu action.  For instance if a=kenter was sent to this routine while entry 2 is highlighted in the Draw menu, the output of this routine would be a=kLine.
 +
 
 +
== Examples ==
 +
getmenukeyloop:
 +
  B_CALL GetKey
 +
  B_CALL PullDownChk
 +
  jr c,getmenukeyloop ;Loop if more keypresses are needed
 +
  ;After the loop, A holds a keypress value
  
== Example ==
 
 
  ld a,kDraw
 
  ld a,kDraw
 
  B_CALL PullDownChk ;on LCD the draw menu should be visable
 
  B_CALL PullDownChk ;on LCD the draw menu should be visable

Latest revision as of 19:35, 22 December 2010

This article is missing some information (namely Destroys). You can help WikiTI by filling in the missing information.


Synopsis

Official Name: PullDownChk

BCALL Address: 45CD

Checks for and processes any keys relating to menus.

Inputs

  • A = key press

Outputs

  • Carry flag set if menu requires further keypresses.
  • Carry flag reset if a final keypress is returned in A (might be the same as the original keypress)

Registers Destroyed

  • unknown

Comments

Calling this immediately after GetKey will allow OS menus to appear during execution of your program. The output of this routine may be an unprocessed key or it may be the result of a menu action. For instance if a=kenter was sent to this routine while entry 2 is highlighted in the Draw menu, the output of this routine would be a=kLine.

Examples

getmenukeyloop:
 B_CALL GetKey
 B_CALL PullDownChk
 jr c,getmenukeyloop ;Loop if more keypresses are needed
 ;After the loop, A holds a keypress value
ld a,kDraw
B_CALL PullDownChk ;on LCD the draw menu should be visable
ld a,kDown
B_CALL PullDownChk ;cursor should move from entry 1 to entry 2
ld a,kEnter
B_CALL PullDownChk ;output of routine should be kLine