--- title: "NOVA 1000" id: 58445 type: "computer_media" slug: "nova-1000" url: "http://localhost/computer_media/nova-1000/" markdown_url: "http://localhost/computer_media/nova-1000.md" published_at: "2024-11-17T18:45:09+00:00" modified_at: "2026-04-03T07:58:02+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/11/NOVA_V1.jpeg" excerpt: "A machine code-powered demo featuring a scrollable virtual screen, a software real-time clock, and smooth multi-directional scroll animations driven entirely from BASIC." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" 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: "Weymil Corporation" slug: "weymil-corporation" taxonomy: "post_tag" url: "http://localhost/tag/weymil-corporation/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Wilf Rigter" slug: "wilf-rigter" taxonomy: "indiv" url: "http://localhost/indiv/wilf-rigter/" genre: - name: "Programming" slug: "programming" taxonomy: "genre" url: "http://localhost/type/programming/" media_type: "Program" programmers: - name: "Wilf Rigter" slug: "wilf-rigter" taxonomy: "indiv" url: "http://localhost/indiv/wilf-rigter/" download_url: "https://archive.org/download/timex-sinclair-software-archive/NOVA%201000%20%281986%29%28W.%20Rigter%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1986" producer_company: - id: 11440 title: "Weymil Corporation" type: "company" url: "http://localhost/company/weymil-corporation/" images: - url: "http://localhost/wp-content/uploads/2024/11/NOVA_V1.jpeg" - url: "http://localhost/wp-content/uploads/2024/11/NOVA_V2.jpeg" - url: "http://localhost/wp-content/uploads/2024/11/NOVA_V3.jpeg" - url: "http://localhost/wp-content/uploads/2024/11/Inst1-1-scaled.jpg" - url: "http://localhost/wp-content/uploads/2024/11/Inst2-1-scaled.jpg" - url: "http://localhost/wp-content/uploads/2024/11/Tape-14.jpg" related_products: - id: 39219 title: "NOVA 1000" type: "product" url: "http://localhost/product/nova-1000/" media_type_tags: "Programming" --- # NOVA 1000 NOVA 1000 is a demonstration program that showcases a custom display system driven by a large machine code routine embedded in line 0’s REM statement. The machine code, loaded above RAMTOP via RAND USR 16535, implements a real-time clock, a scrollable virtual screen backed by a 2000-character array A$, and a command/repeat control system managed through POKE addresses at 32625 and 32626. The program demonstrates smooth left-scrolling and upward-scrolling of a 25×34 character virtual display, then waits on a software real-time clock (initialized via S$ and transferred with RAND USR 32674) before proceeding to a “HELLO” animation sequence. A second array S$ is dimensioned using USR 32671 as its size argument, illustrating how the machine code exposes parameters back to BASIC through fixed memory addresses. *** ## Program Analysis ### Program Structure The program is organized into several distinct phases, each separated by REM comments that serve as documentation: 1. **Initialization (lines 10–50):** Clears memory, dimensions a 2000-character display array `A$`, fills its first 34 characters with an inverse-video title string, and transfers the machine code above RAMTOP via `RAND USR 16535`. 2. **Startup animation (lines 100–150):** Calls the main machine code entry at `RAND USR 32668`, then loops to print `B$` (“NOVA 1000”) diagonally across the screen while updating a line-count POKE. 3. **Virtual screen fill and scroll demo (lines 200–390):** Fills `A$` with repeated copies of the title row, injects a “PRESS ANY KEY” message, then performs left-scroll (34 steps) and upward-scroll (800 steps of 34) animations using `RAND USR 32680+N` as an offset parameter. 4. **Real-time clock sequence (lines 8000–8290):** Redefines `S$` with a size from `USR 32671`, loads a time string, transfers it to the RTC via `RAND USR 32674`, then polls until the clock passes “10:11:12:13” before launching a final animation loop. 5. **Save and listing (lines 9000–9020):** Saves the program, lists from line 3, and stops. ### Machine Code Routine The machine code is stored in the REM statement at line 0, which is a standard technique for embedding binary data in a BASIC program. The entry points exposed to BASIC are: | Address | Purpose | | --- | --- | | `32668 (0x7F9C)` — approx. `USR 32668` | Main initialization; sets up virtual screen pointers | | `USR 32671` | Returns the size to use when dimensioning `S$` | | `USR 32674` | Transfers `S$` contents to the real-time clock | | `USR 32677` | Transfers RTC back to `S$`; returns an offset for string comparison | | `USR 32680+N` | Renders the virtual screen with offset N (left/up scroll position) | The jump table visible near the end of the REM data (`\C3\00\7E`, `\C3\08\7F`, etc.) confirms that multiple Z80 `JP` instructions dispatch to different subsystem routines within the machine code block. The addresses `32625` and `32626` act as control registers: 32625 governs the command/repeat mode (3 = trace/command off, 2 = repeat on) and 32626 specifies the number of lines to display. ### Virtual Screen Technique Rather than manipulating the display file directly, the program maintains a 2000-character array `A$` (25 rows × 34 columns, slightly wider than the 32-column screen plus padding) as an off-screen buffer. The machine code reads this buffer and copies the appropriate window into the display file based on the offset passed as the low byte of the `RAND USR` argument. This allows smooth horizontal and vertical scrolling without BASIC-level string manipulation of the display. The left-scroll loop at lines 300–320 passes offsets 1 through 34 (one full row width), while the upward-scroll loop at lines 340–380 passes offsets 1 through 800 in steps of 34 (one row at a time), also decrementing the displayed line count variable at 32626 to create an upward-wipe effect. ### Real-Time Clock Integration The RTC subsystem is initialized by writing a time string in `"HH:MM:SS:ff "` format into `S$` and calling `RAND USR 32674`. Polling is done entirely in BASIC at lines 8100–8110: `S$(USR 32677+1 TO 11)` uses the return value of the machine code call as a dynamic string slice index, comparing the current clock value against a target time string. This is an unusually tight integration between machine code return values and BASIC string slicing. ### Key BASIC Idioms - `RAND USR addr+N` — passes a parameter to machine code via the low byte or full 16-bit value of the expression; used extensively for scroll offset control. - `DIM S$(USR 32671)` — uses a machine code return value directly as the array dimension, allowing the machine code to specify the required buffer size. - `S$(USR 32677+1 TO 11)` — uses a machine code return value as a dynamic string slice start index inside a conditional expression. - Inverse-video characters in `A$(1 TO 34)` at line 30 produce a highlighted title banner in the virtual screen buffer. - The `GOTO 330` at line 390 creates a continuous scroll loop that only exits on a keypress, using `INKEY$=""` as the idle condition. ### Notable Anomalies - Line 2801 re-assigns `A$(851 TO 918)` with the same “PRESS ANY KEY” message that was set at line 280, suggesting this block may be part of a repeat/loop path rather than dead code, though the flow from line 460 does not obviously reach it in a single pass. - The REM at line 9900 notes a typo in the listing itself (“HVE” for “HAVE”, “LISTIG” for “LISTING”), indicating the comment was typed directly without correction. - Lines 8250–8280 pass offsets 0, 33, 66, … 700 to the scroll routine (step 33, not 34), which differs from the earlier scroll loop’s step of 34. This slight mismatch may produce a mild visual drift in the final animation sequence. ## Source Code ``` 0 REM 76761FF1F6FFCDC8A11B019ED5B3240EDB0C9CD23FF6FFCDC8A11220191107E1FF1EDB021FF7D224402B363E2BF92B2B22240CD2BFC3766DD2157EC9CD4D7ECDDC7ECD577ECD877ECD3D7ECD367E67CD2C7E3EEC8CDAB7ECD757FDD2157EC3A42000000010FEC9F5C5D5E5C33E23A717FCB4F284AF322740DDE1C3A2262CD2C7E217A7F184A629CD307EED5B737F7BB22892A10401911501892AC40191110200193A727FE61F47777C63B8E8181D673CD327E3A717FCB572058D698C9AF2A104011210ED52181CBFC3EDDC34103A717FCB47C811977F2A740118FCCDCE7E19CFFCDCE7E1F6FFCDCE7E3E1C851893E1C93C38FCED423DE63F1213C911847F2177F68371ACE0BE3F383121833E1C121B2BCB7E2821B2B10E9C92626802226802226802226AF2A164011F0ED527E21787F77E2060C9CD287F184CD287FEBEDB018192A1640E3E521787FCD4D0CD1C11116019117A7F1B0C9E1221640C92A1640E5E72A10407EFEC62010CD01321403EBED52385CDDD12303100ED43737F18D50000071400C9003FD1C1CE1C1CE1C1CE1C1C0033343B2601D1C1C1C03B1D1B1C00000013C307EC387FC31B7FC3207FC3467F000000000000000000000000000000000000 3 REM N0VA 1.0 (C)1986 W.RIGTER 4 REM SEE 9900 REM 10 CLEAR 19 REM VIEWABLE ARRAY 20 DIM A$(2000) 30 LET A$(1 TO 34)="% % %N%O%V%A% %1%0%0%0% %V%1%.%0% %(%C%)%8%6% %W%.%R%I%G%T%E%R% % % " 40 LET B$="NOVA 1000" 49 REM TRANSFER ABOVE RAMTOP 50 RAND USR 16535 99 REM START NOVA 1000 100 RAND USR 32668 120 FOR N=0 TO 21 130 POKE 32626,N+1 140 PRINT AT N,N;B$; 150 NEXT N 199 REM LINE=1 FOR FAST- SLOW 200 POKE 32626,1 210 CLS 219 REM OFFSET=1/TOP OF ARRAY 220 RAND USR 32680+1 239 REM FILL ARRAY 240 FOR N=35 TO 25*34 STEP 34 250 LET A$(N TO N+33)=A$(1 TO 34) 260 NEXT N 269 REM LINES=22 270 POKE 32626,22 280 LET A$(817 TO 918)=">PRESS ANY KEY TO RETURN TO DFILE<" 289 REM TURN OFF COMMAND 290 POKE 32625,3 299 REM SCROLL LEFT 300 FOR N=1 TO 34 310 RAND USR 32680+N 320 NEXT N 330 LET A=25 339 REM SCROLL UP 340 FOR N=1 TO 800 STEP 34 350 POKE 32626,A 360 RAND USR 32680+N 370 LET A=A-1 380 NEXT N 390 IF INKEY$="" THEN GOTO 330 399 REM LINES=1 400 POKE 32626,1 409 REM OFFSET=0 /NORMAL SCREEN 410 RAND USR 32680+0 440 PRINT A$(1 TO 704); 449 REM LINES=24 450 POKE 32626,24 459 REM REPEAT ON 460 POKE 32625,2 2801 LET A$(851 TO 918)=">PRESS ANY KEY TO RETURN TO DFILE<" 7999 REM REDEFINE COM VAR TO S$ 8000 DIM S$(USR 32671) 8029 REM SET REAL TIME CLOCK 8030 LET S$(1 TO 24)="10:11:05:00 " 8039 REM TRANSFER S$ TO RTC 8040 RAND USR 32674 8050 PRINT AT 12,0;" WAITING FOR 10:11:12:13 " 8099 REM TRANSFER RTC TO S$ AND TEST 8100 IF S$(USR 32677+1 TO 11)>"10:11:12:13" THEN GOTO 8200 8110 GOTO 8100 8209 REM TRACE 0N 8210 POKE 32625,3 8219 REM 22 LINES 8220 POKE 32626,22 8230 CLS 8240 PRINT AT 12,14;"HELLO" 8250 FOR N=0 TO 700 STEP 33 8260 RAND USR 32680+N 8270 RAND USR 32680+0 8280 NEXT N 8290 GOTO 120 9000 SAVE "V%1" 9010 LIST 3 9020 STOP 9900 REM THIS PROGRAM DOES NOT HVE A COMMAND LINE. YOU MAY HAVE TO HIT A KEY SEVERAL TIMES BEFORE THE PROGRAM STOPS. PRESS SHIFT/1 THEN ENTER TO SEE BASIC LISTIG. START WITH RUN. PAUSE 0 WILL STOP ALL AUTO FUNCTIONS. ```