home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / e2fltsrc.zip / e2header.asm < prev    next >
Assembly Source File  |  1995-07-24  |  2KB  |  69 lines

  1. ;/************************************************************************/
  2. ;/*  Linux partition filter (C) Deon van der Westhuysen.                 */
  3. ;/*                                                                      */
  4. ;/*  Dedicated to Jesus Christ, my Lord and Saviour.                     */
  5. ;/*                                                                      */
  6. ;/*  Permission is granted to freely use and modify this code for non-   */
  7. ;/*  profit use on the condition that this notice is not removed. All    */
  8. ;/*  other rights are reserved. No warranty, etc.                        */
  9. ;/*                                                                      */
  10. ;/*  This code is still under development; expect some rough edges.      */
  11. ;/*                                                                      */
  12. ;/************************************************************************/
  13.  
  14.     Title    E2Header- Device driver header and segment ordering.
  15.  
  16. locals
  17. .386P
  18.  
  19. include reqpkt.inc
  20. include devcmd.inc
  21. DRIVER_INIT= 1
  22.  
  23. DGROUP    group _DATA,_BSS
  24.  
  25. _DATA    segment word public 'DATA' use16
  26.     public DevHeader
  27. DevHeader    dd -1            ; Pointer to next driver
  28.         dw 8180h        ; Device attributes
  29.         dw offset E2Strategy    ; Strategy routine entry point
  30.         dw 0            ; IDC routine entry point
  31.         db 'Ext2Flt$'        ; Device name
  32.         db 8 dup (0)        ; Reserved
  33.         dd 8            ; Level 3 device drive capabilities
  34.                     ; 8= Adapter device driver
  35.     public InitFlags
  36. InitFlags    db 0
  37.  
  38. _DATA    ends
  39.  
  40. _BSS    segment word public 'BSS' use16
  41. _BSS    ends
  42.  
  43. _TEXT    segment byte public 'CODE' use16
  44.  
  45.     assume cs:_TEXT, ds:DGROUP
  46.     extrn _E2Init: near
  47.  
  48.     public E2Strategy
  49. E2Strategy    proc far
  50.     cmp byte ptr es:[bx+ReqCommand],CMDInitBase
  51.     jne short @@BadCommand
  52.     test InitFlags,DRIVER_INIT
  53.     jne short @@BadCommand
  54.     or InitFlags,DRIVER_INIT
  55.     push es
  56.     push bx
  57.     call _E2Init
  58.     add sp,4
  59.     jmp short @@Exit
  60. @@BadCommand:
  61.     mov word ptr es:[bx+ReqStatus],8103h    ; Done, error
  62. @@Exit:
  63.     retf
  64. E2Strategy    endp
  65.  
  66. _TEXT    ends
  67.  
  68.     end
  69.