RS-232 Mouse Driver
.***.* ••••••• * ••••••••• **
STRATEGY ENTRY POINT
* •••• ** •• *.***** ••• ***.*
.••••• *••• ** •••••••• ** ••
INTERRUPT ENTRY POINT
.* ••• *.*.* •• **.* •••• *.**
OEV_INTERRUPT PROC FAR
ES:OI.
Set
ISR Ev.nt
r.cord data type to 18 bit
r e 1 at
i
ve mo t ion .
Get
vector number of mou •• ••
POlO.
Set ES:O to driver
h••
der.
;Select
ISR function.
;We're palling this on to
the
INPUT driv.r.
; Inte rruptl
ar • • uppo ••
d
to
be
off.
;Turn interrupt.
back
on now.
;S&t
up our
local
stack
;Stack legment
1s ,ame .. code
(CS)
;Re-enable interrupti
;Convert
command into
jump table offset.
;D1Iable interrupts while we're m.ssing with stack.
;Store existing stack environment.
END OF RESIDENT COOE
* ••••••••••••••••••••••••
INITIALIZATION CODE
•••••••
* ••••••••••••••• " ••
ES: [01] .RH STATUS, MASK ERROR
;Set
.rror flag
in
return Itatul word.
ES:[OI].RH:=STATUS, MSD_UNKNCAJlN_CMO
;Set
error code.
DI,CS
OS,OI
FROM REQUEST HEADER
OI,DWORD PTR REO HOR OFF
;Move addrell of
request
header into
:t:
~~6 [~~tTRH_O«)
_CooE
:~: ~
f
~ ~~~~~g~Y ~ ~e: ~
0:
n
~~ ~~~
nd
by
t
e.
BAD
cM15
AL ,~SO REM MED IA
BAO_Cto«)
-
MeV
S I ,OF F SE T STACK._PTR
MeV
!~I~.SP
ADD
MOV
(sf] .ss
MeV
SP,OFFSET
cs:
STACK_ TOP
MeV
AX ,CS
MeV
SS ,AX
STI
; FETCH COMMAND
LES
MeV
CMP
JB
CMP
JA
CBW
SHL
AX,l
MeV
BX, AX
JMP
C~_TABLE(BX]
;Oispatch to
requested
function.
; EXIT POINT FOR BAD OR UNSUPPORTED FUNCTIONS
; SAVE MACHINE STATE
PUSHF
CLD
PUSHA
MOV
MeV
.••••• ** ••• **.* •••• *** ••
p~~~
••••••••••••••••••••
.*.**.****** ••• * ••• **.** ••••• *** •••••• *•••••• *,,*,,***** •• *.**.*.".***.***.
~
*
MS-DOS DR IVER CODE
•
:**.*.*****.************* •• ********.*** •••• *.****************.***.*******
BAD CMD:
UNSUP POR T_ CMD :
OR
OR
INIT _CODE
; SET UP lOCAL STACK
ClI
;COMMON EXIT POINT
EXIT:
OR
ES:[OI].RH_STATUS, MASK DONE
;Set
return Itatul
to don •.
POPA
; Res tor ere
9
is
t
e
r
S .
:~~F
;::;~~~et~1~~~6os.
OEV STRATEGY PROC FAR
-
MeV
CS : REO HDR OFF, 8X
MeV
CS: REO:=I-iDR=:SEG. ES
RET
DEV_STRATEGY ENOP
;Cr.at. mo t ion ISR event
r.c
0
rd
0248
86 41
MeV
OH.T_REL16
0240
2E
SA 16 0151
R
MeV
OL. PGIO_VECT_NUM
0252
8C C8
MeV
AX.CS
0254
40
INC
AX
0255
SE CO
MeV
ES,AX
0257
84 00
MeV
AH, F ISR
0259
80 002A
MeV
BP, V:=SINPUT
025C
FA
CLI
0250
CO 6F
INT
HP_ENTRY
025F
F8
STI
; RESTORE MACHINE STATE AND EXIT
0260
07
MSI_S:
POP
ES
0261
IF
POP
OS
0262
61
POPA
0263
90
POPF
0264
CF
IRET
PAGE
0265
0265
2E
89
IE
0050
026A
2E:
8C
06
0052
026F
C8
0270
0270
02"10
9C
0271
FC
0272
60
0273
8C CF
0275
8E
DF
0277
2E:
C4 3E OOSO
027C
26 :
8A 45 02
0280
3C 00
0282
72 DE
0284
3C OF
0286
77 OA
0288
9!!
0289
01 EO
028B
88 08
0280
2£:
FF A7 0152 R
0292
0292
0292
26 .
81 4D 03 8000
0298
26.
81 40 03 0003
029E
26
81 40 03 0100
02A4
61
02A5
9D
02A6
CB
02Al
02A
7
FA
02A8
BE 0124 R
02AB
89
24
C2AD
83 CEl 02
0280
8C 14
0282
BC 0511 R
0285
8C C8
0287
8E
DO
0289
FB
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
6Cl
602
603
604
1'05
606
607
6G8
609
610
611
612
613
614
615
616
617
618
619
620
621
5~2
623
624
625
62&
627
528
629
630
631
€ 32
633
634
635
6 j6
--37
638
639
640
641
642
64
j
644
645
646
647
643
649
650
651
652
653
654
~
55
468
Driver Writer's Guide
Need help?
Do you have a question about the Vectra and is the answer not in the manual?
Questions and answers