diff options
| author | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2015-10-05 08:38:46 -0400 |
|---|---|---|
| committer | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2015-10-05 08:38:46 -0400 |
| commit | 99cf9c4dc5855b1f5f26d00267fdbbe672ee27a7 (patch) | |
| tree | 83a11a0dc0f87198e251ca7ec19504aeec152bc1 /f_init.c | |
| download | foslib-master.tar.gz foslib-master.zip | |
Diffstat (limited to 'f_init.c')
| -rw-r--r-- | f_init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/f_init.c b/f_init.c new file mode 100644 index 0000000..b136145 --- /dev/null +++ b/f_init.c @@ -0,0 +1,19 @@ +#include "fossil.h"
+#include <dos.h>
+#include <stdlib.h>
+
+int F_Init(void)
+{
+ union REGS regs;
+ regs.h.al = 0;
+ regs.h.ah = 0x04; /* function = initialize driver */
+ regs.x.dx = (unsigned char) port;
+ regs.x.bx = 0; /* no ^C */
+ int86(FOSSIL_INT, ®s, ®s);
+ if (regs.x.ax != 0x1954)
+ return (FALSE); /* unable to initialize fossil */
+ else if (regs.h.bl < 0x18 || regs.h.bh < 5) {
+ return (FALSE);
+ } else
+ return (TRUE);
+}
|
