home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 10 / mycd10.iso / share / os2 / utilidad / ext2fl / e2header.asm < prev    next >
Encoding:
Assembly Source File  |  1995-07-31  |  2.8 KB  |  80 lines

  1. ;/************************************************************************/
  2. ;/*                       Linux partition filter.                        */
  3. ;/*          (C) Copyright Deon van der Westhuysen, July 1995.           */
  4. ;/*                                                                      */
  5. ;/*  Dedicated to Jesus Christ, my Lord and Saviour.                     */
  6. ;/*                                                                      */
  7. ;/* This program is free software; you can redistribute it and/or modify */
  8. ;/* it under the terms of the GNU General Public License as published by */
  9. ;/* the Free Software Foundation; either version 2, or (at your option)  */
  10. ;/* any later version.                                                   */
  11. ;/*                                                                      */
  12. ;/* This program is distributed in the hope that it will be useful,      */
  13. ;/* but WITHOUT ANY WARRANTY; without even the implied warranty of       */
  14. ;/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        */
  15. ;/* GNU General Public License for more details.                         */
  16. ;/*                                                                      */
  17. ;/* You should have received a copy of the GNU General Public License    */
  18. ;/* along with this program; if not, write to the Free Software          */
  19. ;/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            */
  20. ;/*                                                                      */
  21. ;/*  This code is still under development; expect some rough edges.      */
  22. ;/*                                                                      */
  23. ;/************************************************************************/
  24.  
  25.     Title    E2Header- Device driver header and segment ordering.
  26.  
  27. locals
  28. .386P
  29.  
  30. include reqpkt.inc
  31. include devcmd.inc
  32. DRIVER_INIT= 1
  33.  
  34. DGROUP    group _DATA,_BSS
  35.  
  36. _DATA    segment word public 'DATA' use16
  37.     public DevHeader
  38. DevHeader    dd -1            ; Pointer to next driver
  39.         dw 8180h        ; Device attributes
  40.         dw offset E2Strategy    ; Strategy routine entry point
  41.         dw 0            ; IDC routine entry point
  42.         db 'Ext2Flt$'        ; Device name
  43.         db 8 dup (0)        ; Reserved
  44.         dd 8            ; Level 3 device drive capabilities
  45.                     ; 8= Adapter device driver
  46.     public InitFlags
  47. InitFlags    db 0
  48.  
  49. _DATA    ends
  50.  
  51. _BSS    segment word public 'BSS' use16
  52. _BSS    ends
  53.  
  54. _TEXT    segment byte public 'CODE' use16
  55.  
  56.     assume cs:_TEXT, ds:DGROUP
  57.     extrn _E2Init: near
  58.  
  59.     public E2Strategy
  60. E2Strategy    proc far
  61.     cmp byte ptr es:[bx+ReqCommand],CMDInitBase
  62.     jne short @@BadCommand
  63.     test InitFlags,DRIVER_INIT
  64.     jne short @@BadCommand
  65.     or InitFlags,DRIVER_INIT
  66.     push es
  67.     push bx
  68.     call _E2Init
  69.     add sp,4
  70.     jmp short @@Exit
  71. @@BadCommand:
  72.     mov word ptr es:[bx+ReqStatus],8103h    ; Done, error
  73. @@Exit:
  74.     retf
  75. E2Strategy    endp
  76.  
  77. _TEXT    ends
  78.  
  79.     end
  80.