Disk structure

Disk is a file that has the DISK extension and special structure. This page describes the disk file format.

Disks should be stored in disks subdirectory of NoSense directory.

Disk file can has the read-only attribute. That disk can be inserted only into a read-only disk slot in NoSense.

Disk structure

Header

File begins with 16-bytes text header:

NoSense Disk
This text identifies file format (empty characters are spaces)
10
These two numbers identifies major and minor version of file format
a
This single character identifies sub-type of file format (compatible with other that have this version), program type or whatever

First two parts must be exactly equal with these presented above. Otherwise disk will not work under current version of NoSense. Third part is arbitrary - it won't be checked and can be used in any way.

Content

Bytes after header described above are disk content. Disk content can be any size (including zero). Position inside inserted disk in NoSense program is counted from the place in file where the content begins (position_in_file = position_in_content + 16).

First four bytes (presented on a picture as 001F for example), if they exist, should be in in type [4i] and should contain information about bootability of the disk. They value means:

< 0
Disk is bootable and all its content should be loaded into memory during boot
= 0
Disk isn't bootable
> 0
Disk is bootable and there should be loaded given number of bytes into memory during boot

Next bytes are any data.

There is no place to save the disk size in this file format. File size can be obtained in the real system and content size can be computed from formula: content_size = file_size - 16.

Remember that the size of the content is the size of data including described 4 bytes for information about boot. These bytes can be accessed from NoSense program as normal data stored on disk and, if you want, you can use them in a different way. But in that case you shouldn't try to boot the machine from that disk - result is undefined.