1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45:
46:
47: 48: 49: 50:
51:
52: #include <basic.h>
53: #include <stdlib.h>
54: #include <stdio.h>
55: #include <string.h>
56: #include <tk/tkernel.h>
57: #include <tm/tmonitor.h>
58:
59:
60: IMPORT ER ConsoleIO( INT ac, UB *av[] );
61: IMPORT ER ClockDrv( INT ac, UB *av[] );
62: IMPORT ER SysDiskDrv( INT ac, UB *av[] );
63: IMPORT ER ScreenDrv( INT ac, UB *av[] );
64: IMPORT ER KbPdDrv( INT ac, UB *av[] );
65: IMPORT ER LowKbPdDrv( INT ac, UB *av[] );
66: IMPORT ER NetDrv( INT ac, UB *av[] );
67:
68:
69: IMPORT ER dt_main( INT ac, UB* av[] );
70: IMPORT ER pm_main( INT ac, UB* av[] );
71: IMPORT ER fs_main( INT ac, UB* av[] );
72: IMPORT ER so_main( INT ac, UB* av[] );
73:
74:
75: IMPORT void appl_main(void);
76:
77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88:
89: EXPORT INT usermain( void )
90: {
91: ER err;
92:
93:
94: #ifdef DRV_CONSOLE
95: err = ConsoleIO(0, NULL);
96: tm_putstring(err >= E_OK ? "ConsoleIO - OK\n" : "ConsoleIO - ERR\n");
97: #endif
98: #ifdef DRV_CLOCK
99: err = ClockDrv(0, NULL);
100: tm_putstring(err >= E_OK ? "ClockDrv - OK\n" : "ClockDrv - ERR\n");
101: #endif
102: #ifdef DRV_SYSDISK
103: err = SysDiskDrv(0, NULL);
104: tm_putstring(err >= E_OK ? "SysDiskDrv - OK\n" : "SysDiskDrv - ERR\n");
105: #endif
106: #ifdef DRV_SCREEN
107: err = ScreenDrv(0, NULL);
108: tm_putstring(err >= E_OK ? "ScreenDrv - OK\n" : "ScreenDrv - ERR\n");
109: #endif
110: #ifdef DRV_KBPD
111: err = KbPdDrv(0, NULL);
112: tm_putstring(err >= E_OK ? "KbPdDrv - OK\n" : "KbPdDrv - ERR\n");
113: #endif
114: #ifdef DRV_LOWKBPD
115: err = LowKbPdDrv(0, NULL);
116: tm_putstring(err >= E_OK ? "LowKbPdDrv - OK\n" : "LowKbPdDrv - ERR\n");
117: #endif
118: #ifdef DRV_NET
119: err = NetDrv(0, NULL);
120: tm_putstring(err >= E_OK ? "NetDrv - OK\n" : "NetDrv - ERR\n");
121: #endif
122:
123:
124: #ifdef USE_T2EX_DT
125: err = dt_main(0, NULL);
126: tm_putstring(err >= E_OK ? "dt_main(0) - OK\n":"dt_main(0) - ERR\n");
127: #endif
128: #ifdef USE_T2EX_PM
129: err = pm_main(0, NULL);
130: tm_putstring(err >= E_OK ? "pm_main(0) - OK\n":"pm_main(0) - ERR\n");
131: #endif
132: #ifdef USE_T2EX_FS
133: err = fs_main(0, NULL);
134: tm_putstring(err >= E_OK ? "fs_main(0) - OK\n":"fs_main(0) - ERR\n");
135: #endif
136: #ifdef USE_T2EX_NET
137: err = so_main(0, NULL);
138: tm_putstring(err >= E_OK ? "so_main(0) - OK\n":"so_main(0) - ERR\n");
139: #endif
140:
141:
142: libc_stdio_init();
143:
144:
145: tm_putstring("*** T2EX Application program start !!\n");
146: appl_main();
147:
148:
149: #ifdef USE_T2EX_DT
150: err = dt_main(-1, NULL);
151: tm_putstring(err >= E_OK ? "dt_main(-1) - OK\n":"dt_main(-1) - ERR\n");
152: #endif
153: #ifdef USE_T2EX_PM
154: err = pm_main(-1, NULL);
155: tm_putstring(err >= E_OK ? "pm_main(-1) - OK\n":"pm_main(-1) - ERR\n");
156: #endif
157: #ifdef USE_T2EX_FS
158: err = fs_main(-1, NULL);
159: tm_putstring(err >= E_OK ? "fs_main(-1) - OK\n":"fs_main(-1) - ERR\n");
160: #endif
161: #ifdef USE_T2EX_NET
162: err = so_main(-1, NULL);
163: tm_putstring(err >= E_OK ? "so_main(-1) - OK\n":"so_main(-1) - ERR\n");
164: #endif
165:
166:
167: #ifdef DRV_NET
168: NetDrv(-1, NULL);
169: #endif
170: #ifdef DRV_LOWKBPD
171: LowKbPdDrv(-1, NULL);
172: #endif
173: #ifdef DRV_KBPD
174: KbPdDrv(-1, NULL);
175: #endif
176: #ifdef DRV_SCREEN
177: ScreenDrv(-1, NULL);
178: #endif
179: #ifdef DRV_SYSDISK
180: SysDiskDrv(-1, NULL);
181: #endif
182: #ifdef DRV_CLOCK
183: ClockDrv(-1, NULL);
184: #endif
185: #ifdef DRV_CONSOLE
186: ConsoleIO(-1, NULL);
187: #endif
188:
189: return 0;
190: }
191: