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);
|
VOID fputbyte(VOID FAR *, UBYTE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef I86
|
#ifndef __WATCOMC__
|
||||||
#define setvec(n, isr) (void)(*(intvec FAR *)MK_FP(0,4 * (n)) = (isr))
|
#define setvec setvec_resident
|
||||||
#endif
|
#endif
|
||||||
|
void setvec(unsigned char intno, intvec vector);
|
||||||
/*#define is_leap_year(y) ((y) & 3 ? 0 : (y) % 100 ? 1 : (y) % 400 ? 0 : 1) */
|
/*#define is_leap_year(y) ((y) & 3 ? 0 : (y) % 100 ? 1 : (y) % 400 ? 0 : 1) */
|
||||||
|
|
||||||
/* ^Break handling */
|
/* ^Break handling */
|
||||||
|
|
|
@ -207,12 +207,15 @@ STATIC void PSPInit(void)
|
||||||
p->ps_cmd.ctBuffer[0] = 0xd; /* command tail */
|
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)
|
void setvec(unsigned char intno, intvec vector)
|
||||||
{
|
{
|
||||||
disable();
|
disable();
|
||||||
*(intvec FAR *)MK_FP(0,4 * intno) = vector;
|
*(intvec FAR *)MK_FP(0,4 * intno) = vector;
|
||||||
enable();
|
enable();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
STATIC void setup_int_vectors(void)
|
STATIC void setup_int_vectors(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,13 @@ static BYTE *RcsId =
|
||||||
+ 1 byte: '\0'
|
+ 1 byte: '\0'
|
||||||
-- 1999/04/21 ska */
|
-- 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)
|
ULONG SftGetFsize(int sft_idx)
|
||||||
{
|
{
|
||||||
sft FAR *s = idx_to_sft(sft_idx);
|
sft FAR *s = idx_to_sft(sft_idx);
|
||||||
|
|
Loading…
Reference in New Issue