83Plus:Software:usb8x/Asm Interface/Mouse/MouseGetKey

From WikiTI
Revision as of 18:54, 22 February 2010 by Sircmpwn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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