summaryrefslogtreecommitdiff
path: root/src/postprocess/testmap.c
blob: d57ac80d1948a36ae274cacb471cd7bc9929ae2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "mystdlib.h"

int main ( int args, char **argv)
{
  MAP f1 = NULL;
  int i,j = 0;

  if( !(f1 = map_file(argv[1], 1)))
    puts( "Aua");
  else
    printf( "%09d %08X %09d\t", f1->fh, f1->addr, f1->size);

  for( i=0; i < f1->size; ++i )
    j += f1->addr[i];

  printf( "%09d\n", j );

  unmap_file( &f1 );
}