/* Hello.c: Retrieving the version number of library and the size of built-in Flash memory. Compiler: BC++ 3.1, Turbo C++ 1.01 (3.01), MSVC 1.52 Compile mode: large Project: Hello.c ..\..\Lib\upac5000.lib Description The MiniOS7 Utility can be used to load hello.exe to uPAC-5000. Hardware: uPAC-5000 [Dec 21, 2011] by Liam */ #include "..\..\lib\upac5000.h" void main(void) { int iType, iVer; InitLib(); /* InitLib() must be called before other functions in the library may be used */ iType=IsuP5000(); if(iType) { iVer=GetLibVersion(); Print("Hello uPAC-5000! (Flash memory is %d Kbytes)\r\n", iType); Print("Library version is %d.%02d\r\n", iVer>>8, iVer&0xff); } else { Print("Hello PC!, this program is not run under uPAC-5000."); } }