#!/usr/bin/perl
#
# print header stuff
#
print "Content-type: text/html", "\n\n";
print "<html>\n";
@bin=('0000','0001','0010','0011',
'0100','0101','0110','0111',
'1000','1001','1010','1011',
'1100','1101','1110','1111');
$preferred="preffered";
$illegal="ILLEGAL";
$empty_cell='&nbsp;';
#print "<table border=\"1\">\n";
for ($i=0;$i<=15;$i++) {
for ($j=0;$j<=15;$j++) {
$preferred="&nbsp;";
$n=($i*16)+$j;
$debug="$n";
$packed="$empty_cell";
$packednn="$empty_cell";
$packedns="$empty_cell";
if ($i < 10 && $j < 10 ) {
$packed="$i$j";
$packednn=$packed;
}
else {
if ($i < 10 && $j >= 10 ) {
$zsign="+";
if ($j == 11 || $j == 13) {
$zsign="-";
}
$packed="$i$zsign";
$packedns=$packed;
if ($j == 12 || $j == 13 ) {
$preferred="Prefered<br>Sign";
}
}
else {
$packed="$illegal";
$packednn="$illegal";
$packedns="$illegal";
}
}
print "packed_all[$debug]='$packed';<br>";
print "packed_sign[$debug]='$packedns';<br>";
print "packed_nums[$debug]='$packednn';<br>";
print "packed_pref[$debug]='$preferred';<br>";
$x = sprintf("%02X", $n);
$octal = sprintf("%02o", $n);
}
}
print "<body background=\"nevada.gif\">\n";
#
#define stuff to grab data entered on form
#
require TripodCGI;
use CGI;
$cgi = new CGI;
#
# get the file name they want to list
#
$name=$cgi->param('name');
#
#
#open the file so we can read it and print it
#
exit;