DOSの.com ファイルをテキスト化するcom2txt。
DOSリアルモードで動くJperl4に対応させてみた。
http://www.vector.co.jp/soft/dl/dos/util/se000203.html

#!/usr/bin/perl
$L="\x0D\x0A";sub E{$t=0;for(0..3){$t*=3;$t+=$b[$_]%3};$_=int(($t+1)*20/19);{(
$_+=33)>=42&&++$_;print pack(C,$_);$p=0,print"$L#"if++$p>=72;@b||last;$_=int((
shift@b)/3);redo}}binmode STDOUT;if(open(F,shift)){print'#?7%00%DDPYA44P,5@P_4'
,"?P],}P^5'2PZ-%qPR545PZ5E]1F}5uAP5,ZP]5w9'PU/5zjPRQu$L#Nide/com2txt/X-uw'P'5+"
,"~PZ5g(P]-vjPRU-*`P5H9P-E)PZ-KaP5V2P]5hTP5BSPRUVES$L#?[X5;:PZ5WN'PR',~P/5`QP5"
,"Z P-UrPEUQ]EENNNNNN#~$L$L#~";binmode F;$p=2;while(read(F,$_,1)){push(@b,ord);
&E,@b=()if@b>3}@b&& &E;print"*$L"}