--- title: "2068 Tape Tutorial" type: "article" slug: "2068-tape-tutorial" url: "http://localhost/article/2068-tape-tutorial/" markdown_url: "http://localhost/article/2068-tape-tutorial.md" published_at: "2022-09-14T02:40:58+00:00" modified_at: "2026-11-15T09:45:17+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Detailed description of how the TS 2068 saves programs to tape. Includes information about the record format on tape, all SAVE/LOAD options. Reprinted from L.I.S.T." post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Reference" slug: "reference" taxonomy: "post_tag" url: "http://localhost/tag/reference/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Tape" slug: "tape" taxonomy: "genre" url: "http://localhost/type/tape/" publication_r: id: 10240 title: "Sinc-Link" type: "periodical" url: "http://localhost/periodical/sinc-link/" volume: "5" issue: "6" issues_articles: - id: 39341 title: "Sinc-Link v5 n6" type: "issue" url: "http://localhost/issue/sinc-link-vol-05-no-6/" pages: "9-10" pubdate: "November/December" archive_link: false --- # 2068 Tape Tutorial Here is everything you ever wanted to know about saving to tape but didn’t know where to ask. Except for minor differences, like speed, much of it applies to the microdrive and to some disk files. One important function is not immediately evident; the ability to SAVE code from one location to another. ### INPUT MONITORING For all tape playback operations, a message is displayed on the screen every time a leader is read. This happens during the gap between the leader and the record. If the leader matches the data type and name specified, the record is read and acted upon. If not, the message remains and reading continues. Messages accumulate in a list until a match is found or no more data is left to read. LOAD “bFWzVj” makes an index for a tape that has no program record named bFWzVj. ### TAPE HEADER FORMATS ``` BYTES TYPE DESCRIPTION 1 All Header identifier (value = 0) 2 All Record type (value 0-3) 3-12 All Record name 13-14 0 Length of program and variables (E_LINE - PROG) 1,2 Length field from data structure 3 Specified length 15,16 0 Autostart line number, or 0080h (LSB/MSB) 1,2 Array I.D. Code 3 Specified address 17,18 0 Length of program (VARS - PROG) 1-3 N/A (value = 0) 19 All Checksum (XOR bytes) ``` ### RECORD TYPES ``` 0 Program and variables 1 Numeric array 2 String array 3 Binary code ``` ### TAPE FORMAT [![Tape format: Block #1 and Block #2, each beginning with SYNC](http://localhost/wp-content/uploads/2022/09/sinclink-42117-1-1024x263.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-1.png)Tape format: Block #1 and Block #2, each beginning with SYNC The tape recording consists of two blocks of data separated by a blank gap. (.835 sec.) Each block begins with synchronizing cycles. These cycles are used by the 2068 to compensate for variation in tape speed from one recorder to another or due to other causes. [![Gap, and optional audio.](http://localhost/wp-content/uploads/2022/09/sinclink-42117-2-1024x554.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-2.png)Gap, and optional audio. [![Block #1: 4032 synchronizing cycles (five seconds); 1.24 msec., Frequency = 806.5 Hz](http://localhost/wp-content/uploads/2022/09/sinclink-42117-3-1024x799.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-3.png)Block #1: 4032 synchronizing cycles (five seconds); 1.24 msec., Frequency = 806.5 Hz [![Block #2: 1612 synchronizing cycles. (two seconds); 1.24 msec, Frequency = 806.5 Hz](http://localhost/wp-content/uploads/2022/09/sinclink-42117-4-1024x768.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-4.png)Block #2: 1612 synchronizing cycles. (two seconds); 1.24 msec, Frequency = 806.5 Hz [![Leader. (Tape label) Signal "01100101" (example); 0.49 msec, 0.98 msec; Frequency = 2040 Hz for a "0", 1020 Hz for a "1"](http://localhost/wp-content/uploads/2022/09/sinclink-42117-5-1024x660.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-5.png)Leader. (Tape label) Signal "01100101" (example); 0.49 msec, 0.98 msec; Frequency = 2040 Hz for a "0", 1020 Hz for a "1" [![Record.](http://localhost/wp-content/uploads/2022/09/sinclink-42117-6-1024x194.png)](http://localhost/wp-content/uploads/2022/09/sinclink-42117-6.png)Record. Record. The record identifier is a single cycle at 2400 Hz. The rest of the signal is the same type as for the leader. The record ends with a checksum byte. Both checksum bytes have an additional transition to assure a correct read from tape. It takes about 5 seconds per K/byte of record. ### SAVE INSTRUCTIONS ``` SAVE "fox" Saves program and variables. SAVE "fox" LINE auto As above but starts running from program line "auto" when reloaded. (see leader format) SAVE "fox" DATA v () Saves numeric array v SAVE "fox" DATA s$ () Saves string array s$ SAVE "fox" CODE location, bytes. Saves bytes of binary data, starting at location. SAVE "fox" STRING$ (equivalent to: SAVE "fox" CODE 16384,6912) Saves screen. (primary display file) ``` When SAVEing, the record name must be from 1 to 10 characters. It cannot be omitted. For all other commands, only the first record having matching name and data type will be acted upon, with one exception. If the record name is specified as the null string “”, the first encountered record of matching data type, regardless of name, will be acted upon. This option will be assumed in subsequent examples, but not shown. Note that the same record name can be reused once for each data type without interference. ### VERIFY INSTRUCTIONS ``` VERIFY "fox" Verifies program and variables. VERIFY "fox" DATA v () Verifies numeric array v. VERIFY "fox" DATA s$ Verifies string array s$ VERIFY "fox" CODE location,data Verifies bytes of binary data, starting at location. VERIFY "fox" CODE 16384,42288 Verifies as much of SCREEN$ as possible. ``` The computer alters the lower 2 lines for reports. Because of the way D_FILE is organized, these bytes are intermixed with those for the bottom 8 lines. This is incomplete but quite effective. ### LOAD INSTRUCTIONS ``` LOAD "fox" Loads new program and variables from tape, over any that were already present. LOAD "fox" DATA v () Loads numeric array v LOAD "fox" CODE location, bytes Loads bytes of binary data, starting at location LOAD "fox" CODE Loads back where it came from. LOAD "fox" SCREEN$ Loads from tape to screen, except for the bottom two lines.It is interesting to watch. ``` ### MERGE INSTRUCTIONS ``` MERGE "fox" Keeps old program and variables, then loads new program and variables from tape. New program lines are inserted, or overwrite old program lines. New variables are added, or replace old variables having the same name ``` MERGE requires free memory to provide a workspace. There is also no prompt to tell you to stop the recorder, other than a change in border pattern. The same is true when LOADing large arrays. Taken from the March 1986 issue of [L.I.S.T.ing](http://localhost/periodical/listing-newsletter/), the newsletter of the [LONG ISLAND SINCLAIR TIMEX GROUP](http://localhost/usergroup/list-long-island-sinclair-timex/). Retyped by G.F. Chambers