reg2IREG
368 Bytes
#!/usr/sbin/perl
#
$cnt = 0;
$reg_val = ();
while (<>) {
chop;
split;
if ($_[1] ne "") { $reg_val[$cnt++] = $_[1]; }
if ($_[2] ne "") { $reg_val[$cnt++] = $_[2]; }
if ($_[3] ne "") { $reg_val[$cnt++] = $_[3]; }
if ($_[4] ne "") { $reg_val[$cnt++] = $_[4]; }
}
for ($i=0; $i<$cnt; $i++) {
printf "@%2.2X %8.8lX //R%d\n",$i,hex($reg_val[$i]),$i+1;
}