--- title: "Screen Files in Strings" type: "article" slug: "screen-files-in-strings" url: "http://localhost/article/screen-files-in-strings/" markdown_url: "http://localhost/article/screen-files-in-strings.md" published_at: "2020-10-27T17:13:33+00:00" modified_at: "2026-08-04T12:56:33+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "In January SDU Bill discussed the use of SCREEN$ files as a means of conserving RAM in programs such as SMART TEXT. Each SCREEN$, of course, takes 6912 bytes in disk file space or two cylinders in SDOS. The following demo listing shows how up to the maximum of 704 characters in a 32-column text…" category: - name: "Update Magazine" slug: "update-magazine" taxonomy: "category" url: "http://localhost/category/periodicals/update-magazine/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - 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: "Robert Hartung" slug: "robert-hartung" taxonomy: "indiv" url: "http://localhost/indiv/robert-hartung/" publication: "TS-2068 Up-date" publication_r: id: 10283 title: "Update Magazine" type: "periodical" url: "http://localhost/periodical/update-magazine/" authors: "Robert Hartung" authors_r: - name: "Robert Hartung" slug: "robert-hartung" taxonomy: "indiv" url: "http://localhost/indiv/robert-hartung/" issues_articles: - id: 26483 title: "Update April 1988" type: "issue" url: "http://localhost/issue/ts-2068-up-date-april-1988-2/" pages: "22" pubdate: "April 1988" archive_link: false volumeissue: "v1n3" --- # Screen Files in Strings In January SDU Bill discussed the use of SCREEN$ files as a means of conserving RAM in programs such as SMART TEXT. Each SCREEN$, of course, takes 6912 bytes in disk file space or two cylinders in SDOS. The following demo listing shows how up to the maximum of 704 characters in a 32-column text screen such as a menu may be stored in a string, then printed back on-screen either from RAM storage or after retrieval from disk or tape files. No graphics or UDGs are recognized by the SCREEN$ (x,y) function but this can be used to advantage by having a subroutine to set up screen borders, etc. then retrieving screen files and using `PRINT OVER 1; a$` as many times as you wish to change the text. `PRINT AT x,y; a$(a TO b)` could also be used to alter specific parts of a text display. It does take awhile to chew away at a screen initially and put each character in the string, but once this is done and the file is saved as `DATA a$()` the access time is for only one cylinder of disk space. Because only about 1/10 the access time is required as compared to a SCREEN$ it would even be feasible to sequentially access a series of such files with tape data storage if RAM capacity was running short in a lengthy program. Use your imagination for other applications. ### SCREEN STRING DEMO ``` 1 LET P=1 5 DIM A$(704) 10 FOR N=1 TO 704 20 PRINT CHR$ (RND*74+48); 30 NEXT N 35 PRINT #0;"Original display transfer to A$" 40 FOR V=0 TO 21 50 FOR H=0 TO 31 60 LET A$(P)=SCREEN$ (V,H) 65 LET P=P+1 70 NEXT H 80 NEXT V 90 CLS 100 PRINT A$;#0;"A$ printed from VARS file" 105 PAUSE 100 110 SAVE /"SCREEN" DATA A$() 115 CLEAR 120 PRINT #0;"Re-loading data just saved" 125 LOAD /"SCREEN" DATA A$() 130 LET a$( TO 17)=" ": REM Demo of how blank spaces in screen data will not overprint graphics or UDGs in border when OVER 1 is used 135 PRINT " BORDER HERE " 140 INPUT "": PRINT OVER 1;AT 0,0;A$;#0;"A$ from disk file to VARS prtout" 150 PAUSE 300 160 STOP 200 REM GO TO 120 to repeat disk file display 9999 SAVE /"SCREEN" LINE 1 ``` ***