home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / scsiopt2.zip / startup.asm < prev    next >
Assembly Source File  |  1997-12-16  |  2KB  |  93 lines

  1. ;*
  2. ;* $Source: e:/source/driver/perf/RCS/startup.asm,v $
  3. ;* $Revision: 1.2 $
  4. ;* $Date: 1997/12/16 02:22:55 $
  5. ;* $Locker:  $
  6. ;*
  7. ;* Assembler Helper to order segments
  8. ;*
  9. ;* $Log: startup.asm,v $
  10. ;* Revision 1.2  1997/12/16 02:22:55  vitus
  11. ;* - made driver name public through _szDriverName
  12. ;*
  13. ;* Revision 1.1  1997/06/04 23:36:16  vitus
  14. ;* Initial revision
  15. ;* ----------------------------------------
  16. ;* Author: Vitus Jensen, 2:2474/424, 1997
  17. ;*
  18. .286c                        ; at least!
  19.  
  20.     PUBLIC    _DiskDDHeader
  21.     PUBLIC    _szDriverName
  22.  
  23. INCLUDE    devhdr.inc                ; device header format
  24.  
  25.  
  26.     ;; The very first segment has to contain the
  27.     ;; device driver header.  Use own segment for
  28.     ;; this purpose (but in DGROUP).
  29.  
  30. DDHeader    SEGMENT DWORD PUBLIC 'CONST'
  31.  
  32. _DiskDDHeader    DD    -1
  33.         DW    DEV_CHAR_DEV OR DEV_30 OR DEVLEV_3
  34.         DW    OFFSET AsmStrategy
  35.         DW    0
  36. _szDriverName    DB    "SCSIOPT$"
  37.         DW    0
  38.         DW    0
  39.         DW    0
  40.         DW    0
  41.         DD    DEV_INITCOMPLETE OR DEV_ADAPTER_DD OR DEV_16MB OR DEV_IOCTL2
  42.         DW    0
  43.  
  44. DDHeader    ENDS
  45.  
  46. CONST        SEGMENT DWORD PUBLIC 'CONST'    ; places strings here
  47. CONST        ENDS
  48.  
  49. LIBDATA        SEGMENT DWORD PUBLIC 'DATA'
  50. LIBDATA        ENDS
  51.  
  52. _DATA        SEGMENT DWORD PUBLIC 'DATA'
  53. _DATA        ENDS
  54.  
  55. _BSS        SEGMENT DWORD PUBLIC 'BSS'
  56. _BSS        ENDS
  57.  
  58.  
  59.  
  60.     ;; Start of code segments
  61.     ;; There is really code contained: small stubs
  62.     ;; to call C routines and save/restore registers.
  63.  
  64. _TEXT        SEGMENT DWORD PUBLIC 'CODE'
  65.  
  66.     EXTRN    _Strategy : NEAR        ; C routines
  67.  
  68.  
  69. AsmStrategy    PROC    FAR
  70.         push    es
  71.         push    bx
  72.         call    _Strategy
  73.         add    sp, 4
  74.         retf
  75. AsmStrategy    ENDP
  76.  
  77.  
  78. _TEXT        ENDS
  79.  
  80. CODE        SEGMENT DWORD PUBLIC 'CODE'
  81. CODE        ENDS
  82.  
  83. LIBCODE        SEGMENT DWORD PUBLIC 'CODE'
  84. LIBCODE        ENDS
  85.  
  86.  
  87.     ;; Group segments together
  88.  
  89. DGROUP        GROUP    CONST, _BSS, DDHeader, LIBDATA, _DATA
  90. StaticGroup    GROUP    CODE, LIBCODE, _TEXT
  91.  
  92.     END
  93.