draper@cpsin1.uucp (Patrick J Draper) (07/22/90)
I'm trying to use the Dos Interrupt 33H, function 18H to set an alternate mouse handler that is written in Modula-2. I can't seem to get it to work no matter what I do. The compiler that I'm working with is FST version 2.0. (by the way, does anybody know if FST is still around? I sent them a letter a few weeks ago, but they haven't responded. I sure would hate to send off a registration check without knowing if they are still in business.) Can anybody help me out? Thanks in advance, Patrick Draper - Michigan State University -------CODE FOLLOWS------------- PROCEDURE SetAlternateMouseUserHandler (mask : BITSET; p : PROC; wspace : CARDINAL); VAR a, p2 : ADDRESS; BEGIN IF Available (wspace) THEN ALLOCATE (a, wspace); END; NEWPROCESS (p, a, wspace, p2); AX := 0018H; CX := CARDINAL (mask); DX := OFFSET (p2); Trap (33H); END SetAlternateMouseUserHandler;
Martin.Scharnke@comp.vuw.ac.nz (Martin Scharnke) (07/24/90)
In article <1990Jul22.053526.26846@msuinfo.cl.msu.edu>, draper@cpsin1.uucp (Patrick J Draper) writes: |> I'm trying to use the Dos Interrupt 33H, function 18H to set an |> alternate mouse handler that is written in Modula-2. |> Good move - I've been trying too! |> I can't seem to get it to work no matter what I do. The compiler that |> I'm working with is FST version 2.0. Nor could I using the same compiler. (2.0b) (by the way, does anybody know if |> FST is still around? I sent them a letter a few weeks ago, but they |> haven't responded. I sure would hate to send off a registration check |> without knowing if they are still in business.) |> When I registered Version 1 and got the upgrade, I got a reply after 3 months, which was explained because the address had changed. But I felt safe in registration because I sent in my draft by registered mail - I would suggest you do similar... |> Can anybody help me out? |> I'm still working on it, but if anyone else solves this with FST, please PLEASE post to this group! ============================================================================== _ || martin@comp.vuw.ac.nz ' )--,--, _/_ || Victoria University / / / __ __ / . _ || Wellington, New Zealand / / (_(_/|_/ (_(_(_/ ) || || martin@actrix.co.nz ==============================================================================
reid@CTC.CONTEL.COM (Tom Reid x4505) (07/24/90)
You might try FST's BBS at 1-(214)517-4629. That may be your fastest way to get a response from Roger.
UNIVREL@auvm.auvm.edu (07/24/90)
I have not worked with FST's compiler, but I have guess as to what is causing the trouble. You write your custom handler the same way that you write an interrupt service routine. You save all used registers on entry and restore them them on exit. However, and this is not well documented, the mouse driver calls your custom handler via a FAR CALL. Consequently, your handler CANNOT return via an IRET, but it must return via an FRET. Many M2 compilers can generate the appropriate code for an interrupt type function and they generate the appropriate standard exit code and return via an IRET; something you do not want a mouse handler to do. The solution, if your compiler supports it, is to use in-line machine code and insert it at the end of your routine. The compiler's exit code comes after your in-line code and therefore will have no effect. qquit Hope this helps. Sajjad Ahrabi Standard disclaimers apply.
Pat.Terry@p101.f4.n494.z5.fidonet.org (Pat Terry) (07/26/90)
> I can't seem to get it to work no matter what I do. The compiler that > I'm working with is FST version 2.0. (by the way, does anybody know if > FST is still around? Try mail to FST's author CARVALHO_ROGER#PLANO@comm.tandem.com -- uucp: uunet!m2xenix!puddle!5!494!4.101!Pat.Terry Internet: Pat.Terry@p101.f4.n494.z5.fidonet.org