Author: aandrejevic
Date: Tue Mar 31 21:45:12 2015
New Revision: 67003
URL: http://svn.reactos.org/svn/reactos?rev=67003&view=rev
Log:
[NTVDM]
INT 21h, AH = OAh - Special characters should be echoed onto
the screen (like ^A, etc...) and appended to the buffer.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] Tue Mar 31 21:45:12 2015
@@ -1539,6 +1539,9 @@
/* Ctrl-C */
case 0x03:
{
+ DosPrintCharacter(DOS_OUTPUT_HANDLE, '^');
+ DosPrintCharacter(DOS_OUTPUT_HANDLE, 'C');
+
if (DosControlBreak()) return;
break;
}
@@ -1561,15 +1564,19 @@
default:
{
- if (Character == 0x0A || Character == 0x0D
- || (Character >= 0x20 && Character <= 0x7F))
+ /* Append it to the buffer */
+ InputBuffer->Buffer[Count] = Character;
+ Count++; /* Carriage returns are also counted */
+
+ /* Check if this is a special character */
+ if (Character < 0x20 && Character != 0x0A && Character != 0x0D)
{
- /* Echo the character and append it to the buffer */
- DosPrintCharacter(DOS_OUTPUT_HANDLE, Character);
- InputBuffer->Buffer[Count] = Character;
-
- Count++; /* Carriage returns are also counted */
+ DosPrintCharacter(DOS_OUTPUT_HANDLE, '^');
+ Character += 'A' - 1;
}
+
+ /* Echo the character */
+ DosPrintCharacter(DOS_OUTPUT_HANDLE, Character);
}
}