Class: NADOLFile

Inherits:
DSKFile show all
Defined in:
lib/NADOLFile.rb

Overview

NADOL (Nibbles Away Disk Optimized Language) file

Direct Known Subclasses

NADOLBinaryFile, NADOLTokenisedFile

Constant Summary

Constants inherited from DSKFile

DSKFile::APPLESOFT_TOKENS

Instance Attribute Summary

Attributes inherited from DSKFile

#contents, #filename

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DSKFile

#==, #buffer_as_applesoft_file, #can_be_picture?, #hex_dump, #initialize, #length_in_sectors, #to_ascii, #to_s

Constructor Details

This class inherits a constructor from DSKFile

Class Method Details

.catalog_filename(filename) ⇒ Object

render the filename in form suitable for inclusion in a NADOL catalog



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/NADOLFile.rb', line 18

def  NADOLFile.catalog_filename(filename)
  s=""
  for i in 0..0X0B
    c=(filename[i])
    if c.nil? then
      c=0xA0        
      else 
      c=(c|0x80)
    end
    s+=c.chr
  end
  s
end

Instance Method Details

#catalog_filenameObject



13
14
15
# File 'lib/NADOLFile.rb', line 13

def catalog_filename
  NADOLFile.catalog_filename(filename)
end

#file_extensionObject



9
10
11
# File 'lib/NADOLFile.rb', line 9

def file_extension
	".bin"
end