Convert setvec into a function for the resident code (mostly from Lucho).

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@928 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-05-10 20:15:37 +00:00
parent 258877b44b
commit 7a16abbfb2
3 changed files with 13 additions and 2 deletions

View File

@ -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 */

View File

@ -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)
{

View File

@ -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);