Hi!
In te Atari 8-bit family there are a few different DOS, with different on disk formats and memory requirements from 2kB to 10kB, but all sharing the same programming interface as all OS devices (open, close, read bytes, read record, write bytes, write record, seek, delete, rename, see at
https://atariwiki.org/wiki/Wiki.jsp?pag ... %20Handler ). You can copy the on-disk formats for your own.
Most common DOS are:
- DOS 2.0 and DOS 2.5. The most common format, about 6kB for the resident area (file-system handling, OS interface and sector buffers), plus 5k command menu. Files are saved as a linked list, last three bytes of each sector hold a link to the next sector of the file and the size of the data in the sector. Empty space is kept in a bitmap for fast allocation. Limited to 1024 data sectors of 128 bytes each. Random access and deletion of files is slow as all the sectors needs to be read.
- SpartaDOS. Multiple versions available, original is from 6kB to 10kB for the resident area, including a resident command processor (similar to MS-DOS one), with support for internal and external commands. Files are stored with a at least one sector index that contains the number of each sector of the file, and a pointer to the next sector index if needed. Also keeps a used sector bitmap for fast allocation. Supports sub-directories that are stored like regular files, and 8 devices with up to 65535 sectors of up to 256 bytes each. Random access is fast as you can use the sector index to jump to any byte of a file, deletion is fast, only the index needs to be read.
- BW-DOS: Uses same on-disk format as SpartaDOS but is only 6kB for all the buffers and resident area including the command processor with support for batch files. To keep the size small, it expresses operations using a simple byte-code, with 16 bit arithmetic and single byte commands to read or write sectors. Also supports up to 8 devices with up to 65535 sectors of 256 bytes max.
- MyDOS: Extends the on-disk format of DOS 2.0 to add sub-directories and up to 8 devices with 65535 sectors of 256 bytes max. About 6.5kB for the fie-system handling , OS interface and sector buffers, plus a loadable menu of 6.5kB.
- SpartaDOS-X. Newer version of SpartaDOS, compatible on disk format but with support for loadable drivers (for hard drives or other devices), sectors of up to 512 bytes, partition tables, etc. Uses a bank-switched cartridge of 128kB with all internal and external commands (with a file-system in ROM), only about 2K resident in RAM (mainly buffers and thunks that call to the ROM).
- LiteDOS: Only 2kB for all the buffers and resident area, includes a very crude command line processor (only single-letter commands) and only one file open at a time. Can read DOS-2 and compatible disks. Uses clusters of up to 64 sectors, support devices with up to 512 clusters, limiting the on-disk bitmap to 64 bytes. Each cluster stores a link to the next in the last bytes, same as DOS-2.
Have Fun!