home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / MOUSE / DATA.ASM < prev    next >
Assembly Source File  |  1995-04-14  |  27KB  |  621 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT (C) Microsoft Corporation, 1989
  4. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  5. ;
  6. ;    The following IBM OS/2 WARP source code is provided to you solely for
  7. ;    the purpose of assisting you in your development of OS/2 WARP device
  8. ;    drivers. You may use this code in accordance with the IBM License
  9. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  10. ;    Copyright statement may not be removed.;
  11. ;*****************************************************************************/
  12. ;/*************************************************************************
  13. ;*
  14. ;* SOURCE FILE NAME = DATA.ASM
  15. ;*
  16. ;* DESCRIPTIVE NAME = Mouse Device Driver Data Segment.
  17. ;*
  18. ;*
  19. ;* VERSION      V2.0
  20. ;*
  21. ;* DATE         02/29/92
  22. ;*
  23. ;* DESCRIPTION  Mouse Device Driver Data Segment.
  24. ;*
  25. ;* FUNCTIONS
  26. ;*
  27. ;*
  28. ;*
  29. ;*
  30. ;*
  31. ;* NOTES        This file contains all Mouse Device Driver
  32. ;*              Data segment.  It is the 1st module in the linker
  33. ;*              list.
  34. ;*
  35. ;*
  36. ;* STRUCTURES   NONE
  37. ;*
  38. ;* EXTERNAL REFERENCES
  39. ;*
  40. ;*              NONE
  41. ;*
  42. ;* EXTERNAL FUNCTIONS
  43. ;*
  44. ;*              NONE
  45. ;*
  46. ;* CHANGE ACTIVITY =
  47. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  48. ;*   --------  ----------  -----  --------------------------------------
  49. ;*   02/29/92              DCR 1555
  50. ;*   04/04/93              53232  Add support for Logitech middle button
  51. ;*   04/21/93              67424  Lose mouse when coming back from suspend
  52. ;*                                mode on Dell 325nc laptop.
  53. ;*   06/03/93              69671  Lose pointing stick when coming back from
  54. ;*                                suspend mode on IBM 700 series laptops.
  55. ;**************************************************************************
  56.  
  57. .386p
  58.  
  59. DSEG   SEGMENT   WORD  PUBLIC  USE16 'DATA'
  60. DSEG   ENDS
  61. _DATA  SEGMENT   WORD  PUBLIC  USE16 'DATA'
  62. _DATA  ENDS
  63. CONST  SEGMENT   WORD  PUBLIC  USE16 'CONST'
  64. CONST  ENDS
  65. _BSS   SEGMENT   WORD  PUBLIC  USE16 'BSS'
  66. _BSS   ENDS
  67. DGROUP GROUP DSEG, _DATA,CONST, _BSS
  68.  
  69.  
  70. CSEG   SEGMENT   WORD  PUBLIC  USE16 'CODE'
  71. CSEG   ENDS
  72.  
  73. _TEXT  SEGMENT   WORD  PUBLIC  USE16 'CODE'
  74. _TEXT  ENDS
  75.  
  76. CSEG2  SEGMENT   WORD  PUBLIC  USE16 'SWAPCODE'
  77. CSEG2  ENDS
  78.  
  79. CGROUP GROUP CSEG
  80.  
  81.  
  82. INCL_WINPROGRAMLIST    equ          1      ; define for pmshl.inc defines
  83. INCL_ERRORS            equ          1      ; define for pmshl.inc defines
  84. SESMGR                 equ          1      ; define for pmshl.inc defines
  85.  
  86. .xlist
  87.        include mouse.inc
  88.        include pmshl.inc
  89.        include emiidc.inc                  ; emi
  90. .list
  91.  
  92.  
  93. ;*
  94. ;* External Mouse Referneces From this Module
  95. ;*
  96.  
  97.        extrn  Strat_Entry       : NEAR
  98.  
  99.        extrn  IOMW_SM           : far
  100.        extrn  IOMW_SS           : far
  101.        extrn  IOMW_EM           : far
  102.        extrn  IOMW_TH           : far
  103.        extrn  IOMW_PS           : far
  104.        extrn  IOMW_DP           : far
  105.        extrn  IOMW_RP           : far
  106.        extrn  IOMW_SP           : far
  107.        extrn  IOMW_SD           : far
  108.        extrn  IOMW_DS           : far
  109.        extrn  IOMW_MD           : far
  110.  
  111.        extrn  IOMR_NB           : far
  112.        extrn  IOMR_MC           : far
  113.        extrn  IOMR_GS           : far
  114.        extrn  IOMR_RD           : far
  115.        extrn  IOMR_QS           : far
  116.        extrn  IOMR_GM           : far
  117.        extrn  IOMR_GF           : far
  118.        extrn  IOMR_GP           : far
  119.        extrn  IOMR_PS           : far
  120.        extrn  IOMR_TH           : far
  121.        extrn  IOMR_GV           : far
  122.        extrn  IOMR_ID           : far
  123.  
  124.        extrn  REQ_ERR           : NEAR
  125.        extrn  FLUSH             : NEAR
  126.        extrn  OPEN              : NEAR
  127.        extrn  CLOSE             : NEAR
  128.        extrn  IOCTL             : NEAR
  129.        extrn  DEINS             : NEAR
  130.        extrn  INITCOMPLETE      : NEAR       ;           
  131.        extrn  GIDC_Entry        : near
  132.        extrn  PDDCMD_Register   : near
  133.        extrn  PDDCMD_DeRegister : near
  134.        extrn  PDDCMD_QueryType  : near
  135.        extrn  Security_Hook1    : near       ;           
  136.        extrn  Security_End1     : near       ;           
  137.        extrn  Security_Hook2    : near       ;           
  138.        extrn  Security_End2     : near       ;           
  139.  
  140.  
  141. DSEG     SEGMENT
  142.  
  143. ;*
  144. ;*      CP/DOS Device Driver Header
  145. ;*
  146.  
  147. MouseHDR    LABEL   WORD
  148.             DW       -1                    ; Device header pointer
  149.             DW       -1                    ; Device header pointer
  150.             DW       DEV_IOCTL+DEV_CHAR_DEV+DEVLEV_3+DEV_30 ; DD attributes
  151.             DW       Strat_Entry           ; Strategy Routine Offset
  152.             DW       GIDC_Entry            ; Reserved
  153.             DB       'MOUSE$  '            ; Device Name
  154.             DW       0                     ; Protect-mode CS Strategy Selector
  155.             DW       0                     ; Protect-mode DS selector
  156.             DW       0                     ; Real-mode CS Strategy Segment
  157.             DW       0                     ; Real-mode DS segment
  158.             DD       DEV_16MB+DEV_INITCOMPLETE ; Can handle > 16MB physical
  159.                                            ; memory and Wants to be notified
  160.                                            ;            when all PDD's are initialized.
  161.  
  162. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  163. ;              C A L L   T A B L E  ==>  Protect Mode Functions            *
  164. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  165.  
  166. ;*      Mouse CP/DOS Request Block Command Code jump table
  167. ;*      Note: This table is only used after Initialization
  168.  
  169.  RBlk_Tbl    LABEL    WORD            ; 20 Word Label Offset Table
  170.               DW      REQ_ERR         ; Unsupported Command            0
  171.               DW      REQ_ERR         ; Unsupported Command            1
  172.               DW      REQ_ERR         ; Unsupported Command            2
  173.               DW      REQ_ERR         ; Unsupported Command            3
  174.               DW      REQ_ERR         ; Unsupported Command            4
  175.               DW      REQ_ERR         ; Unsupported Command            5
  176.               DW      REQ_ERR         ; Unsupported Command            6
  177.               DW      FLUSH           ; Input Flush Command Rtn        7
  178.               DW      REQ_ERR         ; Unsupported Command            8
  179.               DW      REQ_ERR         ; Unsupported Command            9
  180.               DW      REQ_ERR         ; Unsupported Command            A
  181.               DW      REQ_ERR         ; Unsupported Command            B
  182.               DW      REQ_ERR         ; Unsupported Command            C
  183.               DW      OPEN            ; Open Command Rtn               D
  184.               DW      CLOSE           ; Close Command Rtn              E
  185.               DW      REQ_ERR         ; Unsupported Command            F
  186.               DW      IOCTL           ; Generic IOCTL Command Rtn      10
  187.               DW      REQ_ERR         ; Unsupported Command            11
  188.               DW      REQ_ERR         ; Unsupported Command            12
  189.               DW      REQ_ERR         ; Unsupported Command            13
  190.               DW      DEINS           ; DeInstall Command Rtn          14
  191.               DW      REQ_ERR         ; Unsupported Command            15
  192.               DW      REQ_ERR         ; Unsupported Command            16
  193.               DW      REQ_ERR         ; Unsupported Command            17
  194.               DW      REQ_ERR         ; Unsupported Command            18
  195.               DW      REQ_ERR         ; Unsupported Command            19
  196.               DW      REQ_ERR         ; Unsupported Command            1A
  197.               DW      REQ_ERR         ; Unsupported Command            1B
  198.               DW      REQ_ERR         ; Unsupported Command            1C
  199.               DW      REQ_ERR         ; Undefined Command              1D
  200.               DW      REQ_ERR         ; Undefined Command              1E
  201.               DW      INITCOMPLETE    ; IniComplete Command Rtn        1F
  202.                                       ;           
  203. ;*
  204. ;*      Mouse Generic IOCtl Function jump table
  205. ;*
  206.  
  207.  Func_Tbl    LABEL    WORD            ; 22 Word Label offset table
  208.               DW      REQ_ERR         ; Function IOMW_SC, 50H removed
  209.               DW      IOMW_SM         ; Function IOMW_SM, 51H
  210.               DW      REQ_ERR         ; Function IOMW_SN, 52H removed
  211.               DW      IOMW_SS         ; Function IOMW_SS, 53H
  212.               DW      IOMW_EM         ; Function IOMW_EM, 54H
  213.               DW      IOMW_TH         ; Function IOMW_TH, 55H
  214.               DW      IOMW_PS         ; Function IOMW_PS, 56H
  215.               DW      IOMW_DP         ; Function IOMW_DP, 57H
  216.               DW      IOMW_RP         ; Function IOMW_RP, 58H
  217.               DW      IOMW_SP         ; Function IOMW_SP, 59H
  218.               DW      IOMW_SD         ; Function IOMW_SD, 5AH
  219.               DW      REQ_ERR         ; removed           5Bh
  220.               DW      IOMW_DS         ; Function IOMW_DS, 5CH
  221.               DW      IOMW_MD         ; Function IOMW_MD, 5Dh
  222.               DW      REQ_ERR         ; 5Eh - unsupported
  223.               DW      REQ_ERR         ; 5FH - unsupported
  224.               DW      IOMR_NB         ; Function IOMR_NB, 60H
  225.               DW      IOMR_MC         ; Function IOMR_MC, 61H
  226.               DW      IOMR_GS         ; Function IOMR_GS, 62H
  227.               DW      IOMR_RD         ; Function IOMR_RD, 63H
  228.               DW      IOMR_QS         ; Function IOMR_QS, 64H
  229.               DW      IOMR_GM         ; Function IOMR_GM, 65H
  230.               DW      IOMR_GF         ; Function IOMR_GF, 66H
  231.               DW      IOMR_GP         ; Function IOMR_GP, 67H
  232.               DW      IOMR_PS         ; Function IOMR_PS, 68H
  233.               DW      IOMR_TH         ; Function IOMR_TH, 69H
  234.               DW      IOMR_GV         ; Function IOMR_GV, 6Ah
  235.               DW      IOMR_ID         ; Function IOMR_ID, 6Bh
  236.  
  237. ;*
  238. ;* Mouse Generic IOCtl access table.  This table used to check access
  239. ;* to data and parameter areas for IOCtl calls.  Each supported IOCtl
  240. ;* has a 2 byte key.  The fisrt byte is the key for the parameter
  241. ;* packet and the second is for the data packet.
  242. ;* A key has the following format:
  243. ;*
  244. ;*      0 n t c l l l l   l - Indicate length of area to check (4 bits).
  245. ;*                            Can only check upto 16 bytes
  246. ;*                        c - 1 indicates access check is needed.
  247. ;*                        t - 1 for r/w, 0 for r check type
  248. ;*                        n - 1 indicates skip check if selector is NULL
  249. ;*
  250.  
  251.  AccessTbl   LABEL    byte
  252.               DB      0,0                              ; IOMW_SC, 50H
  253.               DB      READCHECK,READCHECK+NULLOK       ; IOMW_SM, 51H
  254.               DB      0,0                              ; IOMW_SN, 52H
  255.               DB      READCHECK+4,0                    ; IOMW_SS, 53H
  256.               DB      READCHECK+2,0                    ; IOMW_EM, 54H
  257.               DB      READCHECK,0                      ; IOMW_TH, 55H
  258.               DB      0,0                              ; IOMW_PS, 56H
  259.               DB      0,0                              ; IOMW_DP, 57H
  260.               DB      READCHECK+8,0                    ; IOMW_RP, 58H
  261.               DB      READCHECK+4,0                    ; IOMW_SP, 59H
  262.               DB      READCHECK+6,READCHECK+NULLOK+6   ; IOMW_SD, 5AH
  263.               DB      0,READCHECK+NULLOK               ; IOMW_RS, 5BH
  264.               DB      READCHECK+2,0                    ; IOMW_DS, 5CH
  265.               DB      0,0                              ; IOMW_MD, 5Dh
  266.               DB      0,0                              ; unused,  5Eh
  267.               DB      0,0                              ; unused,  5FH
  268.               DB      0,WRITECHECK+2                   ; IOMR_NB, 60H
  269.               DB      0,WRITECHECK+2                   ; IOMR_MC, 61H
  270.               DB      0,WRITECHECK+2                   ; IOMR_GS, 62H
  271.               DB      READCHECK+2,0                    ; IOMR_RD, 63H
  272.               DB      0,WRITECHECK+4                   ; IOMR_QS, 64H
  273.               DB      0,WRITECHECK+2                   ; IOMR_GM, 65H
  274.               DB      0,WRITECHECK+4                   ; IOMR_GF, 66H
  275.               DB      0,WRITECHECK+4                   ; IOMR_GP, 67H
  276.               DB      0,WRITECHECK+10                  ; IOMR_PS, 68H
  277.               DB      0,WRITECHECK                     ; IOMR_TH, 69H
  278.               DB      0,WRITECHECK+2                   ; IOMR_GV, 6Ah
  279.               DB      0,WRITECHECK+4                   ; IOMR_ID, 6Bh
  280.  
  281.  
  282.  
  283. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  284. ;                 V A R I A B L E S  ==>  Protect Mode                     *
  285. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  286.  
  287.                  even                 ; goto word address
  288. MSEVDDEntry      df           0       ; vdd entry point
  289.  
  290. Ctl_Sem          DD           0       ; Processing Control Semaphore
  291. Sem_Time         DD          -1       ; Forever process block/sleep time
  292. Device_Help      DD           0       ; DEVHLP Entry Point Routine Address
  293. InfoSegAddr      dd           0       ; Selector:Offset to the Local Infoseg
  294.  
  295. FgndCB           dd         SG1       ; foreground control block (start in 1)
  296.  
  297. Sem_PID          DW           0       ; Mouse DD Semaphore owner PID
  298. ShellPID         dw           0       ; shell PID
  299. CallPID          DW           0       ; Callers PID for a request
  300. SQ_Pid           DW           0       ; Pid of process starting SQ mode
  301. Eq_Length        DW   10*ElRec_Size   ; Max Total Event Queue byte size
  302. IntEntry         dw           0       ; counter to entry in process_packet
  303. StratEntry       dw           0
  304. GDT_Seg          DW           0       ; GDT Info Seg Selector
  305. DDDInit          dw           0       ; initialize flag for DDDD
  306. EMaskMax         dw       007fh       ; max allowed event mask              
  307. VDM_Flags        dw           0       ; Flags for the state of all VDMs
  308.  
  309. CurCommand       db           0       ; current command for debugging
  310. CurRequest       db           0       ; current request for debugging
  311. TypeName         db    8 dup(' '),0,0 ; device name of Dep DD
  312. STypeName        db    8 dup(' '),0,0 ; device name of Dep DD
  313. CallSessn        DB           0       ; Callers session ID
  314. FgndSessn        DB         01H       ; Foreground session ID (start in 1)
  315. DeInstall        DB         OFF       ; DeInstallation Flag = not processed
  316. Detach_Proc      DB         OFF       ; Detached Process Flag when ON
  317. SQDDName         DB  'SINGLEQ$',0     ; SQ DD ASCIIZ Name
  318. usQSize          dw           0       ; Queue size defaults to 10
  319. TypeOverRider    db        TRUE       ; User specified a TYPE= overrider
  320. SType            db       FALSE       ; User specified secondary type (STYPE)
  321. Num_Grps         DB           0       ; # of SGs Supported by Mouse DD
  322. Ptr_Overide      DB         OFF       ; SG Switch Pointer Draw Over-Ride Flag
  323. Mouse$           db    'MOUSE$',0     ; mouse device name (add even bytes)
  324. APMDDName        db    'APM$    ',0   ; APM device driver name ;           
  325. APMIDCHandle     dw           0       ; IDC Handle to communicate with APM.SYS
  326. APMIDCReg    APMIDC_REGISTER_PKT <>   ; APM IDC register packet
  327. APMIDCDereg  APMIDC_DEREGISTER_PKT <> ; APM IDC register packet
  328. Init_Time        db           0       ; Initialization routine flag
  329.  
  330. ; emi stuff
  331. EmiDDName        DB  'EMI$    ',0     ; Emi DD ASCIIZ Name              ;emi
  332. EmiFlags         db           0       ; emi flags(defined in emi.inc)   ;emi
  333. EmiMvt   MOUVARTABLE <>               ; mouse var table                 ;emi
  334. EmiSSI   SESSWITCHINFO <>             ; session info                    ;emi
  335.  
  336.  
  337.                         ; BEGIN           
  338. DD 09CBE9F9Eh           ; 1st half DD end signature for MOUSE$
  339. DD 0AFAB8BACh           ; 2nd half DD end signature for MOUSE$
  340. DD Security_Hook1       ; Used for Process_Packet security hook area start
  341. DD Security_End1        ; Used for Process_Packet security hook area end
  342. DD Security_Hook2       ; Used for Process_Absolute security hook area start
  343. DD Security_End2        ; Used for Process_Absolute security hook area end
  344. DD 0A19CBEAEh           ; 1st half DD start signature for MOUSE$
  345. DD 09E9FAB8Ch           ; 2nd half DD start signature for MOUSE$
  346.                         ; END           
  347.  
  348.  
  349.                  even
  350.  
  351. MEvent           Mon_Rec     <>       ; Current Mouse Monitor Data Record
  352. Last_Event       Mon_Rec     <>       ; Last Mouse Monitor Data Record
  353. DDD              Atch_DD     <>       ; record for attaching do dependent DD
  354. DDD2             Atch_DD     <>       ; record for attaching do 2nd DDD
  355. SQDD             Atch_DD     <>       ; SQ DD Interface Data Record
  356. APMDD            Atch_DD     <>       ; APM DD Interface Data Record ;           
  357. EmiDD            Atch_DD     <>       ; EMI DD Interface Data Record      ;emi
  358. Ptr_Rec          Call_5Blk   <>       ; Ptr Draw DD multi-parm Addr struct
  359.  
  360.  
  361. ;*                                                                         ;emi
  362. ;* The SInt_Packet is filled in by the built in support or by the          ;emi
  363. ;* dependent mouse driver specified in the TYPE= config.sys parameter.     ;emi
  364. ;* The Int_Packet is used by the rest of the driver to proces the packet.  ;emi
  365. ;* They need to be independent incase EMI sends packets while the          ;emi
  366. ;* SInt_Packet is asynchronously being filled in.                          ;emi
  367. ;*
  368.  
  369. Int_Packet       Abs_Data    <>       ; Interrupt packet to process
  370. SInt_Packet      Abs_Data    <>       ; Interrupt packet to process       ;emi
  371.  
  372. DeviceData       Dev_Data    <9,80,2,0,0,0,0>   ; mouse device data
  373.  
  374. Modes            Mode_Data   <>       ; VIO Mode Data Record Structure
  375.  
  376. FullScrCBs       CBPtrStruc  <SG0,0>
  377.                  CBPtrStruc  <SG1,0>
  378.                  CBPtrStruc  <0,0>
  379.                  CBPtrStruc  <SG3,0>
  380.                  db          12 * size CBPtrStruc dup (0)
  381.  
  382. ;*
  383. ;* This in the event CB for all full screen VDMs
  384. ;*
  385.  
  386. VDM_Cols         dw          0        ; Number of columns in the FS VDM
  387. VDM_Rows         dw          0        ; Number of rows in the FS VDM
  388. VEvent           db (size VDMEvent_) dup (0)
  389.  
  390. ;*
  391. ;*These are the entries for every handle given by the Open_Mouse call.
  392. ;*The Open_Mouse call is available to any DD that does an AttachDD
  393. ;*on MOUSE$. This call is function 0004h. We are allowing a maximum
  394. ;*of 5 open handles at any given time. The handle is a required parameter
  395. ;*for all other IDC functions greater then 00004h.
  396. ;*
  397.  
  398. even
  399.  
  400. IDC_CB           IDC_Entry <0,0>
  401.                  IDC_Entry <0,0>
  402.                  IDC_Entry <0,0>
  403.                  IDC_Entry <0,0>
  404.                  IDC_Entry <0,0>
  405.  
  406. SN_Flags         db          0        ; Special Needs flags
  407.  
  408.  
  409. ;*
  410. ;* This is the extended mode data and config data stuff.
  411. ;*
  412.  
  413.                  even
  414. cfgdatalabel     label    word        ; insure word alignment
  415.  
  416. free_offset      dw       cfg_data_start
  417. free_space       dw       end_cfg_data - cfg_data_start
  418. cfg_offset       dw       8 dup (0)
  419. ext_mode_data    db       16 * ExtModeLen dup (0)
  420. cfg_data_start   db       560 dup (0)
  421. end_cfg_data     db       0
  422.  
  423. ;*************************************************************************
  424. ;*    Below is all the data used by the hardware dependent routines      *
  425. ;*************************************************************************
  426.  
  427. DevStatus     dw         0               ; current device status
  428.                                          ; High byte: reserved 0
  429.                                          ; Low byte:
  430.                                          ;   0000000x  Read enabled
  431.                                          ;   000000x0  MOUSE$ attach done
  432.                                          ;   00000x00  IRQ enabled
  433.                                          ;   0000x000  We've been deinstalled
  434.                                          ;   00000000
  435.                                          ;   00000000
  436.                                          ;   00000000
  437. ByteCount     dw         0               ; packet counter
  438. SynchFlag     dw         0               ; packet synch flag ;53248 ;          
  439.                                          ; High byte: reserved 0
  440.                                          ; Low byte:
  441.                                          ;   0000000x
  442.                       ;                  ;   000000x0  Hot Plug stage one
  443.                       ;                  ;   00000x00  Hot Plug stage two
  444.                       ;                  ;   0000x000  APM Active/Inactive
  445.                       ;                  ;   000x0000  APM Mouse Reset flag
  446.                                          ;   00x00000
  447.                                          ;   0x000000
  448.                                          ;   x0000000
  449. Dev_LID       dw         0
  450. HotPlugHandle dd         0               ; Context hook routine Handle ;56543
  451.                                          ;           
  452. MiddleButFlag db         0               ; processing 4th data byte (mid butt)
  453.  
  454. Relaxed       db         0               ; do sync checking? (0=yes, 1=no)
  455. SynchMask     db         0               ; packet synch mask     ;53248
  456. gMEvent       db    5 dup (0)
  457. ABIOS_Mch     db    FALSE                ; FALSE = Non ABIOS machine
  458.                                          ; TRUE  = ABIOS machine
  459.  
  460. TranslateMode db    40h                  ; keyboard translate mode
  461.  
  462. AUXPortExists db    FALSE                ; FALSE = no AUX port
  463.                                          ; TRUE  = an AUX port exists
  464.  
  465. PrescottDsp   db    FALSE                ; FALSE = not a Prescott Display
  466.                                          ; TRUE  = Prescott Display installed
  467.  
  468. ScreenKeypad  db    FALSE                ; FALSE = not a screen reader pad
  469.                                          ; TRUE  = screen reader pad attached
  470.  
  471. PortBase      dw         ?               ; Port Base Address
  472. First_Port    dw         ?               ; Port Base Address in use
  473. PrevEvent     dw         0               ; previous mouse event
  474. InportAddr    dw         0               ; INP
  475. InpVersion    db         ?               ; version/revision of Inport Mouse
  476.  
  477. LATLSBSave    DB        ?               ; Variables used to save and restore
  478. LATMSBSave    DB        ?               ;  the COM port being tested.
  479. LCRSave       DB        ?               ;  ...
  480. MCRSave       DB        ?               ;  ...
  481. IERSave       DB        ?               ;  ...
  482.  
  483. Enable_8259   DB        0               ;  ...
  484. Disable_8259  DB        0               ;  ...
  485. Enable_28259  db        0               ; Enable byte for 2nd controller
  486. Disable_28259 db        0               ; Disable byte for 2nd controller
  487. actvirqbit    db        16 dup (0)      ; active IRQ counts
  488.  
  489.         public  oddpts
  490. oddpts        dw         238h, 338h,3220h,3228h
  491.               dw        4220h,4228h,5220h,5228h,0
  492.  
  493. ;*************************************************************************
  494. ;*    These are the pre allocated special screen group CBs               *
  495. ;*************************************************************************
  496.  
  497. SG0       db (size ScrGp_Data) dup (?)        ; default harderror sg
  498. SG1       db (size ScrGp_Data) dup (?)        ; default harderror sg
  499. SG3       db (size ScrGp_Data) dup (?)        ; default harderror sg
  500.  
  501.  
  502. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  503. ;*      V A R I A B L E S  ==>  Used Only until DD is fully loaded         *
  504. ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  505.  
  506. DfltEQs       DB (((SIZE Event_Rec) * 100) * 3) DUP (0)
  507.  
  508. SMData        dw          8h            ; length = 8
  509.               dw   TERMINATION+CREATION+PRESWITCH+POSTSWITCH+AIMPOSTSAVE
  510.               dd      Mouse$            ; address of mouse$ DD name
  511.  
  512. DSEG     ENDS
  513.  
  514.  
  515. ;*
  516. ;* Data Segment Variables Made Public for other Mouse Modules
  517. ;*
  518.  
  519.        PUBLIC  SQDD
  520.        PUBLIC  EmiDD                                      ; emi
  521.        PUBLIC  SQDDName
  522.        PUBLIC  EmiDDName                                  ; emi
  523.        PUBLIC  APMDDName                                  ;           
  524.        PUBLIC  APMIDCHandle                               ;           
  525.        PUBLIC  APMIDCReg                                  ;           
  526.        PUBLIC  APMIDCDereg                                ;           
  527.        PUBLIC  EmiMvt                                     ; emi
  528.        PUBLIC  EmiSSI                                     ; emi
  529.        PUBLIC  Ptr_Rec
  530.        PUBLIC  Ctl_Sem
  531.        PUBLIC  Sem_Time
  532.        PUBLIC  Device_Help
  533.        PUBLIC  InfoSegAddr
  534.        PUBLIC  CallSessn
  535.        PUBLIC  FgndSessn
  536.        PUBLIC  Eq_Length
  537.        PUBLIC  Ptr_Overide
  538.        PUBLIC  MEvent
  539.        PUBLIC  Num_Grps
  540.        PUBLIC  RBlk_Tbl
  541.        PUBLIC  Func_Tbl
  542.        PUBLIC  GDT_Seg
  543.        PUBLIC  Modes
  544.        PUBLIC  DeInstall
  545.        PUBLIC  Sem_PID
  546.        PUBLIC  Last_Event
  547.        PUBLIC  Detach_Proc
  548.        PUBLIC  SQ_Pid
  549.        PUBLIC  CallPID
  550.        public  ShellPID
  551.        public  free_offset
  552.        public  free_space
  553.        public  cfg_offset
  554.        public  ext_mode_data
  555.        public  TypeName
  556.        public  STypeName
  557.        public  DDD
  558.        public  DDD2
  559.        public  APMDD
  560.        public  usQSize
  561.        public  DeviceData
  562.        public  DDDInit
  563.        public  CurCommand
  564.        public  CurRequest
  565.        public  IntEntry
  566.        public  StratEntry
  567.        public  AccessTbl
  568.        public  Int_Packet
  569.        public  SInt_Packet                             ;emi
  570.        public  EMaskMax
  571.        public  MSEVDDEntry
  572.        public  VEvent
  573.        public  VDM_Rows
  574.        public  VDM_Cols
  575.        public  IDC_CB
  576.        public  SN_Flags
  577.        public  Mouse$
  578.        public  FgndCB
  579.        public  FullScrCBs
  580.        public  VDM_Flags
  581.        public  SMData
  582.        public  SG0
  583.        public  SG1
  584.        public  SG3
  585.        public  DfltEQs
  586.        public  TypeOverRider
  587.        public  EmiFlags                                ; emi
  588.        public  SType
  589.        public  DevStatus
  590.        public  gMEvent
  591.        public  ByteCount
  592.        public  MiddleButFlag                       ;           
  593.        public  Relaxed
  594.        public  ABIOS_Mch
  595.        public  TranslateMode
  596.        public  AUXPortExists
  597.        public  PrescottDsp
  598.        public  ScreenKeypad
  599.        public  PortBase
  600.        public  First_Port
  601.        public  LATLSBSave
  602.        public  LATMSBSave
  603.        public  LCRSave
  604.        public  MCRSave
  605.        public  IERSave
  606.        public  PrevEvent
  607.        public  InportAddr
  608.        public  Enable_8259
  609.        public  Disable_8259
  610.        public  Enable_28259
  611.        public  Disable_28259
  612.        public  InpVersion
  613.        public  Dev_LID
  614.        public  SynchMask
  615.        public  SynchFlag
  616.        public  HotPlugHandle
  617.        public  actvirqbit
  618.        public  Init_Time
  619.  
  620. END
  621.