--- title: "Video Invert" id: 77779 type: "computer_media" slug: "video-invert" url: "http://localhost/computer_media/video-invert/" markdown_url: "http://localhost/computer_media/video-invert.md" published_at: "2026-11-18T16:43:14+00:00" modified_at: "2026-11-18T16:43:14+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/video-invert-1.png" excerpt: "A 28-byte machine-code routine, kept in a string variable, that flips the whole ZX81 screen to inverse video almost instantly." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Jason Harper" slug: "jason-harper" taxonomy: "indiv" url: "http://localhost/indiv/jason-harper/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" programmers: - name: "Jason Harper" slug: "jason-harper" taxonomy: "indiv" url: "http://localhost/indiv/jason-harper/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Video%20Invert%20%281983%29%28Harper%2C%20Jason%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/video-invert-1.png" - url: "http://localhost/wp-content/uploads/2026/11/video-invert-2.png" article_media: - id: 19504 title: "8K MC Video Invert Routine" type: "article" url: "http://localhost/article/8k-mc-video-invert-routine/" media_type_tags: "Machine Language" license: false --- # Video Invert This routine turns everything on the screen to inverse video almost instantly, and back again on the next call. The 28 bytes of machine code live in the string array I$, not in a REM: the call LET I$(1)=STR$ USR (PEEK 16402+256*PEEK 16403+1) uses the DEST system variable to find I$ wherever it is in memory. On a ZX81 with 4K or more the whole screen reverses; with less memory only the printed characters and the spaces to their left change. The download is the article’s demonstration with I$ already loaded. Do not RUN it, because RUN clears the variables and the machine code with them. Enter GOTO 10: the program lists itself three times and then flips the screen every second. Press BREAK to stop. Any machine-code routine that does not print to the screen can be kept in a string this way. The article has you type a short loader that DIMs I$ and stores the bytes in it, then delete the loader lines and type the demo. The download is the program saved at that point, with I$ in the variables area. Published in Syntax June 1983 ([8K MC Video Invert Routine](https://timexsinclair.com/article/8k-mc-video-invert-routine/)). ## Source Code ``` 10 LIST 20 LIST 30 LIST 40 PAUSE 60 50 LET I$(1)=STR$ USR (PEEK 16402+256*PEEK 16403+1) 60 GOTO 40 ```