]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/lib_head.h
wwww
[16.git] / src / lib / lib_head.h
index b4b18d6eb4d158ee68a799820e6a3e69fa8da1cd..cf50054db81d27a97944abb6d3e47069ae66b74c 100644 (file)
 
 #ifndef _LIBHEAD_H_
 #define _LIBHEAD_H_
+#include <i86.h>
 #include <dos.h>
 #include <stdio.h>
 #include <conio.h> // just for wait
 #include <time.h> // just for wait
 #include <stdlib.h>
+#include <ctype.h>
 #include "src/lib/types.h"
 
 /* Control codes for all keys on the keyboard */
 #define KEY_MENU               (0x75)
 */
 
-//#define      FARPTR(S, O)    MK_FP(S, O)\r
-\r
-//#define      inportb(P)      inp(P)\r
-//#define      outportb(P,V)   outp(P,V)\r
-//#define      outportw(P,V)   outpw(P,V)\r
-\r
-//#define      R_AX            w.ax\r
-//#define      R_BX            w.bx\r
-//#define      R_BP            w.bp\r
-//#define      R_ES            w.es\r
-\r
-/* WARNING: for 32-bit code, unused fields of regs_t\r
-must be zeroed before using this macro */\r
-//#define      trap(N,R)       intr(N,R)\r
+static dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */
+
+#define        nil     ((void *)0)
+
+#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs)))\r
+#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs)))\r
+#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value))\r
+#define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value))\r
 
 typedef union REGPACK  regs_t;
-typedef        enum    {FALSE,TRUE}    boolean;
+typedef        enum    {false,true}    boolean;
 
 void wait(clock_t wait);
 void* AllocateLargestFreeBlock(size_t* Size);
 size_t GetFreeSize(void);
 long int filesize(FILE *fp);
-
-/* THIS FUNCTION CONVERTS A POINTER TO AN INTEL LONG              */\r
-//int long ptr2long(char *p);
+int US_CheckParm(char *parm,char **strings);
 
 #endif/*_LIBHEAD_H_*/