/* DIO.c : Write DO and read DI.(text file)(advanced) Compiler: BC++ 3.1, Turbo C ++ 1.01(3.01) (free from http://community.borland.com/museum) MSC 6.0, MSVC 1.52. Compile mode: large Project: DIO.c ..\Lib\(8000E.Lib,7188XAL.Lib,7188XBL.Lib,7188XL.Lib or 7188EL.Lib) Hardware: 7188/8000 [24 May,2005] by Bill */ #include"..\lib\7188Xb.h" void SetDo(int DO1); void ShowDI(void); void main() { int x; InitLib(); for(;;) { SetDo(1); //DO ON ShowDI(); Getch(); SetDo(0); //DO OFF ShowDI(); Getch(); } } void ShowDI(void) { Print("DI=%s\n\r",GetDi1()?"High":"Low"); Print("Press any key to continue..."); } void SetDo(int DO1) { Print("\n\rSet DO1 to %s\n\r",DO1?"High":"Low"); if(DO1) { SetDoHigh(); } else { SetDoLow(); } }