trivial binary compare pgm

From: Al Kossow <aek>
Date: Thu Oct 16 1997 - 12:56:47 EDT

here was something I hacked together when Dave and I
were comparing ROM versions. catenate the images together
and it will print out any bytes that differ

#include <stdio.h>
main(){
        FILE *f1, *f2;
        unsigned char c1, c2;
        unsigned int adr = 0;

        f1 = fopen("el2_prom","rb");
        f2 = fopen("el_prom","rb");
        while(!feof(f1)){
         c1 = getc(f1);
         c2 = getc(f2);
         if (c1 != c2){
          printf("%04x %02x %02x\n", adr, c1 ,c2);
         }
         adr++;
        }
}

..not pretty but it got the job done
Received on Thu Oct 16 09:57:23 1997

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:38 EDT