Difference between revisions of "83Plus:Software:usb8x/Asm Interface/Mouse/MouseGetKey"

From WikiTI
Jump to: navigation, search
 
m
Line 27: Line 27:
 
       jp    c,USBInfoError
 
       jp    c,USBInfoError
 
       U_CALL MouseGetKey      ;Get mouse movement/button presses</nowiki>
 
       U_CALL MouseGetKey      ;Get mouse movement/button presses</nowiki>
 
  
 
== See Also ==
 
== See Also ==
 
* [[../MouseInit|MouseInit]] - Initialize mouse driver
 
* [[../MouseInit|MouseInit]] - Initialize mouse driver

Revision as of 16:37, 16 July 2006

Synopsis

Name: MouseGetKey

Minimum usb8x version: 0.08

Gets mouse movement and button press information

Inputs

None

Outputs

  • B: Buttons pressed
  • C: Directional movement

Destroys

  • AF, DE, HL, IX

Notes

Make sure the mouse driver has been successfully initialized before calling this routine.

Example

       ld     hl,DriverBuf
       U_CALL DriverInit        ;Initialize USB driver
       ld     b,1
       ld     hl,CDBuf
       U_CALL MouseInit         ;Initialize mouse driver
       jp     c,USBInfoError
       U_CALL MouseGetKey       ;Get mouse movement/button presses

See Also

  • [[../MouseInit|MouseInit]] - Initialize mouse driver