--- title: "Quick Screen Display 2068" type: "article" slug: "quick-screen-display-2068" url: "http://localhost/article/quick-screen-display-2068/" markdown_url: "http://localhost/article/quick-screen-display-2068.md" published_at: "2020-10-27T17:09:36+00:00" modified_at: "2026-07-30T01:06:27+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "If you are looking for a way to rapidly store and retrieve an entire screen display, then this approach may be useful to you. It moves the 6912 bytes of the normal screen display file (DFILE) to an address in RAM, from which it may then be retrieved as one block of data and reinserted…" category: - name: "SyncWare News" slug: "syncware-news" taxonomy: "category" url: "http://localhost/category/periodicals/syncware-news/" 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: "SyncWare News" publication_r: id: 10245 title: "SyncWare News" type: "periodical" url: "http://localhost/periodical/syncware-news/" authors: "Robert Hartung" authors_r: - name: "Robert Hartung" slug: "robert-hartung" taxonomy: "indiv" url: "http://localhost/indiv/robert-hartung/" volume: "2" issue: "5" issues_articles: - id: 26684 title: "SyncWare News v2 n5" type: "issue" url: "http://localhost/issue/syncware-news-v2-n5/" pages: "13" pubdate: "May/June 1985" archive_link: false volumeissue: "v2n5" --- # Quick Screen Display 2068 If you are looking for a way to rapidly store and retrieve an entire screen display, then this approach may be useful to you. It moves the 6912 bytes of the normal screen display file (DFILE) to an address in RAM, from which it may then be retrieved as one block of data and reinserted into the display file when desired. Several such blocks of display data might be stored and retrieved in rapid succession for animated displays, moving backgrounds or overprinting. For a demonstration, we will first CLEAR 29999, so that we may use address 30000 as the beginning byte of RAM to be reserved for display data. If this technique is used with a longer BASIC listing and large variable arrays, then the first unused byte of RAM may be found by `PRINT 65536-FREE`. The addresses in the following block move routine as well as the beginning address for a `SAVE "name"CODE m,n` would then need to be adjusted accordingly. The 12 bytes of this LDIR block move are POKEd into a location just below the UDG file which begins at 65368. The codes for the routine could be entered by direct pokes to the given addresses or by a simple loader routine using a DATA line. It is listed here as part of the demo program so that it can be noted as to what each step does and where changes can be made to adapt it to other values. ### Listing 1 ``` 80 POKE 65356,1 81 POKE 65357,0 82 POKE 65358,27 83 POKE 65359,17 84 POKE 65360,48 85 POKE 65361,117 86 POKE 65362,33 87 POKE 65363,0 88 POKE 65364,64 89 POKE 65365,237 90 POKE 65366,176 91 POKE 65367,201 100 RANDOMIZE USR 65356 ``` When this listing is RUN as given, the 6912 bytes of DFILE1 (display and attributes) would be transferred to th storage address beginning at 30000d. Of course, if we do this with a blank screen, then we would only be moving a block of zeros. Let’s add a little print loop (lines 50-70) to fill the screen. Lines 130 to 140 provide for a block transfer back to DFILE1. UDG characters and normal characters may be used. DRAW, CIRCLE and PLOT may also be used, but for this demo, let’s use the graphic found on the 6 key. ### Listing 2 — add to Listing 1 ``` 50 FOR i=1 TO 704 60 PRINT "▚"; 70 NEXT i 130 CLS 131 POKE 65360,0 132 POKE 65361,64 133 POKE 65363,48 134 POKE 65364,117 135 STOP 140 RANDOMIZE USR 65356 ``` When we RUN these combined listings, the screen slowly fills with the graphic character, and then clears, showing a 9 STOP, 135:1. This isn’t very impressive, yet. Now type CONTINUE and ENTER. Is that fast enough? In order to SAVE this stored DFILE to tape, add the following lines to the above listings and RUN again. Enter CONTINUE at lines 135 and 145, when the program stops. The REM in line 100 is inserted to disable the storage of a blank screen DFILE caused by auto-running of the LDIR POKEs after reloading. Type CONTINUE at the line 135 STOP after reloading. ### Listing 3 — add to Listing 1 and 2 ``` 100 REM RANDOMIZE USR 65356 145 STOP 150 SAVE "quick" LINE 170 160 SAVE "quick"CODE 30000,6912 170 LOAD ""CODE 180 GO TO 80 ``` Note that the time required to SAVE and re-LOAD the 6912 bytes of the screen display codes is the same For a SAVE of SCREEN$. Obviously then, using this method for saving more than one DFILE screenful will eat up memory very fast. If the top end of RAM is also used to store pages of UDG characters or other data, care must be taken not to over-write any of these with screen files or vice versa. This is only a demonstration of a technique which can be adapted to your particular use. The LDIR block-move is a little workhorse routine which may be used by itself any time that you want to move a consecutive block of data around, including moving data in and out of DFILE 1 and 2 in enhanced display modes. It may also be used to move all or selected blocks of ROM codes up into RAM where you can study the effects of making various changes. It should be noted however, that some of these rom routines will still call to their original addresses, and non relative jump instructions will need revision for their new locations as well. ``` HEXCODE LABEL MNEMONIC ====================== 01001B SAVE LD BC,1B00 113075 LD DE,7530 210040 LD HL,4000 EDB0 LDIR C9 RET 01001B SHOW LD BC,1B00 110040 LD DE,4000 213075 LD HL,7530 EDB0 LDIR C9 RET ```