diff options
author | hpa <hpa> | 2002-10-03 10:02:50 +0000 |
---|---|---|
committer | hpa <hpa> | 2002-10-03 10:02:50 +0000 |
commit | 1043c2415c84ec6c48d44890027a6fbd5140f577 (patch) | |
tree | 9d08a9211e5671e6e91abdaf4279331e343c3a4a /bin2hex.pl | |
parent | 1769d57c94d7a965168b72b6fd8d48251710b452 (diff) | |
download | syslinux-1043c2415c84ec6c48d44890027a6fbd5140f577.tar.gz |
Add tool to create a DOS-formatted hard drive image; minor tidying of the
MBR code.
Diffstat (limited to 'bin2hex.pl')
-rwxr-xr-x | bin2hex.pl | 16 |
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; + |