Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
35462902
Commit
35462902
authored
Nov 27, 2002
by
Jukka Heinonen
Committed by
Alexandre Julliard
Nov 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved handlers for int25 and int26 to winedos.
parent
96ad51b3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
52 deletions
+112
-52
kernel32.spec
dlls/kernel/kernel32.spec
+1
-2
Makefile.in
dlls/ntdll/Makefile.in
+0
-2
Makefile.in
dlls/winedos/Makefile.in
+2
-0
dosexe.h
dlls/winedos/dosexe.h
+8
-0
int25.c
dlls/winedos/int25.c
+55
-15
int26.c
dlls/winedos/int26.c
+45
-15
interrupts.c
dlls/winedos/interrupts.c
+0
-11
miscemu.h
include/miscemu.h
+1
-7
No files found.
dlls/kernel/kernel32.spec
View file @
35462902
...
...
@@ -1053,8 +1053,7 @@
@ cdecl DOSMEM_GetBlock(long ptr) DOSMEM_GetBlock
@ cdecl DOSMEM_GetDPMISegments() DOSMEM_GetDPMISegments
@ cdecl DOSMEM_Init(long) DOSMEM_Init
@ stdcall INT_Int25Handler(ptr) INT_Int25Handler
@ stdcall INT_Int26Handler(ptr) INT_Int26Handler
@ cdecl DRIVE_OpenDevice(long long) DRIVE_OpenDevice
@ cdecl LOCAL_Alloc(long long long) LOCAL_Alloc
@ cdecl LOCAL_Compact(long long long) LOCAL_Compact
@ cdecl LOCAL_CountFree(long) LOCAL_CountFree
...
...
dlls/ntdll/Makefile.in
View file @
35462902
...
...
@@ -51,8 +51,6 @@ C_SRCS = \
$(TOPOBJDIR)
/msdos/dosmem.c
\
$(TOPOBJDIR)
/msdos/dpmi.c
\
$(TOPOBJDIR)
/msdos/int21.c
\
$(TOPOBJDIR)
/msdos/int25.c
\
$(TOPOBJDIR)
/msdos/int26.c
\
$(TOPOBJDIR)
/msdos/ioports.c
\
$(TOPOBJDIR)
/msdos/ppdev.c
\
$(TOPOBJDIR)
/msdos/vxd.c
\
...
...
dlls/winedos/Makefile.in
View file @
35462902
...
...
@@ -28,6 +28,8 @@ C_SRCS = \
int1a.c
\
int20.c
\
int21.c
\
int25.c
\
int26.c
\
int29.c
\
int2a.c
\
int2f.c
\
...
...
dlls/winedos/dosexe.h
View file @
35462902
...
...
@@ -148,6 +148,14 @@ extern void WINAPI DOSVM_Int20Handler(CONTEXT86*);
/* int21.c */
extern
void
WINAPI
DOSVM_Int21Handler
(
CONTEXT86
*
);
/* int25.c */
BOOL
DOSVM_RawRead
(
BYTE
,
DWORD
,
DWORD
,
BYTE
*
,
BOOL
);
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT86
*
);
/* int26.c */
BOOL
DOSVM_RawWrite
(
BYTE
,
DWORD
,
DWORD
,
BYTE
*
,
BOOL
);
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT86
*
);
/* int29.c */
extern
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT86
*
);
...
...
ms
dos/int25.c
→
dlls/wine
dos/int25.c
View file @
35462902
...
...
@@ -34,39 +34,79 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
/***********************************************************************
* DOSVM_RawRead
*
* Read raw sectors from a device.
*/
BOOL
DOSVM_RawRead
(
BYTE
drive
,
DWORD
begin
,
DWORD
nr_sect
,
BYTE
*
dataptr
,
BOOL
fake_success
)
{
int
fd
;
if
((
fd
=
DRIVE_OpenDevice
(
drive
,
O_RDONLY
))
!=
-
1
)
{
lseek
(
fd
,
begin
*
512
,
SEEK_SET
);
/* FIXME: check errors */
read
(
fd
,
dataptr
,
nr_sect
*
512
);
close
(
fd
);
}
else
{
memset
(
dataptr
,
0
,
nr_sect
*
512
);
if
(
fake_success
)
{
/* FIXME: explain what happens here */
if
(
begin
==
0
&&
nr_sect
>
1
)
*
(
dataptr
+
512
)
=
0xf8
;
if
(
begin
==
1
)
*
dataptr
=
0xf8
;
}
else
return
FALSE
;
}
return
TRUE
;
}
/**********************************************************************
*
INT_Int25Handler (WPROCS
.137)
*
DOSVM_Int25Handler (WINEDOS16
.137)
*
* Handler for int 25h (absolute disk read).
*/
void
WINAPI
INT
_Int25Handler
(
CONTEXT86
*
context
)
void
WINAPI
DOSVM
_Int25Handler
(
CONTEXT86
*
context
)
{
WCHAR
drivespec
[
4
]
=
{
'A'
,
':'
,
'\\'
,
0
};
BYTE
*
dataptr
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Ebx
);
DWORD
begin
,
length
;
DWORD
begin
;
DWORD
length
;
drivespec
[
0
]
+=
AL_reg
(
context
);
if
(
!
DRIVE_IsValid
(
LOBYTE
(
context
->
Eax
)))
if
(
GetDriveTypeW
(
drivespec
)
==
DRIVE_NO_ROOT_DIR
||
GetDriveTypeW
(
drivespec
)
==
DRIVE_UNKNOWN
)
{
SET_CFLAG
(
context
);
SET_AX
(
context
,
0x0201
);
/* unknown unit */
SET_CFLAG
(
context
);
SET_AX
(
context
,
0x0201
);
/* unknown unit */
return
;
}
if
(
LOWORD
(
context
->
Ecx
)
==
0xffff
)
if
(
CX_reg
(
context
)
==
0xffff
)
{
begin
=
*
(
DWORD
*
)
dataptr
;
length
=
*
(
WORD
*
)(
dataptr
+
4
);
dataptr
=
(
BYTE
*
)
CTX_SEG_OFF_TO_LIN
(
context
,
*
(
WORD
*
)(
dataptr
+
8
),
*
(
DWORD
*
)(
dataptr
+
6
)
);
*
(
WORD
*
)(
dataptr
+
8
),
*
(
DWORD
*
)(
dataptr
+
6
)
);
}
else
{
begin
=
LOWORD
(
context
->
Edx
);
length
=
LOWORD
(
context
->
Ecx
);
begin
=
DX_reg
(
context
);
length
=
CX_reg
(
context
);
}
TRACE
(
"int25: abs diskread, drive %d, sector %ld, "
"count %ld, buffer %p
\n
"
,
LOBYTE
(
context
->
Eax
),
begin
,
length
,
dataptr
);
DRIVE_RawRead
(
LOBYTE
(
context
->
Eax
),
begin
,
length
,
dataptr
,
TRUE
);
RESET_CFLAG
(
context
);
TRACE
(
"abs diskread, drive %d, sector %ld, "
"count %ld, buffer %p
\n
"
,
AL_reg
(
context
),
begin
,
length
,
dataptr
);
DOSVM_RawRead
(
AL_reg
(
context
),
begin
,
length
,
dataptr
,
TRUE
);
RESET_CFLAG
(
context
);
}
ms
dos/int26.c
→
dlls/wine
dos/int26.c
View file @
35462902
...
...
@@ -32,40 +32,70 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
/***********************************************************************
* DOSVM_RawWrite
*
* Write raw sectors to a device.
*/
BOOL
DOSVM_RawWrite
(
BYTE
drive
,
DWORD
begin
,
DWORD
nr_sect
,
BYTE
*
dataptr
,
BOOL
fake_success
)
{
int
fd
;
if
((
fd
=
DRIVE_OpenDevice
(
drive
,
O_RDONLY
))
!=
-
1
)
{
lseek
(
fd
,
begin
*
512
,
SEEK_SET
);
/* FIXME: check errors */
write
(
fd
,
dataptr
,
nr_sect
*
512
);
close
(
fd
);
}
else
if
(
!
fake_success
)
return
FALSE
;
return
TRUE
;
}
/**********************************************************************
*
INT_Int26Handler (WPROCS
.138)
*
DOSVM_Int26Handler (WINEDOS16
.138)
*
* Handler for int 26h (absolute disk read).
*/
void
WINAPI
INT
_Int26Handler
(
CONTEXT86
*
context
)
void
WINAPI
DOSVM
_Int26Handler
(
CONTEXT86
*
context
)
{
WCHAR
drivespec
[
4
]
=
{
'A'
,
':'
,
'\\'
,
0
};
BYTE
*
dataptr
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Ebx
);
DWORD
begin
,
length
;
DWORD
begin
;
DWORD
length
;
drivespec
[
0
]
+=
AL_reg
(
context
);
if
(
!
DRIVE_IsValid
(
LOBYTE
(
context
->
Eax
)))
if
(
GetDriveTypeW
(
drivespec
)
==
DRIVE_NO_ROOT_DIR
||
GetDriveTypeW
(
drivespec
)
==
DRIVE_UNKNOWN
)
{
SET_CFLAG
(
context
);
SET_AX
(
context
,
0x0201
);
/* unknown unit */
SET_CFLAG
(
context
);
SET_AX
(
context
,
0x0201
);
/* unknown unit */
return
;
}
if
(
LOWORD
(
context
->
Ecx
)
==
0xffff
)
if
(
CX_reg
(
context
)
==
0xffff
)
{
begin
=
*
(
DWORD
*
)
dataptr
;
length
=
*
(
WORD
*
)(
dataptr
+
4
);
dataptr
=
(
BYTE
*
)
CTX_SEG_OFF_TO_LIN
(
context
,
*
(
WORD
*
)(
dataptr
+
8
),
*
(
DWORD
*
)(
dataptr
+
6
)
);
*
(
WORD
*
)(
dataptr
+
8
),
*
(
DWORD
*
)(
dataptr
+
6
)
);
}
else
{
begin
=
LOWORD
(
context
->
Edx
);
length
=
LOWORD
(
context
->
Ecx
);
begin
=
DX_reg
(
context
);
length
=
CX_reg
(
context
);
}
TRACE
(
"int26:
abs diskwrite, drive %d, sector %ld, "
"count %ld, buffer %p
\n
"
,
AL_reg
(
context
),
begin
,
length
,
dataptr
);
TRACE
(
"
abs diskwrite, drive %d, sector %ld, "
"count %ld, buffer %p
\n
"
,
AL_reg
(
context
),
begin
,
length
,
dataptr
);
D
RIVE_RawWrite
(
LOBYTE
(
context
->
Eax
),
begin
,
length
,
dataptr
,
TRUE
);
RESET_CFLAG
(
context
);
D
OSVM_RawWrite
(
AL_reg
(
context
),
begin
,
length
,
dataptr
,
TRUE
);
RESET_CFLAG
(
context
);
}
dlls/winedos/interrupts.c
View file @
35462902
...
...
@@ -24,17 +24,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
/***********************************************************************
* DOSVM_Int25Handler (WINEDOS16.137)
* DOSVM_Int26Handler (WINEDOS16.138)
*
* FIXME: Interrupt handlers for interrupts implemented in other DLLs.
* These functions should be removed when the interrupt handlers have
* been moved to winedos.
*/
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT86
*
context
)
{
INT_Int25Handler
(
context
);
}
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT86
*
context
)
{
INT_Int26Handler
(
context
);
}
static
FARPROC16
DOSVM_Vectors16
[
256
];
static
FARPROC48
DOSVM_Vectors48
[
256
];
static
const
INTPROC
DOSVM_VectorsBuiltin
[]
=
...
...
include/miscemu.h
View file @
35462902
...
...
@@ -175,6 +175,7 @@ struct DPMI_segments
WORD
int48_sel
;
};
/* msdos/dosmem.c */
extern
struct
DPMI_segments
DOSMEM_dpmi_segments
;
extern
const
struct
DPMI_segments
*
DOSMEM_GetDPMISegments
(
void
);
...
...
@@ -196,17 +197,10 @@ extern BOOL INSTR_EmulateInstruction( CONTEXT86 *context );
extern
DWORD
IO_inport
(
int
port
,
int
count
);
extern
void
IO_outport
(
int
port
,
int
count
,
DWORD
value
);
/* msdos/int25.c */
extern
void
WINAPI
INT_Int25Handler
(
CONTEXT86
*
);
/* msdos/int26.c */
extern
void
WINAPI
INT_Int26Handler
(
CONTEXT86
*
);
/* msdos/dpmi.c */
extern
BOOL
DPMI_LoadDosSystem
(
void
);
/* misc/ppdev.c */
extern
BOOL
IO_pp_outp
(
int
port
,
DWORD
*
res
);
extern
int
IO_pp_inp
(
int
port
,
DWORD
*
res
);
extern
char
IO_pp_init
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment