Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7e94af47
Commit
7e94af47
authored
Apr 03, 2002
by
Jukka Heinonen
Committed by
Alexandre Julliard
Apr 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect DOS writes to stdout/console to DOSVM_PutChar.
parent
f31c3e38
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
5 deletions
+40
-5
dosexe.h
dlls/winedos/dosexe.h
+1
-0
int10.c
dlls/winedos/int10.c
+21
-1
int21.c
dlls/winedos/int21.c
+16
-2
int29.c
dlls/winedos/int29.c
+2
-2
No files found.
dlls/winedos/dosexe.h
View file @
7e94af47
...
...
@@ -79,6 +79,7 @@ extern BYTE WINAPI DOSVM_Int09ReadScan(BYTE*ascii);
/* int10.c */
extern
void
WINAPI
DOSVM_Int10Handler
(
CONTEXT86
*
);
extern
void
WINAPI
DOSVM_PutChar
(
BYTE
ascii
);
/* int16.c */
extern
void
WINAPI
DOSVM_Int16Handler
(
CONTEXT86
*
);
...
...
dlls/winedos/int10.c
View file @
7e94af47
...
...
@@ -27,6 +27,7 @@
#include "vga.h"
#include "wine/debug.h"
#include "console.h"
#include "dosexe.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
...
...
@@ -548,7 +549,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context )
case
0x0e
:
/* TELETYPE OUTPUT */
TRACE
(
"Teletype Output
\n
"
);
CONSOLE_Write
(
AL_reg
(
context
),
0
,
0
,
0
);
DOSVM_PutChar
(
AL_reg
(
context
)
);
break
;
case
0x0f
:
/* GET CURRENT VIDEO MODE */
...
...
@@ -826,3 +827,22 @@ static void scroll_window(int direction, char lines, char row1,
}
}
/**********************************************************************
* DOSVM_PutChar
*
*/
void
WINAPI
DOSVM_PutChar
(
BYTE
ascii
)
{
BIOSDATA
*
data
=
DOSMEM_BiosData
();
unsigned
xpos
,
ypos
;
TRACE
(
"char: 0x%02x
\n
"
,
ascii
);
// FIXME: Update VGA text buffers here...
WriteFile
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
&
ascii
,
1
,
NULL
,
NULL
);
VGA_GetCursorPos
(
&
xpos
,
&
ypos
);
BIOS_SetCursorPos
(
data
,
0
,
xpos
,
ypos
);
}
dlls/winedos/int21.c
View file @
7e94af47
...
...
@@ -92,7 +92,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
case
0x02
:
/* WRITE CHARACTER TO STANDARD OUTPUT */
TRACE
(
"Write Character to Standard Output
\n
"
);
CONSOLE_Write
(
DL_reg
(
context
),
0
,
0
,
0
);
DOSVM_PutChar
(
DL_reg
(
context
)
);
break
;
case
0x06
:
/* DIRECT CONSOLE IN/OUTPUT */
...
...
@@ -123,7 +123,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
}
}
else
{
TRACE
(
"Direct Console Output
\n
"
);
CONSOLE_Write
(
DL_reg
(
context
),
0
,
0
,
0
);
DOSVM_PutChar
(
DL_reg
(
context
)
);
}
break
;
...
...
@@ -163,6 +163,20 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
}
break
;
case
0x40
:
/* WRITE TO FILE OR DEVICE */
/* Writes to stdout are handled here. */
if
(
BX_reg
(
context
)
==
1
)
{
BYTE
*
ptr
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
);
int
i
;
for
(
i
=
0
;
i
<
CX_reg
(
context
);
i
++
)
DOSVM_PutChar
(
ptr
[
i
]);
}
else
DOS3Call
(
context
);
break
;
case
0x44
:
/* IOCTL */
DOSVM_Int21Handler_Ioctl
(
context
);
break
;
...
...
dlls/winedos/int29.c
View file @
7e94af47
...
...
@@ -24,6 +24,7 @@
#include "console.h"
#include "miscemu.h"
#include "dosexe.h"
/**********************************************************************
* DOSVM_Int29Handler
...
...
@@ -33,6 +34,5 @@
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT86
*
context
)
{
/* Yes, it seems that this is really all this interrupt does. */
CONSOLE_Write
(
AL_reg
(
context
),
0
,
0
,
0
);
DOSVM_PutChar
(
AL_reg
(
context
)
);
}
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