#include "..\..\..\include\dsp25.h" #include typedef union{ struct { unsigned char lo; unsigned char hi; } b; Word w; } word; dump_mem(start,end,mem_type) unsigned int start,end; int mem_type; { word a[17]; int c,count,line=1; for(;start<=end;start+=8) { count = ((end-start) > 8 ) ? 8 : (end - start); if(count!=8) count++; RdMBlock16(start,count,&a[0].w,mem_type); a[count].w = 0; printf("\n(%04x) ",start); for(c=0;c= 127 ) ? '.' : ( (a[c].b.lo < 32) ? '.' : a[c].b.lo ); a[c].b.hi = ( a[c].b.hi >= 127 ) ? '.' : ( (a[c].b.hi < 32) ? '.' : a[c].b.hi ); } for(;c<8;c++) printf(" "); printf(" %s",a); if(++line%24==0) { printf("%40cPress any key to continue",32); printf("\n"); if(getch()==27) return; } count = 0; } return; } void main(void) { unsigned int s,e; int c; if(SelectBoard(1) !=SUCCESS) { printf("\n Sorry device not ready "); exit(1); } do { printf("\n Starting address\t:"); scanf("%x",&s); printf(" End address\t\t:"); scanf("%x",&e); printf(" Memory type (1 for program,other for data) :"); scanf("%d",&c); dump_mem(s,e,c); printf("\n%40c Again ?",32); } while( (getch()|32) == 'y'); }