home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / kernex32.zip / mwdd_src.zip / 32bits / ext2-os2 / fsh32 / fs_thunks.asm < prev    next >
Assembly Source File  |  1997-08-07  |  4KB  |  150 lines

  1. ;
  2. ; $Header$
  3. ;
  4.  
  5. ; 32 bits OS/2 device driver and IFS support. Provides 32 bits kernel
  6. ; services (DevHelp) and utility functions to 32 bits OS/2 ring 0 code
  7. ; (device drivers and installable file system drivers).
  8. ; Copyright (C) 1995, 1996, 1997  Matthieu WILLM (willm@ibm.net)
  9. ;
  10. ; This program is free software; you can redistribute it and/or modify
  11. ; it under the terms of the GNU General Public License as published by
  12. ; the Free Software Foundation; either version 2 of the License, or
  13. ; (at your option) any later version.
  14. ;
  15. ; This program is distributed in the hope that it will be useful,
  16. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. ; GNU General Public License for more details.
  19. ;
  20. ; You should have received a copy of the GNU General Public License
  21. ; along with this program; if not, write to the Free Software
  22. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  
  24.         .386p
  25.  
  26.         INCL_DOSERRORS equ 1
  27.         include bseerr.inc
  28.  
  29.         include fsd32_segdef.inc
  30.         include r0thunk.inc
  31.         include fsd.inc
  32.  
  33. thunk_fs macro name, size
  34. public FS_&name
  35. FS_&name proc far
  36.         enter 0, 0
  37.         push ds
  38.         push es
  39.         mov ax, Dos32FlatDS
  40.         mov ds, ax
  41.         mov es, ax
  42.  
  43.         assume DS:FLAT, ES:FLAT
  44.  
  45.         lea eax, [bp + 6]       ; adress of FS_MOUNT parameter
  46.         add eax, _TKSSBase      ; ... converted to 32 bits FLAT
  47.         push eax                ; ... and passed to 32 bits routine
  48.         call32 FS32_&name
  49.  
  50.         assume DS:NOTHING, ES:NOTHING
  51.  
  52.         pop es
  53.         pop ds
  54.  
  55.         leave
  56.         retf size
  57. FS_&name endp
  58. endm
  59.  
  60. nothunk_fs macro name, rc, size
  61.     public FS_&name
  62.  
  63. FS_&name proc far
  64.     mov ax, rc
  65.     retf size
  66. FS_&name endp
  67. endm
  68.  
  69.  
  70.  
  71. CODE16 segment
  72.  
  73. assume CS:CODE16
  74.  
  75. thunk_fs ALLOCATEPAGESPACE, 16
  76. thunk_fs CHDIR            , 16
  77. thunk_fs CHGFILEPTR       , 16
  78. thunk_fs CLOSE            , 12
  79. thunk_fs COMMIT           , 12
  80. thunk_fs DELETE           , 14
  81. thunk_fs DOPAGEIO         , 12
  82. thunk_fs EXIT             , 6
  83. thunk_fs FILEATTRIBUTE    , 14
  84. thunk_fs FILEINFO         , 20
  85. thunk_fs FINDCLOSE        , 8
  86. thunk_fs FINDFIRST        , 38
  87. thunk_fs FINDFROMNAME     , 30
  88. thunk_fs FINDNEXT         , 22
  89. thunk_fs FLUSHBUF         , 4
  90. thunk_fs FSCTL            , 28
  91. thunk_fs FSINFO           , 12
  92. thunk_fs IOCTL            , 32
  93. thunk_fs MKDIR            , 20
  94. thunk_fs MOUNT            , 16
  95. thunk_fs MOVE             , 22
  96. thunk_fs NEWSIZE          , 14
  97. thunk_fs OPENCREATE       , 42
  98. thunk_fs OPENPAGEFILE     , 30
  99. thunk_fs PATHINFO         , 24
  100. thunk_fs READ             , 18
  101. thunk_fs RMDIR            , 14
  102. thunk_fs SHUTDOWN         , 6
  103. thunk_fs WRITE            , 18
  104.  
  105.  
  106. nothunk_fs ATTACH           , ERROR_NOT_SUPPORTED, 22
  107. nothunk_fs CANCELLOCKREQUEST, ERROR_NOT_SUPPORTED, 12
  108. nothunk_fs COPY             , ERROR_CANNOT_COPY  , 14
  109. nothunk_fs FILEIO           , ERROR_NOT_SUPPORTED, 20
  110. nothunk_fs FILELOCKS        , ERROR_NOT_SUPPORTED, 24
  111. nothunk_fs FINDNOTIFYCLOSE  , ERROR_NOT_SUPPORTED, 2
  112. nothunk_fs FINDNOTIFYFIRST  , ERROR_NOT_SUPPORTED, 36
  113. nothunk_fs FINDNOTIFYNEXT   , ERROR_NOT_SUPPORTED, 18
  114. nothunk_fs NMPIPE           , ERROR_NOT_SUPPORTED, 22
  115. nothunk_fs PROCESSNAME      , NO_ERROR           , 4
  116. nothunk_fs SETSWAP          , ERROR_NOT_SUPPORTED, 8
  117.  
  118.  
  119. ;    FS_INIT                         Called directly by MWDD32.SYS
  120. ;    FS_VERIFYUNCNAME                N/A : local FSD
  121.  
  122. CODE16 ends
  123.  
  124. CODE32 segment
  125.     assume CS:FLAT, DS:FLAT
  126.  
  127.     public _fs32_allocatepagespace
  128.  
  129. _fs32_allocatepagespace proc near
  130.     push eax    
  131.     db 09ah
  132.     dd offset FLAT:FS32_ALLOCATEPAGESPACE
  133.     dw Dos32FlatCS
  134.     ret
  135. _fs32_allocatepagespace endp
  136.  
  137.     public _fs32_opencreate
  138.  
  139. _fs32_opencreate proc near
  140.     push eax
  141.     db 09ah
  142.      dd offset FLAT:FS32_OPENCREATE
  143.     dw Dos32FlatCS
  144.     ret
  145. _fs32_opencreate endp
  146.  
  147. CODE32 ends
  148.  
  149.         end
  150.