Low Level Filesystem Access: Difference between revisions

From Bitchin100 DocGarden
Jump to navigationJump to search
(New page: == How RAM File Creation Works == (Steve Adolph) There are a number of pointers in himem that are used to demarcate the area used for basic files text files the three scratchpads machine...)
 
Line 17: Line 17:
To create a file you need to
To create a file you need to


* wedge open the file space at a precise location, depending on the
* wedge open the file space at a precise location, depending on the file type and the pointer values...placement is critical because of a fundamental assumption in the directory management
file type and the pointer values...placement is critical because of a
fundamental assumption in the directory management


* load all the appropriate data into that memory hole, representing
* load all the appropriate data into that memory hole, representing the actual file data
the actual file data


* create a directory entry with the right stuff in the entry to
* create a directory entry with the right stuff in the entry to connect with that file
connect with that file


* run the magic LNKFIL routine that re-assigns all the directory links
* run the magic LNKFIL routine that re-assigns all the directory links and connects them to the right files again
and connects them to the right files again


Deleting a file is kinda similar.
Deleting a file is kinda similar.

Revision as of 16:24, 24 February 2008

How RAM File Creation Works

(Steve Adolph)

There are a number of pointers in himem that are used to demarcate the area used for basic files text files the three scratchpads machine language files

These pointers need to be modified according to what you need to insert or delete. For example, if you add a .CO file, then you don't need to modify the pointers that deal with the lower file space. But, adding a .BA moves all the pointers.

To create a file you need to

  • wedge open the file space at a precise location, depending on the file type and the pointer values...placement is critical because of a fundamental assumption in the directory management
  • load all the appropriate data into that memory hole, representing the actual file data
  • create a directory entry with the right stuff in the entry to connect with that file
  • run the magic LNKFIL routine that re-assigns all the directory links and connects them to the right files again

Deleting a file is kinda similar.

The fundamental assumption is that the order of the files must be maintained within each file type. That way the linker can deduce which file directory entry is associated with a specific file.

IE the next .BA directory entry must be associated with the next found file in the .BA area. and so on.