Mice Reading
- Posted by Mathew Hounsell <mfh03 at UOW.EDU.AU> May 31, 1999
- 442 views
I have included my mouse code and info on mouse interrupts. This is my function for reading te mouses position... It was written some time ago. I'm not sure if it's perfect. global function get_mouse_pos() sequence reg_list, vid_inf object val val = MS_NOMOUSE if MS_INSTALLED then // If mouse was found val = repeat(0,2) // Generate return sequence reg_list = repeat(0,10) // Generate Register sequence vid_inf = video_config() // Get video info reg_list[REG_AX] = #0003 // AX = 0003h reg_list = dos_interrupt(#33,reg_list) // Interrupt if vid_inf[VC_MODE] >= 4 and vid_inf[VC_MODE] != 7 then --graphics val[1] = reg_list[REG_CX] // Prepare return result val[2] = reg_list[REG_DX] else -- text val[1] = floor(reg_list[REG_DX] / 8) + 1 //Prepeare return result val[2] = floor(reg_list[REG_CX] / 8) + 1 end if end if return val end function ------------------------- Sincerely, Mathew Hounsell mat.hounsell at excite.com