Class: AppleSoftFile

Inherits:
DOSFile show all
Defined in:
lib/DOSFile.rb

Overview

Adapted from FID.C – a utility to browse Apple II .DSK image files by Paul Schlyter ([email protected])

Applesoft file format: <Length_of_file> (16-bit little endian) <Line> .….. <Line> where <Line> is: <Next addr> (16-bit little endian) <Line no> (16-bit little endian: 0-65535) <Tokens and/or characters> <End-of-line marker: $00 >

Instance Attribute Summary

Attributes inherited from DOSFile

#contents, #filename, #locked, #sector_count

Instance Method Summary collapse

Methods inherited from DOSFile

#hex_dump, #initialize

Constructor Details

This class inherits a constructor from DOSFile

Instance Method Details

#file_extensionObject



297
298
299
# File 'lib/DOSFile.rb', line 297

def file_extension
	".bas"
end

#file_typeObject



289
290
291
# File 'lib/DOSFile.rb', line 289

def file_type
	"A"
end

#to_sObject

display file with all AppleSoft BASIC tokens expanded to ASCII



293
294
295
# File 'lib/DOSFile.rb', line 293

def to_s
	buffer_as_applesoft_file(@contents)
end