mirror of https://github.com/FDOS/kernel.git
Convert getvec into a C function.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@929 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
7a16abbfb2
commit
e68f66db37
|
@ -22,9 +22,9 @@
|
||||||
#AFLAGS = /Mx /Dmem$(MODEL)=1
|
#AFLAGS = /Mx /Dmem$(MODEL)=1
|
||||||
#LIBFLAGS = /c
|
#LIBFLAGS = /c
|
||||||
|
|
||||||
OBJS = floppy.obj getvec.obj rdpcclk.obj wrpcclk.obj wratclk.obj
|
OBJS = floppy.obj rdpcclk.obj wrpcclk.obj wratclk.obj
|
||||||
|
|
||||||
LIBOBJS= +floppy +getvec +rdpcclk +wrpcclk +wratclk
|
LIBOBJS= +floppy +rdpcclk +wrpcclk +wratclk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
filelist
1
filelist
|
@ -28,7 +28,6 @@
|
||||||
*/*/docs/readme.txt
|
*/*/docs/readme.txt
|
||||||
*/*/docs/sys.txt
|
*/*/docs/sys.txt
|
||||||
*/*/drivers/floppy.asm
|
*/*/drivers/floppy.asm
|
||||||
*/*/drivers/getvec.asm
|
|
||||||
*/*/drivers/makefile
|
*/*/drivers/makefile
|
||||||
*/*/drivers/rdpcclk.asm
|
*/*/drivers/rdpcclk.asm
|
||||||
*/*/drivers/wratclk.asm
|
*/*/drivers/wratclk.asm
|
||||||
|
|
|
@ -375,12 +375,11 @@ VOID ASMCFUNC FAR restore_stack(VOID);
|
||||||
ULONG ASMPASCAL ReadPCClock(VOID);
|
ULONG ASMPASCAL ReadPCClock(VOID);
|
||||||
VOID ASMPASCAL WriteATClock(BYTE *, BYTE, BYTE, BYTE);
|
VOID ASMPASCAL WriteATClock(BYTE *, BYTE, BYTE, BYTE);
|
||||||
VOID ASMPASCAL WritePCClock(ULONG);
|
VOID ASMPASCAL WritePCClock(ULONG);
|
||||||
intvec ASMPASCAL getvec(UWORD);
|
intvec getvec(unsigned char);
|
||||||
#ifdef __WATCOMC__
|
#ifdef __WATCOMC__
|
||||||
#pragma aux (pascal) ReadPCClock modify exact [ax cx dx]
|
#pragma aux (pascal) ReadPCClock modify exact [ax cx dx]
|
||||||
#pragma aux (pascal) WriteATClock modify exact [ax bx cx dx]
|
#pragma aux (pascal) WriteATClock modify exact [ax bx cx dx]
|
||||||
#pragma aux (pascal) WritePCClock modify exact [ax cx dx]
|
#pragma aux (pascal) WritePCClock modify exact [ax cx dx]
|
||||||
#pragma aux (pascal) getvec modify exact [ax bx dx es]
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -101,7 +101,10 @@ extern BYTE DosLoadedInHMA;
|
||||||
void MoveKernel(unsigned NewKernelSegment);
|
void MoveKernel(unsigned NewKernelSegment);
|
||||||
|
|
||||||
void setvec(unsigned char intno, intvec vector);
|
void setvec(unsigned char intno, intvec vector);
|
||||||
#define getvec(n) (*(intvec FAR *)MK_FP(0,4 * (n)))
|
#ifndef __WATCOMC__
|
||||||
|
#define getvec init_getvec
|
||||||
|
#endif
|
||||||
|
intvec getvec(unsigned char intno);
|
||||||
|
|
||||||
#define GLOBAL extern
|
#define GLOBAL extern
|
||||||
#define NAMEMAX MAX_CDSPATH /* Maximum path for CDS */
|
#define NAMEMAX MAX_CDSPATH /* Maximum path for CDS */
|
||||||
|
|
|
@ -71,7 +71,7 @@ VOID ASMCFUNC int21_syscall(iregs FAR * irp)
|
||||||
{
|
{
|
||||||
/* Set Interrupt Vector */
|
/* Set Interrupt Vector */
|
||||||
case 0x25:
|
case 0x25:
|
||||||
setvec(irp->AL, MK_FP(irp->DS, irp->DX));
|
setvec(irp->AL, (intvec)MK_FP(irp->DS, irp->DX));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* DosVars - get/set dos variables */
|
/* DosVars - get/set dos variables */
|
||||||
|
|
|
@ -208,7 +208,16 @@ STATIC void PSPInit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WATCOMC__
|
#ifndef __WATCOMC__
|
||||||
/* for WATCOMC we can use the one in task.c */
|
/* for WATCOMC we can use the ones in task.c */
|
||||||
|
intvec getvec(unsigned char intno)
|
||||||
|
{
|
||||||
|
intvec iv;
|
||||||
|
disable();
|
||||||
|
iv = *(intvec FAR *)MK_FP(0,4 * (intno));
|
||||||
|
enable();
|
||||||
|
return iv;
|
||||||
|
}
|
||||||
|
|
||||||
void setvec(unsigned char intno, intvec vector)
|
void setvec(unsigned char intno, intvec vector)
|
||||||
{
|
{
|
||||||
disable();
|
disable();
|
||||||
|
|
|
@ -65,6 +65,15 @@ static BYTE *RcsId =
|
||||||
+ 1 byte: '\0'
|
+ 1 byte: '\0'
|
||||||
-- 1999/04/21 ska */
|
-- 1999/04/21 ska */
|
||||||
|
|
||||||
|
intvec getvec(unsigned char intno)
|
||||||
|
{
|
||||||
|
intvec iv;
|
||||||
|
disable();
|
||||||
|
iv = *(intvec FAR *)MK_FP(0,4 * (intno));
|
||||||
|
enable();
|
||||||
|
return iv;
|
||||||
|
}
|
||||||
|
|
||||||
void setvec(unsigned char intno, intvec vector)
|
void setvec(unsigned char intno, intvec vector)
|
||||||
{
|
{
|
||||||
disable();
|
disable();
|
||||||
|
@ -488,7 +497,7 @@ COUNT DosComLoader(BYTE FAR * namep, exec_blk * exp, COUNT mode, COUNT fd)
|
||||||
psp FAR *p;
|
psp FAR *p;
|
||||||
|
|
||||||
/* point to the PSP so we can build it */
|
/* point to the PSP so we can build it */
|
||||||
setvec(0x22, MK_FP(user_r->CS, user_r->IP));
|
setvec(0x22, (intvec)MK_FP(user_r->CS, user_r->IP));
|
||||||
child_psp(mem, cu_psp, mem + asize);
|
child_psp(mem, cu_psp, mem + asize);
|
||||||
|
|
||||||
fcbcode = patchPSP(mem - 1, env, exp, namep);
|
fcbcode = patchPSP(mem - 1, env, exp, namep);
|
||||||
|
@ -739,7 +748,7 @@ COUNT DosExeLoader(BYTE FAR * namep, exec_blk * exp, COUNT mode, COUNT fd)
|
||||||
UWORD fcbcode;
|
UWORD fcbcode;
|
||||||
|
|
||||||
/* point to the PSP so we can build it */
|
/* point to the PSP so we can build it */
|
||||||
setvec(0x22, MK_FP(user_r->CS, user_r->IP));
|
setvec(0x22, (intvec)MK_FP(user_r->CS, user_r->IP));
|
||||||
child_psp(mem, cu_psp, mem + asize);
|
child_psp(mem, cu_psp, mem + asize);
|
||||||
|
|
||||||
fcbcode = patchPSP(mem - 1, env, exp, namep);
|
fcbcode = patchPSP(mem - 1, env, exp, namep);
|
||||||
|
|
Loading…
Reference in New Issue