--- title: "Automating the Data Line" type: "article" slug: "automating-the-data-line" url: "http://localhost/article/automating-the-data-line/" markdown_url: "http://localhost/article/automating-the-data-line.md" published_at: "2022-10-07T12:28:25+00:00" modified_at: "2026-06-29T23:39:49+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Some programs in Basic call in M/C routines for repetitive or special functions. In such cases it is often convenient to create a joint record. The Basic program can include a decimal loader, as shown in lines 9955 to 9975, below. The details of the M/C routine are contained in the Data lines. This permits…" category: - name: "CATS Newsletter" slug: "cats-newsletter" taxonomy: "category" url: "http://localhost/category/periodicals/cats-newsletter/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "Machine language programming" slug: "machine-language" taxonomy: "post_tag" url: "http://localhost/tag/machine-language/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "H. Edward Weppler" slug: "h-e-weppler" taxonomy: "indiv" url: "http://localhost/indiv/h-e-weppler/" publication_r: id: 35941 title: "CATS Newsletter" type: "periodical" url: "http://localhost/periodical/cats-newsletter/" authors: "H. E. Weppler" authors_r: - name: "H. Edward Weppler" slug: "h-e-weppler" taxonomy: "indiv" url: "http://localhost/indiv/h-e-weppler/" volume: "6" issue: "1" issues_articles: - id: 39632 title: "CATS v6 n1" type: "issue" url: "http://localhost/issue/cats-v6-n1/" pages: "6-7" pubdate: "May 1988" archive_link: false --- # Automating the Data Line Some programs in Basic call in M/C routines for repetitive or special functions. In such cases it is often convenient to create a joint record. The Basic program can include a decimal loader, as shown in lines 9955 to 9975, below. The details of the M/C routine are contained in the Data lines. This permits all the details to be stored in the Basic program, on tape or on paper, without treating the code portion separately. In writing such a Basic program, the data lines may be formed automatically. After the M/C portion has been developed and put in memory with an assembler or the like, the DATA LINE program is run. The desired data line number is specified, along with the limits in memory of the M/C bytes, and the numbers are recorded automatically. The data may be spread over several program lines by just running DATA LINE several times for consecutive portions of memory. This approach may be used for any type of program line or instruction. Just have the desired instruction built up in string R$, like you would enter it from the keyboard, and then RANDOMIZE USR 65300. The M/C program is not location-sensitive, so it may be stored any place in memory. Also the string need not be R$, for any letter may be used; however, then the last number in line 9965 must be changed to the code for the upper-case version of that letter; 82 is the code for R. ## Source Code ``` 9900 REM ******** DATA LINE 9905 IF PEEK 65300<>33 OR PEEK 65341<>201 THEN GO SUB 9955 9910 INPUT "DATA LINE";LL 9515 INPUT "M/C START";SS 9920 INPUT "M/C END";EE 9925 LET R$=STR$ LL+CHR$ 228 9930 FOR N=55 TO EE 9935 LET R$=R$+STR$ PEEK N+"," 9940 NEXT N: LET R$(LEN R$)=" " 9945 RANDOMIZE USR 65300 9950 STOP 9955 RESTORE 9965 9960 FOR FOR N=65300 TO 65341: READ R: POKE N,R: NEXT N: RETURN 9965 DATA 33,19,0,9,229,229,42,97,92,43,43,205,99,19,14,82 9970 DATA 205,187,44,35,78,35,70,35,229,197,42,89,92,229 9975 DATA 205,187,18,209,193,225,237,176,205,58,14,201 9980 STOP ```