/* 1. Compiler: TC 2.0 2. Mode: Large 3. Project: Hello.prj Hello.c ..\lib\8000l.lib ..\lib\tcpipl.lib 4. Explain: (1). To detect the current operation system. (2). If you used this program in minios7,it will show 8831's version and "*** Hello 8831! ***." (3). If you used this program in pure dos or dos-box in win98, it will show "Hello PC!, this program is not run under 8831." 5. Hordware: 8831 It's compiled by Tony ----------------------------------------------------------------------------------- */ #include #include #include #include #include #include"..\LIB\8000.h" #include"..\LIB\vxcomm.h" /*-----------------------------------------------------------------------------------*/ void main(void) { int type; int ver; type=Is8000(); /*detect the current operation system*/ if(type) { ver=GetLibVersion(); Print("Hello 8831! (Flash memory is %d K)\n\r",type); Print("Library version is %d.%02d",ver>>8,ver&0xff); } else { Print("Hello PC!, this program is not run under 8831."); return; } Puts("*** Hello 8831! ***\n\r"); }