home *** CD-ROM | disk | FTP | other *** search
- 1 typedef unsigned int size_t;
- 2 extern void * memcpy(void *, const void *, size_t);
- 3 extern char * strncpy(char *, const char *, size_t);
- 4
- 5 typedef enum {FALSE, TRUE} BOOLEAN;
- 6 typedef unsigned BITSET;
- 7 typedef void (*PROC)(void);
- 8 typedef unsigned *ADDRESS;
- 9 typedef unsigned char BYTE;
- 10 typedef unsigned WORD;
- 11
- 12 extern int m2c_iabs(int);
- 13 extern long m2c_liabs(long);
- 14 extern double m2c_fabs(double);
- 15 extern unsigned char m2c_cap(unsigned char);
- 16 extern BOOLEAN m2c_in(unsigned, BITSET);
- 17 extern void NEWPROCESS(PROC, ADDRESS, unsigned, ADDRESS *);
- 18 extern void TRANSFER(ADDRESS *, ADDRESS *);
- 19 extern void HALT(void);
- 20 extern void ENABLE(void);
- 21 extern void DISABLE(void);
- 22
- 23 typedef struct ASTORE__0
- 24 {
- 25 unsigned KEY;
- 26 ADDRESS DATA;
- 27 } ASTORE_ASSOC;
- 28 BOOLEAN ASTORE_PUT(unsigned, ADDRESS);
- 29 ADDRESS ASTORE_GET(unsigned);
- 30 typedef unsigned ASTORE_ARANGE;
- 31 typedef unsigned ASTORE_EXTRANGE;
- 32 static ASTORE_EXTRANGE ASTORE_LAST;
- 33 static ASTORE_ASSOC ASTORE_STORE[99];
- 34 static ASTORE_EXTRANGE ASTORE_IND(unsigned);
- 35
- 36 static ASTORE_EXTRANGE ASTORE_IND(K)
- 37 unsigned K;
- 38 {
- 39 ASTORE_ARANGE I;
- 40 if (1 <= ASTORE_LAST)
- 41 {
- 42 for (I = 1; I <= ASTORE_LAST; I += 1)
- 43 {
- 44 if (ASTORE_STORE[I - 1].KEY == K)
- 45 return I;
- 46 if (I >= 99)
- 47 break;
- 48 }
- 49 }
- 50 return 0;
- 51 }
- 52
- 53
- 54 BOOLEAN ASTORE_PUT(K, D)
- 55 unsigned K;
- 56 ADDRESS D;
- 57 {
- 58 ASTORE_ARANGE I;
- 59 I = ASTORE_IND(K);
- 60 if (I == 0)
- 61 if (ASTORE_LAST < 99)
- 62 {
- 63 ASTORE_LAST = ASTORE_LAST + 1;
- 64 I = ASTORE_LAST;
- 65 }
- 66 else
- 67 return FALSE;
- 68 {
- 69 ASTORE_ASSOC *_0;
- 70 _0 = (ASTORE_ASSOC *)&ASTORE_STORE[I - 1];
- 71 (*_0).KEY = K;
- 72 (*_0).DATA = D;
- 73 }
- 74 return TRUE;
- 75 }
- 76
- 77
- 78 ADDRESS ASTORE_GET(K)
- 79 unsigned K;
- 80 {
- 81 ASTORE_ARANGE I;
- 82 I = ASTORE_IND(K);
- 83 if (I == 0)
- 84 return (ADDRESS)0;
- 85 else
- 86 return ASTORE_STORE[I - 1].DATA;
- 87 }
- 88
- 89
- 90 void ASTORE_7C576C970CF0(void)
- 91 {
- 92 static unsigned char _init = 0;
- 93 if (!_init)
- 94 {
- 95 _init = 1;
- 96 ASTORE_LAST = 0;
- 97 }
- 98
- 99 }
- 100
-