Re: trivial binary compare pgm

From: Zonn <zonn_at_concentric.net>
Date: Thu Oct 16 1997 - 13:36:03 EDT

On Thu, 16 Oct 1997 09:56:47 -0700 (PDT), aek@goonsquad.spies.com (Al
Kossow) wrote:

>
>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

Or in DOS you can type:

   fc /b e12_prom e1_prom

It's always work for me, those MAC people what can you say? (Sorry Al, I
just had to say it! ;^) ;^)

-Zonn

<><><><><><><><><><><><><><><><><><><><><><><><><><><><

 ------ ___ Member of A.A.C.S.:
 |---- | ( ) Association for Artistically
    / / ( () ) Challenged Signatures
   / / //\\ // (__)
  / ---/ // \\ //\\ // zonn @ concentric . net
 -------| // \\/
Received on Thu Oct 16 10:33:51 1997

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