FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MS-DOS-kernel/kernel/execrh.asm at master · Programuserbash/MS-DOS-kernel · GitHub
Programuserbash
/
MS-DOS-kernel
Public
forked from
FDOS/kernel
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MS-DOS-kernel
/
kernel
/
execrh.asm
Copy path
More file actions
More file actions
Latest commit
History
History
History
96 lines (78 loc) · 2.8 KB
Breadcrumbs
MS-DOS-kernel
/
kernel
/
execrh.asm
Copy path
File metadata and controls
96 lines (78 loc) · 2.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
;
; File:
; execrh.asm
; Description:
; request handler for calling device drivers
;
; Copyright (c) 1995, 1998
; Pasquale J. Villani
; All Rights Reserved
;
; This file is part of DOS-C.
;
; DOS-C is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either version
; 2, or (at your option) any later version.
;
; DOS-C is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
; the GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public
; License along with DOS-C; see the file COPYING. If not,
; write to the Free Software Foundation, 675 Mass Ave,
; Cambridge, MA 02139, USA.
;
; $Id: execrh.asm 1184 2006-05-20 20:49:59Z mceric $
;
%include
"segs.inc"
%include
"stacks.inc"
segment HMA_TEXT
; EXECRH
; Execute Device Request
;
; execrh(rhp, dhp)
; request far *rhp;
; struct dhdr far *dhp;
;
;
; The stack is very critical in here.
;
global
EXECRH
global
INIT_EXECRH
%macro
EXECRHM
0
push
bp
; perform c entry
mov
bp
,
sp
push
si
push
ds
; sp=bp-8
arg {rhp
,
4
}
,
{dhp
,
4
}
lds
si
,[
.dhp
]
; ds:si = device header
les
bx
,[
.rhp
]
; es:bx = request header
mov
ax
,
[
si
+
6
]
; construct strategy address
mov
[
.dhp
],
ax
push
si
; the bloody fucking RTSND.DOS
push
di
; driver destroys SI,DI (tom 14.2.03)
call
far
[
.dhp
]
; call far the strategy
pop
di
pop
si
; Protect386Registers ; old free-EMM386 versions destroy regs in their INIT method
mov
ax
,[
si
+
8
]
; construct 'interrupt' address
mov
[
.dhp
],
ax
; construct interrupt address
call
far
[
.dhp
]
; call far the interrupt
; Restore386Registers ; less stack load and better performance...
sti
; damm driver turn off ints
cld
; has gone backwards
pop
ds
pop
si
pop
bp
ret
8
%endmacro
EXECRH:
EXECRHM
%ifndef
WATCOM
segment INIT_TEXT
INIT_EXECRH:
EXECRHM
%endif
Back
|
FazBrowse Home
|
New Git URL