aboutsummaryrefslogtreecommitdiffstats
path: root/bin2hex.pl
diff options
context:
space:
mode:
authorhpa <hpa>2002-10-03 10:02:50 +0000
committerhpa <hpa>2002-10-03 10:02:50 +0000
commit1043c2415c84ec6c48d44890027a6fbd5140f577 (patch)
tree9d08a9211e5671e6e91abdaf4279331e343c3a4a /bin2hex.pl
parent1769d57c94d7a965168b72b6fd8d48251710b452 (diff)
downloadsyslinux-elf-1043c2415c84ec6c48d44890027a6fbd5140f577.tar.gz
syslinux-elf-1043c2415c84ec6c48d44890027a6fbd5140f577.tar.xz
syslinux-elf-1043c2415c84ec6c48d44890027a6fbd5140f577.zip
Add tool to create a DOS-formatted hard drive image; minor tidying of the
MBR code.
Diffstat (limited to 'bin2hex.pl')
-rwxr-xr-xbin2hex.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin2hex.pl b/bin2hex.pl
new file mode 100755
index 00000000..8d8909b9
--- /dev/null
+++ b/bin2hex.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+$len = 0;
+while ( read(STDIN,$ch,1) ) {
+ $cc = ord($ch);
+ $len += printf ("%x", $cc);
+ if ( $len > 72 ) {
+ print "\n";
+ $len = 0;
+ } else {
+ print " ";
+ $len++;
+ }
+}
+print "\n" if ( $len );
+exit 0;
+