/* convert.c 7/11/2012 dwg - The purpose of this program is similar to the CP/M dump program except that in addition to the normal hexadecimal bytes, a field of ascii bytes to the right are displayed as well. */ #include "stdio.h" char visible[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 20 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 30 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* A0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* B0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* C0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* D0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* E0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* F0 */ }; #include "cvt2h.h" unsigned char sector[32767]; main(argc,argv) int argc; char *argv[]; { int i,j; int offset; int result; unsigned char byte; char name[32]; FILE * fd; for(i=0;i0;i--) { if(sector[i] != 0) break; } sprintf(name,"sect%04x.h",0); cvt2h(sector,i,name); fclose(fd); exit(0); }