Last modified on 21 April 2012, at 10:23

AMSDOS Header

Revision as of 10:23, 21 April 2012 by Octoate (Talk | contribs) (Created page with "In AMSDOS it is possible to store files in two ways: headerless and with a header. Headerless files are often files which were created with OPENOUT and ''SAVE"filename",a...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In AMSDOS it is possible to store files in two ways: headerless and with a header. Headerless files are often files which were created with OPENOUT and SAVE"filename",a. Programs normally have a file header, which is consists of 128 bytes and contains the following data:

Byte 00: User number
Byte 01 to 08: filename
Byte 09 bis 11: Extension
Byte 18: type-byte
Byte 21 and 22: loading address
Byte 24 and 25: file length
Byte 26 and 27: execution address for machine code programs
Byte 64 and 65: checksum for byte 00 to byte 66
Byte 67 and 68: (file length)

To calculate the checksum, just add byte 00 to byte 66 to each other.