# File lib/native_file_types/trs80/Trs80PascalSource.rb, line 15 def to_listing s="" p=1 length=contents[1,2].unpack('v')[0] contents[1,length].each_byte do |b| if (b>=0x80) then s<<' '*(b-0x80) elsif b==0x01 then s<<"\n" else s<<b.chr end end s end