# File lib/DOSDisk.rb, line 108
  def make_file(filename,contents,file_options={})
    raise "Tokenisation not currently supported for DOS files" if (file_options[:tokenise])
    file_type = case file_options[:filetype]
      when nil then 0x00
      when 'T' then 0x00
      when 'I' then 0x01
      when 'A' then 0x02
      when 'B' then 0x04
      else file_options[:filetype].tr("$","").hex
      end
      if file_type==4 && !(file_options[:base].nil?) then
        base=file_options[:base].tr("$","").hex
        s="\0\0\0\0"
        s[0]=base%256
        s[1]=base/256
        s[2]=contents.length%256
        s[3]=contents.length/256
        contents=s+contents
      end
    new_file=DOSFile.new(filename,contents,false,file_type)
  return new_file
end