mirror of https://github.com/FDOS/kernel.git
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:
parent
258877b44b
commit
7a16abbfb2
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue