Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 381

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 382

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 383

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/Setup.php on line 384

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: include(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/resourceloader/ResourceLoader.php on line 201

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require_once(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/json/FormatJson.php on line 12

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007
IBM PC data cassette - Just Solve the File Format Problem

IBM PC data cassette

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(References)
(References)
 
(4 intermediate revisions by 2 users not shown)
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 consisted of 1-millisecond-long pulses for each 1 bit, and 0.5-millisecond pulses for each 0 bit. The tape 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). The number of bytes in the data follows (possibly; the references are rather unclear and don't say how many bits/bytes of length data there is), followed by the data itself, grouped into 256-byte blocks (each followed by a 2-byte [[CRC]]).
+
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).  
 +
 
 +
[[GW-BASIC tokenized file|Tokenised BASIC]] programs and memory areas 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.
 +
 
 +
ASCII listings and data files consist of a sequence of 256-byte records; the first one is a header, as above, and subsequent ones contain the data. If the first byte of the record is 0, this is not the last record, and all 255 following bytes are valid data. Otherwise it gives the number of valid bytes in the last record, plus one.
 +
 
 +
The header layout is:
 +
 
 +
{| class="wikitable"
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
|0x00 || Byte || Always 0xA5
 +
|-
 +
|0x01 || 8 bytes || Filename, ASCII
 +
|-
 +
|0x09 || Byte || Flags:
 +
{| class="wikitable"
 +
! Bit
 +
! Meaning if set
 +
! Example command to create
 +
|-
 +
|7 || Tokenised BASIC || <kbd>SAVE "file"</kbd>
 +
|-
 +
|6 || ASCII listing || <kbd>SAVE "file", A</kbd>
 +
|-
 +
|5 || Protected tokenised BASIC || <kbd>SAVE "file", P</kbd>
 +
|-
 +
|0 || Memory area || <kbd>BSAVE "file", address, length</kbd>
 +
|-
 +
|No bits set || Data || <kbd>OPEN "O",1,"file"</kbd>
 +
|}
 +
|-
 +
|0x0A || Word || Number of bytes in the following data record (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 53:
 
* [[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
 +
* [https://forum.winworldpc.com/discussion/11503/software-spotlight-cassette-software-for-the-ibm-pc Software spotlight: Cassette software for the IBM PC]
  
 
[[Category:IBM]]
 
[[Category:IBM]]

Latest revision as of 01:05, 6 September 2019

File Format
Name IBM PC data cassette
Ontology
Released 1981

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).

Tokenised BASIC programs and memory areas 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.

ASCII listings and data files consist of a sequence of 256-byte records; the first one is a header, as above, and subsequent ones contain the data. If the first byte of the record is 0, this is not the last record, and all 255 following bytes are valid data. Otherwise it gives the number of valid bytes in the last record, plus one.

The header layout is:

Offset Size Description
0x00 Byte Always 0xA5
0x01 8 bytes Filename, ASCII
0x09 Byte Flags:
Bit Meaning if set Example command to create
7 Tokenised BASIC SAVE "file"
6 ASCII listing SAVE "file", A
5 Protected tokenised BASIC SAVE "file", P
0 Memory area BSAVE "file", address, length
No bits set Data OPEN "O",1,"file"
0x0A Word Number of bytes in the following data record (little-endian word)
0x0C Word Segment of load address (little-endian word)
0x0E Word Offset of load address (little-endian word)

[edit] References

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox

Warning: require(): Unable to allocate memory for pool. in /usr/local/www/mediawiki/includes/AutoLoader.php on line 1007