Subject: Mouse movement in Rend386

From: [email-masked]
Date: Sun, 27 Mar 1994 00:11:45 -0600 (CST)

Hi folks!
  I'm trying to write a little demo with Rend386 and I'd like to let the
user move around with the mouse (left and right turn, forward looks down,
back looks up, left button moves forward, right button moves backwards).
I'm running into a slight problem though, when the bouse coordinates
(oops, mouse, not bouse) reach their limits, all movement stops in that
direction.  Is there some way to reset the mouse driver, or assign mid-range
values to the mouse coordinates through my program?  My movement routine
works as follows:  I read the last coordinates with "mouse_last", and the
new coordinates with "mouse_read".  Based on the differences between X's
and Y's, I call the do_key routines for left, right, etc...
 
  If I'm barking up the wrong tree altogether, please let me know!  I'm
happy to take any helpful suggestions!

  Thanks!!
   -Jason Barile

---

From: [email-masked]
Date: Sun, 27 Mar 94 14:55:15 -0700

I believe v5 of R386 allows mouse movement.  You can probably get the
source for it and look at that; It may use a low-level driver - the
mouse outputs more than ax, bx and cx whenever called.

What you may want to try to do is as follows (in Turbo Pascal, my
favorite language and the only one I know interrupts in)

uses
  dos, crt;

const
  ax = <whatever mouse driver command you want to test>;

var
  regs : registers;

begin
  repeat
    regs.ax := ax;
    int (42 {I think}, regs);
    with regs do
      writeln (ax, ' ', bx, ' ', cx, ' ', {etc...});
  until keypressed;
end.

This will repeatedly send the command set in ax (like 1, 2, etc.) to
interrupt 42 (the mouse driver - I THINK!) and write out the arrays. 
(The writeln statement needs to output all the registers.)  If you have
a reference manual with your mouse or driver, it may have a
programmer's reference in back.  (My Genius mouse has one, but it's in
BASIC and assembler.  Good thing I know both of them!)

Glad to be of help,
Joshua Shagam