title    subroutine mouse(m1,m2,m3,m4)
;interface routine for the mouse driver
code     segment    'code'
         assume     cs:code
         public     mouse
mouse    proc       far
         push       bp
         mov        bp,sp
         push       di
         push       si
         mov        es,[bp+20]   ;segment address
         mov        di,[bp+18]   ;offset of 1st param
         mov        ax,es:[di]   ;mouse function number
         mov        di,[bp+14]
         mov        bx,es:[di]   ;2nd parameter
         mov        si,[bp+10]
         mov        cx,es:[si]   ;3rd parameter
         mov        di,[bp+6]
         mov        dx,es:[di]   ;4th parameter
         int        33h          ;mouse interrupt
;return exit conditions from interrupt to calling program
         mov        es:[di],dx   ;4th parameter
         mov        es:[si],cx   ;3rd parameter
         mov        di,[bp+14]
         mov        es:[di],bx   ;2nd parameter
         mov        di,[bp+18]
         mov        es:[di],ax   ;1st parameter
         pop        si
         pop        di
         mov        sp,bp
         pop        bp
         ret        10h
mouse    endp
code     ends
         end
