Difference between revisions of "83Plus:BCALLs:4D65"

From WikiTI
Jump to: navigation, search
(Create AppUpdateMouse)
 
m (Added categories)
Line 1: Line 1:
 +
[[Category:83Plus:BCALLs:By Name:Display|AppUpdateMouse]]
 +
[[Category:83Plus:BCALLs:By Name|AppUpdateMouse]]
 +
[[Category:83Plus:BCALLs:By Address|4D65 - AppUpdateMouse]]
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' AppUpdateMouse
 
'''Official Name:''' AppUpdateMouse

Revision as of 21:40, 27 March 2005

Synopsis

Official Name: AppUpdateMouse

BCALL Address: 4D65

Update the mouse cursor on the screen based on previous key press, and wait for another key press.

Inputs

  • Memory as set up by AppStartMouse

Outputs

  • A: 0Ah if arrow key pressed, 0Ch if enter key pressed
  • 986D: Current mouse cursor coordinates
  • Mouse cursor updated on screen based on keypress during previous AppUpdateMouse or AppStartMouse

Destroys

  • BC, DE, HL

Comments

You must call AppStartMouse to initialize memory before calling AppUpdateMouse. AppUpdateMouse will wait for a keypress, but will only return when an arrow key, or the enter key, is pressed. If an arrow key is pressed, the mouse cursor coordinates will be automatically updated. The below example allows a user to move the mouse cursor around the screen, and returns once the enter key is pressed.

Example

 B_CALL AppStartMouse
MouseLoop:
 cp 0Ch
 ret z
 B_CALL AppUpdateMouse
 jr MouseLoop