home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 7972 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.7 KB

  1. Path: sparky!uunet!news.tek.com!vice!bobbe
  2. From: bobbe@vice.ICO.TEK.COM (Robert Beauchaine)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Mouse
  5. Keywords: 256 mouse
  6. Message-ID: <11088@vice.ICO.TEK.COM>
  7. Date: 8 Jan 93 20:02:03 GMT
  8. References: <1993Jan8.103345.3048@ms.uky.edu>
  9. Organization: Tektronix, Inc., Beaverton,  OR.
  10. Lines: 57
  11.  
  12. In article <1993Jan8.103345.3048@ms.uky.edu> carld@ms.uky.edu (Carl Lafferty) writes:
  13. >I am having a problem getting a mouse driver implemented in turbo pascal
  14. >6.0 to do a 256 color mouse cursor.  What I have done is create a 
  15. >mouse event handler and placed it in line with the mouse using int 33h
  16. >sub function $0C.  I am using mode $13 for graphics and my normal mouse
  17. >cursor stuff works fine but I can NOT get a driver to even be called
  18. >that I install like this.  I have resorted to having the driver simply 
  19. >ser a variable and latching on the timer ISR.  
  20.  
  21.   I don't see anything necessarily wrong with what you're doing
  22.   except the part where you say you want your routine to draw the
  23.   mouse cursor.  That's a job better left to the mouse driver, which
  24.   may be your problem.  Some quick questions:
  25.  
  26.   1.  Are you setting the position changed bit in the event mask
  27.   when you call function 0C?  This determines what mouse events will
  28.   generate a call to your function.
  29.  
  30.   2.  Is your function an interrupt handler?  It should *not* be,
  31.   but many people make the mistake of declaring it so.  It *should*
  32.   be a normal far function that modifies no registers and calls no
  33.   DOS or BIOS functions.
  34.  
  35.   3.  If your function is of the correct type, are you setting the
  36.   DS registers appropriately?  Your service routine will be called
  37.   not with your program's data segment, but with that of the mouse
  38.   driver when your function is called.
  39.  
  40.   I have a (almost) complete mouse unit that may be of help to you.
  41.   The one problem I've had (and to date no one answered my request
  42.   for information) is missed mouse events when running under
  43.   graphics using .BGI functions. 
  44.  
  45.  
  46. >
  47. >What I want to do is watch for the mouse to be moved and when it is moved
  48. >use my routine to draw the mouse pointer.  I could be doing this the 
  49. >hardest way possible but it is the one that makes sense to me right
  50. >now.  I am open to suggestions.
  51. >
  52. >Any and all help will be appreciated.
  53. >
  54. >Carl Lafferty
  55.  
  56.  
  57. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ 
  58.  
  59. Bob Beauchaine bobbe@vice.ICO.TEK.COM 
  60.  
  61. "Look, I tried the cat experiment.  On the third trial, the cat was
  62. dead.  On each of the subsequent 413 trials, it remained dead.  Am I
  63. doing something wrong?"
  64.             James Nicoll
  65.  
  66. Q.  How many Heisenbergs does it take to screw in a light bulb?
  67. A.  If you know the number, you don't know where the light bulb is!
  68.  
  69.