execrh.lst

来自「DOS SOURCE CODE,DOS-C started in 1988 as」· LST 代码 · 共 136 行

LST
136
字号
Turbo Assembler	 Version 3.1	    04/11/13 12:54:49	    Page 1
EXECRH.ASM



      1				     ;
      2				     ; File:
      3				     ;				execrh.asm
      4				     ; Description:
      5				     ;		   request handler for calling device drivers
      6				     ;
      7				     ;			     Copyright (c) 1995
      8				     ;			     Pasquale J. Villani
      9				     ;			     All Rights	Reserved
     10				     ;
     11				     ; This file is part of DOS-C.
     12				     ;
     13				     ; DOS-C is	free software; you can redistribute it and/or
     14				     ; modify it under the terms of the	GNU General Public License
     15				     ; as published by the Free	Software Foundation; either version
     16				     ; 2, or (at your option) any later	version.
     17				     ;
     18				     ; DOS-C is	distributed in the hope	that it	will be	useful,	but
     19				     ; WITHOUT ANY WARRANTY; without even the implied warranty of
     20				     ; MERCHANTABILITY or FITNESS FOR A	PARTICULAR PURPOSE.  See
     21				     ; the GNU General Public License for more details.
     22				     ;
     23				     ; You should have received	a copy of the GNU General Public
     24				     ; License along with DOS-C; see the file COPYING.	If not,
     25				     ; write to	the Free Software Foundation, 675 Mass Ave,
     26				     ; Cambridge, MA 02139, USA.
     27				     ;
     28				     ; $Logfile:   D:/dos-c/src/kernel/execrh.asv  $
     29				     ;
     30				     ; $Header:	  D:/dos-c/src/kernel/execrh.asv   1.2	 29 May	1996 21:03:30	patv  $
     31				     ;
     32				     ; $Log:   D:/dos-c/src/kernel/execrh.asv  $
     33				     ;
     34				     ;	 Rev 1.2   29 May 1996 21:03:30	  patv
     35				     ;bug fixes	for v0.91a
     36				     ;
     37				     ;	 Rev 1.1   01 Sep 1995 17:54:22	  patv
     38				     ;First GPL	release.
     39				     ;
     40				     ;	 Rev 1.0   02 Jul 1995	9:05:34	  patv
     41				     ;Initial revision.
     42				     ;
     43
     44
     45	0000			     _TEXT	     segment byte public 'CODE'
     46				     DGROUP	     group   _DATA,_BSS,_BSSEND		     ; small model
     47						     assume  cs:_TEXT,ds:DGROUP,ss:DGROUP
     48	0000			     _TEXT	     ends
     49
     50	0000			     _DATA	     segment word public 'DATA'
     51	0000			     _DATA	     ends
     52
     53	0000			     _BSS	     segment word public 'BSS'
     54	0000			     _BSS	     ends
     55
Turbo Assembler	 Version 3.1	    04/11/13 12:54:49	    Page 2
EXECRH.ASM



     56	0000			     _BSSEND	     segment byte public 'STACK'
     57	0000			     _BSSEND	     ends
     58
     59
     60	0000			     _TEXT	     segment byte public 'CODE'
     61						     assume  cs:_TEXT
     62
     63
     64
     65						     ;
     66						     ; _execrh
     67						     ;	     Execute Device Request
     68						     ;
     69						     ; execrh(rhp, dhp)
     70						     ; request far *rhp;
     71						     ; struct dhdr far *dhp;
     72						     ;
     73	0000			     _execrh	     proc    near
     74						     public _execrh
     75
     76	0000  55				     push    bp			     ; perform c entry
     77	0001  8B EC				     mov     bp,sp
     78	0003  83 EC 04				     sub     sp,4
     79	0006  56				     push    si
     80	0007  1E				     push    ds
     81	0008  C5 76 08				     lds     si,dword ptr [bp+8]     ; ds:si = device header
     82	000B  C4 5E 04				     les     bx,dword ptr [bp+4]     ; es:bx = request header
     83	000E  8B 44 06				     mov     ax,[si+6]		     ; get strategy dword address
     84	0011  89 46 FC				     mov     word ptr [bp-4],ax	     ; driver offset
     85	0014  8C 5E FE				     mov     word ptr [bp-2],ds	     ; driver cs = ds from pointer
     86	0017  FF 5E FC				     call    dword ptr ss:[bp-4]     ;call device strategy
     87	001A  8B 44 08				     mov     ax,[si+8]		     ;get interrupt dword address
     88	001D  89 46 FC				     mov     word ptr [bp-4],ax
     89	0020  FF 5E FC				     call    dword ptr ss:[bp-4]     ;call device interrupt
     90	0023  1F				     pop     ds
     91	0024  5E				     pop     si
     92	0025  8B E5				     mov     sp,bp
     93	0027  5D				     pop     bp
     94	0028  C3				     ret
     95
     96	0029			     _execrh	     endp
     97
     98	0029			     _TEXT	     ends
     99						     end
Turbo Assembler	 Version 3.1	    04/11/13 12:54:49	    Page 3
Symbol Table




Symbol Name			  Type	 Value

??DATE				  Text	 "04/11/13"
??FILENAME			  Text	 "EXECRH  "
??TIME				  Text	 "12:54:49"
??VERSION			  Number 030A
@CPU				  Text	 0101H
@CURSEG				  Text	 _TEXT
@FILENAME			  Text	 EXECRH
@WORDSIZE			  Text	 2
STANDALONE			  Text	 1
_EXECRH	(_execrh)		  Near	 _TEXT:0000

Groups & Segments		  Bit Size Align  Combine Class

DGROUP				  Group
  _BSS				  16  0000 Word	  Public  BSS
  _BSSEND			  16  0000 Byte	  Public  STACK
  _DATA				  16  0000 Word	  Public  DATA
_TEXT				  16  0029 Byte	  Public  CODE


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?