/* 1. Compiler: TC 2.0 2. Mode: Large 3. Project: Flash-r.prj Flash-r.c ..\lib\8000l.lib ..\lib\tcpipl.lib 4. Explain: To read the value writing in flash memory address from 1 to 65535 . * To press 'q' to quit this program. 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 data; unsigned e=0x9000,i=0; char c; 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 I-8831."); return; } while(i<65535){ FlashRead(e,i); Print("\r\nThe value which segment %u of Flash Member is %d",i,FlashRead(e,i)); i++; if (i%100==0){ Print("\r\nPress q to quit or any key to continue...");c=Getch(); if ((c=='q') || (c=='Q')) return; } } }