# File test/backup/ProDOSDisk.rb, line 67 def dump_block(block_no) s=hline s<<sprintf("BLOCK %03d\n",block_no) s<< "\t" block_data=get_block(block_no) (0..15).each {|x| s<<sprintf("%02X ",x) } s<<"\n" s<<hline (0..31).each {|line_number| lhs="" rhs="" start_byte=line_number*16 line=block_data[start_byte..start_byte+15] line.each_byte {|byte| lhs<< sprintf("%02X ", byte) rhs<< (byte%128).chr.sub(/[\x00-\x1f]/,'.') } s<<sprintf("%03X\t%s %s\n",start_byte,lhs,rhs) } s end