/* 1. Compiler: TC 2.0 2. Mode: Large 3. Project: Nvram-r.prj Nvram-r.c ..\lib\8000l.lib ..\lib\tcpipl.lib 4. Explain: To read the value writed in peer address of navram. 5. Hordware: 8831 with RTC It's compiled by Tony ------------------------------------------------------------------ * #include #include #include #include #include #include"..\LIB\8000.h" #include"..\LIB\vxcomm.h" /*----------------------------------------------------------------*/ void main(void) { int addr=0; 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; } while(addr<31) { DelayMs(10); Print("\n\rThe valume of writing to NVRAM address %d is %d",addr,ReadNVRAM(addr)); addr=addr++; } }