83Plus:BCALLs:4D65
From WikiTI
Revision as of 20:26, 29 March 2005 by FloppusMaximus (Talk | contribs)
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