diff --git a/kernel/globals.h b/kernel/globals.h index 98aa4c7..c200fdb 100644 --- a/kernel/globals.h +++ b/kernel/globals.h @@ -408,9 +408,10 @@ VOID fputword(VOID FAR *, UWORD); VOID fputbyte(VOID FAR *, UBYTE); #endif -#ifdef I86 -#define setvec(n, isr) (void)(*(intvec FAR *)MK_FP(0,4 * (n)) = (isr)) +#ifndef __WATCOMC__ +#define setvec setvec_resident #endif +void setvec(unsigned char intno, intvec vector); /*#define is_leap_year(y) ((y) & 3 ? 0 : (y) % 100 ? 1 : (y) % 400 ? 0 : 1) */ /* ^Break handling */ diff --git a/kernel/main.c b/kernel/main.c index f59593f..1a48a59 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -207,12 +207,15 @@ STATIC void PSPInit(void) p->ps_cmd.ctBuffer[0] = 0xd; /* command tail */ } +#ifndef __WATCOMC__ +/* for WATCOMC we can use the one in task.c */ void setvec(unsigned char intno, intvec vector) { disable(); *(intvec FAR *)MK_FP(0,4 * intno) = vector; enable(); } +#endif STATIC void setup_int_vectors(void) { diff --git a/kernel/task.c b/kernel/task.c index 236b4cc..6ad97dc 100644 --- a/kernel/task.c +++ b/kernel/task.c @@ -65,6 +65,13 @@ static BYTE *RcsId = + 1 byte: '\0' -- 1999/04/21 ska */ +void setvec(unsigned char intno, intvec vector) +{ + disable(); + *(intvec FAR *)MK_FP(0,4 * intno) = vector; + enable(); +} + ULONG SftGetFsize(int sft_idx) { sft FAR *s = idx_to_sft(sft_idx);