head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 webdox:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#! /usr/bin/perl

# Inspect a 32 word at a specified offset in a file.
# $Revision: 1.1 $

use strict qw(refs vars);
use FileHandle;

my $filename = shift @@ARGV;
my $offset = shift @@ARGV;

((defined $filename) && (defined $offset))
    || die "Usage: pw <filename> <offset>\n";

my $fh = new FileHandle("<$filename");
printf( "%08x\n", ReadWord($fh, $offset) );

sub ReadWord {
    my ($fh, $offset) = @@_;
    seek $fh, $offset, SEEK_SET;
    my $buf = 'X' x 4;
    read $fh, $buf, 4;
    return unpack('V',$buf);
}
@


1.1.1.1
log
@Project Start
@
text
@@
