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
7c4bee56
Commit
7c4bee56
authored
Oct 17, 2000
by
Ove Kaaven
Committed by
Alexandre Julliard
Oct 17, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented DOS INT21 AH=4B (EXEC).
parent
7b0bf0f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
12 deletions
+30
-12
dosexe.h
include/dosexe.h
+3
-1
task.h
include/task.h
+1
-1
module.c
loader/dos/module.c
+0
-0
int20.c
msdos/int20.c
+2
-1
int21.c
msdos/int21.c
+24
-9
No files found.
include/dosexe.h
View file @
7c4bee56
...
...
@@ -14,7 +14,7 @@
struct
_DOSEVENT
;
typedef
struct
_DOSTASK
{
WORD
psp_seg
;
WORD
psp_seg
,
retval
;
WORD
dpmi_flag
;
}
DOSTASK
,
*
LPDOSTASK
;
...
...
@@ -31,6 +31,8 @@ typedef struct _DOSTASK {
#define V86_FLAG 0x00020000
extern
BOOL
MZ_LoadImage
(
HMODULE
module
,
HANDLE
hFile
,
LPCSTR
filename
);
extern
BOOL
MZ_Exec
(
CONTEXT86
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
);
extern
void
MZ_Exit
(
CONTEXT86
*
context
,
BOOL
cs_psp
,
WORD
retval
);
extern
LPDOSTASK
MZ_Current
(
void
);
extern
LPDOSTASK
MZ_AllocDPMITask
(
void
);
extern
int
DOSVM_Enter
(
CONTEXT86
*
context
);
...
...
include/task.h
View file @
7c4bee56
...
...
@@ -26,7 +26,7 @@ typedef struct
WORD
parentPSP
;
/* 16 Selector of parent PSP */
BYTE
fileHandles
[
20
];
/* 18 Open file handles */
HANDLE16
environment
;
/* 2c Selector of environment */
WORD
reserved2
[
2
];
DWORD
saveStack
;
/* 2e SS:SP on last int21 call */
WORD
nbFiles
;
/* 32 Number of file handles */
SEGPTR
fileHandlesPtr
;
/* 34 Pointer to file handle table */
HANDLE16
hFileHandles
;
/* 38 Handle to fileHandlesPtr */
...
...
loader/dos/module.c
View file @
7c4bee56
This diff is collapsed.
Click to expand it.
msdos/int20.c
View file @
7c4bee56
...
...
@@ -8,6 +8,7 @@
/* #define DEBUG_INT */
#include "debugtools.h"
#include "task.h"
#include "dosexe.h"
/**********************************************************************
* INT_Int20Handler
...
...
@@ -16,5 +17,5 @@
*/
void
WINAPI
INT_Int20Handler
(
CONTEXT86
*
context
)
{
ExitThread
(
0
);
MZ_Exit
(
context
,
TRUE
,
0
);
}
msdos/int21.c
View file @
7c4bee56
...
...
@@ -954,7 +954,7 @@ static void INT21_SetCurrentPSP(WORD psp)
ERR
(
"Cannot change PSP for non-DOS task!
\n
"
);
}
static
WORD
INT21_GetCurrentPSP
()
static
WORD
INT21_GetCurrentPSP
(
void
)
{
LPDOSTASK
lpDosTask
=
MZ_Current
();
if
(
lpDosTask
)
...
...
@@ -963,6 +963,15 @@ static WORD INT21_GetCurrentPSP()
return
GetCurrentPDB16
();
}
static
WORD
INT21_GetReturnCode
(
void
)
{
LPDOSTASK
lpDosTask
=
MZ_Current
();
if
(
lpDosTask
)
{
WORD
ret
=
lpDosTask
->
retval
;
lpDosTask
->
retval
=
0
;
return
ret
;
}
else
return
0
;
}
/***********************************************************************
* INT21_GetExtendedError
...
...
@@ -1136,7 +1145,7 @@ void WINAPI DOS3Call( CONTEXT86 *context )
case
0x00
:
/* TERMINATE PROGRAM */
TRACE
(
"TERMINATE PROGRAM
\n
"
);
ExitThread
(
0
);
MZ_Exit
(
context
,
FALSE
,
0
);
break
;
case
0x01
:
/* READ CHARACTER FROM STANDARD INPUT, WITH ECHO */
...
...
@@ -1835,21 +1844,27 @@ void WINAPI DOS3Call( CONTEXT86 *context )
case
0x4b
:
/* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */
TRACE
(
"EXEC %s
\n
"
,
(
LPCSTR
)
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
));
AX_reg
(
context
)
=
WinExec16
(
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
),
SW_NORMAL
);
if
(
AX_reg
(
context
)
<
32
)
SET_CFLAG
(
context
);
(
LPCSTR
)
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
));
if
(
ISV86
(
context
))
{
if
(
!
MZ_Exec
(
context
,
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
),
AL_reg
(
context
),
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Ebx
)
))
bSetDOSExtendedError
=
TRUE
;
}
else
{
AX_reg
(
context
)
=
WinExec16
(
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
),
SW_NORMAL
);
if
(
AX_reg
(
context
)
<
32
)
SET_CFLAG
(
context
);
}
break
;
case
0x4c
:
/* "EXIT" - TERMINATE WITH RETURN CODE */
TRACE
(
"EXIT with return code %d
\n
"
,
AL_reg
(
context
));
ExitThread
(
AL_reg
(
context
)
);
MZ_Exit
(
context
,
FALSE
,
AL_reg
(
context
)
);
break
;
case
0x4d
:
/* GET RETURN CODE */
TRACE
(
"GET RETURN CODE (ERRORLEVEL)
\n
"
);
AX_reg
(
context
)
=
0
;
/* normal exit */
AX_reg
(
context
)
=
INT21_GetReturnCode
();
break
;
case
0x4e
:
/* "FINDFIRST" - FIND FIRST MATCHING FILE */
...
...
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