diff --git a/include/miscemu.h b/include/miscemu.h index 2314389574ea528237a73a4f3a17f78904dbc488..61b2f34b75905ec176d08293a8aeca01c04d0268 100644 --- a/include/miscemu.h +++ b/include/miscemu.h @@ -55,9 +55,15 @@ extern void WINAPI INT_Int10Handler(CONTEXT*); /* msdos/int11.c */ extern void WINAPI INT_Int11Handler(CONTEXT*); +/* msdos/int12.c */ +extern void WINAPI INT_Int12Handler(CONTEXT*); + /* msdos/int13.c */ extern void WINAPI INT_Int13Handler(CONTEXT*); +/* msdos/int15.c */ +extern void WINAPI INT_Int15Handler(CONTEXT*); + /* msdos/int16.c */ extern void WINAPI INT_Int16Handler(CONTEXT*); diff --git a/msdos/int10.c b/msdos/int10.c index d4464d36768434311b221510d956a77c71d9fa4f..ad95f8adb3698f9b5a0865d760209b57dca89ff7 100644 --- a/msdos/int10.c +++ b/msdos/int10.c @@ -18,6 +18,8 @@ static void scroll_window(int direction, char lines, char row1, static int color_pallet[16]; +static char dummy; /* dummy var used for unneeded CONSOLE function parameter */ + #define SCROLL_UP 1 #define SCROLL_DOWN 2 @@ -188,8 +190,13 @@ void WINAPI INT_Int10Handler( CONTEXT *context ) break; case 0x08: /* READ CHARACTER AND ATTRIBUTE AT CURSOR POSITION */ - FIXME(int10, - "Read Character and Attribute at Cursor Position - Not Supported\n"); + { + CHAR ch, attr; + TRACE(int10, "Read Character and Attribute at Cursor Position\n"); + CONSOLE_GetCharacterAtCursor(&ch, &dummy, &dummy, &attr); + AL_reg(context) = ch; + AH_reg(context) = attr; + } break; case 0x09: /* WRITE CHARACTER AND ATTRIBUTE AT CURSOR POSITION */ diff --git a/msdos/int21.c b/msdos/int21.c index 31e7c3bd939a75dff18e56a9333d7341aff2540f..7ffb40f6f710582564fcc00c79ec31308096008b 100644 --- a/msdos/int21.c +++ b/msdos/int21.c @@ -1155,8 +1155,12 @@ void WINAPI DOS3Call( CONTEXT *context ) DS_reg(context),DX_reg(context) ); { LPSTR data = CTX_SEG_OFF_TO_LIN(context,DS_reg(context),EDX_reg(context)); - LONG length = strchr(data,'$')-data; - _hwrite16( 1, data, length); + LPSTR p = data; + /* do NOT use strchr() to calculate the string length, + as '\0' is valid string content, too ! + Maybe we should check for non-'$' strings, but DOS doesn't. */ + while (*p != '$') p++; + _hwrite16( 1, data, (int)p - (int)data); AL_reg(context) = '$'; /* yes, '$' (0x24) gets returned in AL */ } break; diff --git a/msdos/interrupts.c b/msdos/interrupts.c index f18615f01d7878489511e190dd80510e48522699..e1bf56b520488794a5352f96cd882ec37f8ca332 100644 --- a/msdos/interrupts.c +++ b/msdos/interrupts.c @@ -111,9 +111,15 @@ int INT_RealModeInterrupt( BYTE intnum, PCONTEXT context ) case 0x11: INT_Int11Handler(context); break; + case 0x12: + INT_Int12Handler(context); + break; case 0x13: INT_Int13Handler(context); break; + case 0x15: + INT_Int15Handler(context); + break; case 0x16: INT_Int16Handler(context); break;