mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-03 20:14:28 +02:00
Remove hack in Int 21h AH=38h, revert bad change in _CmdInstall
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1078 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
47137fde93
commit
79be05f804
@ -315,6 +315,7 @@
|
|||||||
- set AX = ES after Int 21h/4Ah (undocumented but expected by BRUN45)
|
- set AX = ES after Int 21h/4Ah (undocumented but expected by BRUN45)
|
||||||
(the last 2 changes needed to fix bugs discovered by Michael Devore)
|
(the last 2 changes needed to fix bugs discovered by Michael Devore)
|
||||||
- added Int 2Fh/2Fh processing to set DOS version as per MS-DOS 4.0
|
- added Int 2Fh/2Fh processing to set DOS version as per MS-DOS 4.0
|
||||||
|
- optimised Int 21h/AH=38h Get Country Information, removed cntry hack
|
||||||
* autoexec.bat now single-line for FreeCOM compatibility when EOL=LF
|
* autoexec.bat now single-line for FreeCOM compatibility when EOL=LF
|
||||||
* break.c: check_handle_break() return was undefined if no Ctrl-break
|
* break.c: check_handle_break() return was undefined if no Ctrl-break
|
||||||
* config.sys: all commands removed as they were close to defaults
|
* config.sys: all commands removed as they were close to defaults
|
||||||
|
@ -2073,8 +2073,8 @@ STATIC void _CmdInstall(PCStr p, int mode)
|
|||||||
if (len > sizeof args.ctBuffer - 2)
|
if (len > sizeof args.ctBuffer - 2)
|
||||||
len = sizeof args.ctBuffer - 2; /* trim too long line */
|
len = sizeof args.ctBuffer - 2; /* trim too long line */
|
||||||
args.ctCount = (UBYTE)len;
|
args.ctCount = (UBYTE)len;
|
||||||
args.ctBuffer[len-2] = '\r';
|
args.ctBuffer[len] = '\r';
|
||||||
args.ctBuffer[len-1] = '\0';
|
args.ctBuffer[len+1] = '\0';
|
||||||
memcpy(args.ctBuffer, p, len);
|
memcpy(args.ctBuffer, p, len);
|
||||||
|
|
||||||
set_strategy(mode);
|
set_strategy(mode);
|
||||||
|
@ -106,8 +106,8 @@ VOID ASMCFUNC int21_syscall(iregs FAR * irp)
|
|||||||
irp->DH = version_flags; /* bit3:runs in ROM,bit 4: runs in HMA */
|
irp->DH = version_flags; /* bit3:runs in ROM,bit 4: runs in HMA */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: /* DOS 7 does not set AL */
|
/* case 0x03: */ /* DOS 7 does not set AL */
|
||||||
case 0x07: /* neither here */
|
/* case 0x07: */ /* neither here */
|
||||||
|
|
||||||
default: /* set AL=0xFF as error, NOT carry */
|
default: /* set AL=0xFF as error, NOT carry */
|
||||||
irp->AL = 0xff;
|
irp->AL = 0xff;
|
||||||
@ -124,10 +124,8 @@ VOID ASMCFUNC int21_syscall(iregs FAR * irp)
|
|||||||
case 0xfd:
|
case 0xfd:
|
||||||
bDumpRdWrParms = !bDumpRdWrParms;
|
bDumpRdWrParms = !bDumpRdWrParms;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Toggle DOS-C syscall trace dump */
|
/* Toggle DOS-C syscall trace dump */
|
||||||
#ifdef DEBUG
|
|
||||||
case 0xfe:
|
case 0xfe:
|
||||||
bDumpRegs = !bDumpRegs;
|
bDumpRegs = !bDumpRegs;
|
||||||
break;
|
break;
|
||||||
@ -596,7 +594,6 @@ dispatch:
|
|||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Unsupported INT21 AH = 0x%x, AL = 0x%x.\n", lr.AH, lr.AL);
|
printf("Unsupported INT21 AH = 0x%x, AL = 0x%x.\n", lr.AH, lr.AL);
|
||||||
#endif
|
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
|
|
||||||
/* CP/M compatibility functions */
|
/* CP/M compatibility functions */
|
||||||
@ -608,6 +605,7 @@ dispatch:
|
|||||||
case 0x61:
|
case 0x61:
|
||||||
#endif
|
#endif
|
||||||
case 0x6b:
|
case 0x6b:
|
||||||
|
#endif
|
||||||
lr.AL = 0;
|
lr.AL = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -731,10 +729,9 @@ dispatch:
|
|||||||
UBYTE FAR *retp = MK_FP(r->cs, r->ip);
|
UBYTE FAR *retp = MK_FP(r->cs, r->ip);
|
||||||
|
|
||||||
if (retp[0] == 0x3d && /* cmp ax, xxyy */
|
if (retp[0] == 0x3d && /* cmp ax, xxyy */
|
||||||
(retp[3] == 0x75 || retp[3] == 0x74)) /* je/jne error */
|
retp[3] == 0x74) /* jne error */
|
||||||
{
|
{
|
||||||
lr.AL = retp[1];
|
lr.AX = *(UWORD FAR *)&retp[1];
|
||||||
lr.AH = retp[2];
|
|
||||||
}
|
}
|
||||||
#if TOM /* Disable the much rarer case to save code size. The only MS-DOS
|
#if TOM /* Disable the much rarer case to save code size. The only MS-DOS
|
||||||
* utility featuring it is DOSKEY, and FreeCom almost replaces it
|
* utility featuring it is DOSKEY, and FreeCom almost replaces it
|
||||||
@ -836,30 +833,18 @@ dispatch:
|
|||||||
/* Get/Set Country Info */
|
/* Get/Set Country Info */
|
||||||
case 0x38:
|
case 0x38:
|
||||||
{
|
{
|
||||||
UWORD cntry = lr.AL;
|
if (lr.AL != 0xff)
|
||||||
|
lr.BX = lr.AL;
|
||||||
if (cntry == 0xff)
|
|
||||||
cntry = lr.BX;
|
|
||||||
|
|
||||||
if (0xffff == lr.DX)
|
if (0xffff == lr.DX)
|
||||||
{
|
{
|
||||||
/* Set Country Code */
|
/* Set Country Code */
|
||||||
rc = DosSetCountry(cntry);
|
rc = DosSetCountry(lr.BX);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cntry == 0)
|
|
||||||
cntry--;
|
|
||||||
/* Get Country Information */
|
/* Get Country Information */
|
||||||
rc = DosGetCountryInformation(cntry, FP_DS_DX);
|
rc = DosGetCountryInformation(lr.BX ? lr.BX : NLS_DEFAULT, FP_DS_DX);
|
||||||
if (rc >= SUCCESS)
|
|
||||||
{
|
|
||||||
/* HACK FIXME */
|
|
||||||
if (cntry == (UWORD) - 1)
|
|
||||||
cntry = 1;
|
|
||||||
/* END OF HACK */
|
|
||||||
lr.AX = lr.BX = cntry;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
goto short_check;
|
goto short_check;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user