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

From WikiTI
Jump to navigationJump to search
m 83Plus:Software:usb8x/Asm Interface/MouseGetKey moved to 83Plus:Software:usb8x/Asm Interface/Mouse/MouseGetKey
Sircmpwn (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 23: Line 23:
       U_CALL DriverInit        ;Initialize USB driver
       U_CALL DriverInit        ;Initialize USB driver
       ld    b,1
       ld    b,1
       ld    hl,CDBuf
       ld    de,CDBuf
       U_CALL MouseInit        ;Initialize mouse driver
       U_CALL MouseInit        ;Initialize mouse driver
       jp    c,USBInfoError
       jp    c,USBInfoError
Line 29: Line 29:


== See Also ==
== See Also ==
* [[../MouseInit|MouseInit]] - Initialize mouse driver
* [[83Plus:Software:usb8x/Asm_Interface/Mouse/MouseInit|MouseInit]] - Initialize mouse driver

Latest revision as of 02:54, 23 February 2010

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     de,CDBuf
       U_CALL MouseInit         ;Initialize mouse driver
       jp     c,USBInfoError
       U_CALL MouseGetKey       ;Get mouse movement/button presses

See Also