From 5a6e1845a8ab83ee02edd990fb6c3904b4608fc3 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 4 May 2004 09:34:47 +0000 Subject: [PATCH] Made int21/ah=25,35 reentrant. Solves problem with Intel PRO/1000 driver. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@919 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/entry.asm | 4 ++++ kernel/inthndlr.c | 26 ++++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/kernel/entry.asm b/kernel/entry.asm index add900c..9a46702 100644 --- a/kernel/entry.asm +++ b/kernel/entry.asm @@ -232,8 +232,12 @@ int21_reentry: mov dx,[cs:_DGROUP_] mov ds,dx + cmp ah,25h + je int21_user cmp ah,33h je int21_user + cmp ah,35h + je int21_user cmp ah,50h je int21_user cmp ah,51h diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 055f3d8..535f7b7 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -69,6 +69,11 @@ VOID ASMCFUNC int21_syscall(iregs FAR * irp) switch (irp->AH) { + /* Set Interrupt Vector */ + case 0x25: + setvec(irp->AL, MK_FP(irp->DS, irp->DX)); + break; + /* DosVars - get/set dos variables */ case 0x33: switch (irp->AL) @@ -139,6 +144,15 @@ VOID ASMCFUNC int21_syscall(iregs FAR * irp) } break; + /* Get Interrupt Vector */ + case 0x35: + { + intvec p = getvec(irp->AL); + irp->ES = FP_SEG(p); + irp->BX = FP_OFF(p); + break; + } + /* Set PSP */ case 0x50: cu_psp = irp->BX; @@ -638,9 +652,7 @@ dispatch: break; /* Set Interrupt Vector */ - case 0x25: - setvec(lr.AL, FP_DS_DX); - break; + /* case 0x25: handled above (re-entrant) */ /* Dos Create New Psp */ case 0x26: @@ -788,13 +800,7 @@ dispatch: break; /* Get Interrupt Vector */ - case 0x35: - { - intvec p = getvec((COUNT) lr.AL); - lr.ES = FP_SEG(p); - lr.BX = FP_OFF(p); - } - break; + /* case 0x35: handled above (reentrant) */ /* Dos Get Disk Free Space */ case 0x36: