IBM PC data cassette
Dan Tobias (Talk | contribs) (→References) |
(Added structure of BASIC header) |
||
Line 7: | Line 7: | ||
Yes, the '''IBM PC''' did have a cassette port at one point. Actually, only the original IBM Personal Computer model 5150, and the later PCjr (intended as a low-end home computer), had this; other PCs did away with this feature which was rarely used on this platform given that just about everybody got their PC with at least one disk drive. Apparently, though, IBM felt that when they made their entry into the PC field (after years of regarding small computers as "toys" unworthy of their attention) they needed to be sure their machine duplicated all the features present in other brands of personal computers around at the time, and most of them had cassette interfaces then because disk drives had been so expensive in recent history (and those computers were aimed at home/hobby markets with limited budgets). By the time of the IBM PC, disk drives had come down in price, while IBM's computers were aimed at a more upscale business/professional market, so cassettes saw little use there. | Yes, the '''IBM PC''' did have a cassette port at one point. Actually, only the original IBM Personal Computer model 5150, and the later PCjr (intended as a low-end home computer), had this; other PCs did away with this feature which was rarely used on this platform given that just about everybody got their PC with at least one disk drive. Apparently, though, IBM felt that when they made their entry into the PC field (after years of regarding small computers as "toys" unworthy of their attention) they needed to be sure their machine duplicated all the features present in other brands of personal computers around at the time, and most of them had cassette interfaces then because disk drives had been so expensive in recent history (and those computers were aimed at home/hobby markets with limited budgets). By the time of the IBM PC, disk drives had come down in price, while IBM's computers were aimed at a more upscale business/professional market, so cassettes saw little use there. | ||
− | The format | + | The format consists of 1-millisecond-long pulses for each 1 bit, and 0.5-millisecond pulses for each 0 bit. A tape record starts with a leader of 256 bytes of all 1 bits (hex FF), followed by a single synchronization bit (0), and then a synchronization byte (hex 16, the [[ASCII]] character from the [[C0 controls]] designated as SYN). This is followed by one or more 256-byte data blocks. Each data block is followed by a 2-byte [[CRC]], with the most significant byte first. After the last block, a 4-byte trailer is written of all 1 bits (hex FF). |
+ | |||
+ | Files saved by IBM Cassette BASIC consist of two records: the first one is a header (always 256 bytes, of which the first 16 are significant), and the second one contains the data. | ||
+ | |||
+ | The header layout is: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Offset | ||
+ | ! Size | ||
+ | ! Description | ||
+ | |- | ||
+ | |0x00 || Byte || Always 0xA5 | ||
+ | |- | ||
+ | |0x01 || 8 bytes || Filename, ASCII | ||
+ | |- | ||
+ | |0x09 || Byte || Flags. When listing files, BASIC displays 'P' if bit 5 is set, 'B' if bit 7 is set, 'A' if bit 6 is set, 'M' if bit 0 is set, 'D' otherwise. | ||
+ | |- | ||
+ | |0x0A || Word || Number of bytes in the following data part (little-endian word) | ||
+ | |- | ||
+ | |0x0C || Word || Segment of load address (little-endian word) | ||
+ | |- | ||
+ | |0x0E || Word || Offset of load address (little-endian word) | ||
+ | |} | ||
== References == | == References == | ||
Line 14: | Line 36: | ||
* [[Wikipedia:IBM cassette tape|Wikipedia article]] | * [[Wikipedia:IBM cassette tape|Wikipedia article]] | ||
* [http://67.185.176.54:8080/ Mike's PCjr Page] | * [http://67.185.176.54:8080/ Mike's PCjr Page] | ||
+ | * [http://www.minuszerodegrees.net/manuals/IBM_5150_Technical_Reference_6322507_APR84.pdf IBM PC Technical Reference, 1984]: Pages 5-106 to 5-107 | ||
[[Category:IBM]] | [[Category:IBM]] |
Revision as of 10:07, 15 August 2014
Yes, the IBM PC did have a cassette port at one point. Actually, only the original IBM Personal Computer model 5150, and the later PCjr (intended as a low-end home computer), had this; other PCs did away with this feature which was rarely used on this platform given that just about everybody got their PC with at least one disk drive. Apparently, though, IBM felt that when they made their entry into the PC field (after years of regarding small computers as "toys" unworthy of their attention) they needed to be sure their machine duplicated all the features present in other brands of personal computers around at the time, and most of them had cassette interfaces then because disk drives had been so expensive in recent history (and those computers were aimed at home/hobby markets with limited budgets). By the time of the IBM PC, disk drives had come down in price, while IBM's computers were aimed at a more upscale business/professional market, so cassettes saw little use there.
The format consists of 1-millisecond-long pulses for each 1 bit, and 0.5-millisecond pulses for each 0 bit. A tape record starts with a leader of 256 bytes of all 1 bits (hex FF), followed by a single synchronization bit (0), and then a synchronization byte (hex 16, the ASCII character from the C0 controls designated as SYN). This is followed by one or more 256-byte data blocks. Each data block is followed by a 2-byte CRC, with the most significant byte first. After the last block, a 4-byte trailer is written of all 1 bits (hex FF).
Files saved by IBM Cassette BASIC consist of two records: the first one is a header (always 256 bytes, of which the first 16 are significant), and the second one contains the data.
The header layout is:
Offset | Size | Description |
---|---|---|
0x00 | Byte | Always 0xA5 |
0x01 | 8 bytes | Filename, ASCII |
0x09 | Byte | Flags. When listing files, BASIC displays 'P' if bit 5 is set, 'B' if bit 7 is set, 'A' if bit 6 is set, 'M' if bit 0 is set, 'D' otherwise. |
0x0A | Word | Number of bytes in the following data part (little-endian word) |
0x0C | Word | Segment of load address (little-endian word) |
0x0E | Word | Offset of load address (little-endian word) |