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:
- 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 viaRAND USR 16535. - Startup animation (lines 100–150): Calls the main machine code entry at
RAND USR 32668, then loops to printB$(“NOVA 1000”) diagonally across the screen while updating a line-count POKE. - 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 usingRAND USR 32680+Nas an offset parameter. - Real-time clock sequence (lines 8000–8290): Redefines
S$with a size fromUSR 32671, loads a time string, transfers it to the RTC viaRAND USR 32674, then polls until the clock passes “10:11:12:13” before launching a final animation loop. - 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 ( 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. The program is organized into several distinct phases, each separated by REM comments that serve as documentation: 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: The jump table visible near the end of the REM data ( Rather than manipulating the display file directly, the program maintains a 2000-character array 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. The RTC subsystem is initialized by writing a time string in Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.\C3
Skip to content
, NOVA 1000
Program Analysis
Program Structure
A$, fills its first 34 characters with an inverse-video title string, and transfers the machine code above RAMTOP via RAND USR 16535.RAND USR 32668, then loops to print B$ (“NOVA 1000”) diagonally across the screen while updating a line-count POKE.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.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.Machine Code Routine
Address Purpose 32668 (0x7F9C) — approx. USR 32668Main initialization; sets up virtual screen pointers USR 32671Returns the size to use when dimensioning S$USR 32674Transfers S$ contents to the real-time clockUSR 32677Transfers RTC back to S$; returns an offset for string comparisonUSR 32680+NRenders the virtual screen with offset N (left/up scroll position) \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
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.Real-Time Clock Integration
"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.A$(1 TO 34) at line 30 produce a highlighted title banner in the virtual screen buffer.GOTO 330 at line 390 creates a continuous scroll loop that only exits on a keypress, using INKEY$="" as the idle condition.Notable Anomalies
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.Content
Source Code
0 REM 7676 1FF 1F6FFCDC8 A11 B 019ED5B3240EDB0C9CD23 FF6FFCDC8 A1122 01911 07E 1FF 1EDB021FF7D22 4402B363E2BF92B2B22 240CD2B FC376 6DD21 57EC9CD4D7ECDDC7ECD577ECD877ECD3D7ECD367E 6 7CD2C7E3EEC 8CDAB7ECD757FDD21 57EC3A4 2 0 0 0 0 0 0 010FEC9F5C5D5E5C33E 23A717FCB4F28 4AF322740DDE1C3A2 2 6 2CD2C7E217A7F184A 629CD307EED5B737F7BB228 92A10401911 5 018 92A C401911 1 020 0193A727FE61F47 7 7 7C63B 8 E 8181D 673CD327E3A717FCB5720 5 8D6 9 8C9AF2A10401121 0ED52 1 8 1CBFC3EDDC341 03A717FCB47C811977F2A 740 118FCCDCE7E 19CFFCDCE7E 1F6FFCDCE7E3E1C8518 93E1C 93C38FCED423DE63F1213C911847F21 77F 6 8371ACE 0BE3F38 31218 33E1C121B2BCB7E28 21B2B10E9C92626802226802226802226AF2A164011 F 0ED527E21787F77 E20 6 0C9CD287F18 4CD287FEBEDB018192A1640E3E521787FCD4D 0CD1C1111 6 019117A7F 1 B 0C9E1221640C92A1640E5E72A10407EFEC62010CD 0132140 3EBED5238 5CDDD1230 3 1 0 0ED43737F18D5 0 0 0 0 0 714 0 0C9 0 03F D1C1C E1C1C E1C1C E1C1C 0 033343B26 01D1C1C1C 03B1D1B1C 0 0 0 0 0 013C3 07EC3 87FC31B7FC3207FC3467F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
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.
\C3F, 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 330at line 390 creates a continuous scroll loop that only exits on a keypress, usingINKEY$=""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.
Content
Source Code
0 REM 7676 1FF 1F6FFCDC8 A11 B 019ED5B3240EDB0C9CD23 FF6FFCDC8 A1122 01911 07E 1FF 1EDB021FF7D22 4402B363E2BF92B2B22 240CD2B FC376 6DD21 57EC9CD4D7ECDDC7ECD577ECD877ECD3D7ECD367E 6 7CD2C7E3EEC 8CDAB7ECD757FDD21 57EC3A4 2 0 0 0 0 0 0 010FEC9F5C5D5E5C33E 23A717FCB4F28 4AF322740DDE1C3A2 2 6 2CD2C7E217A7F184A 629CD307EED5B737F7BB228 92A10401911 5 018 92A C401911 1 020 0193A727FE61F47 7 7 7C63B 8 E 8181D 673CD327E3A717FCB5720 5 8D6 9 8C9AF2A10401121 0ED52 1 8 1CBFC3EDDC341 03A717FCB47C811977F2A 740 118FCCDCE7E 19CFFCDCE7E 1F6FFCDCE7E3E1C8518 93E1C 93C38FCED423DE63F1213C911847F21 77F 6 8371ACE 0BE3F38 31218 33E1C121B2BCB7E28 21B2B10E9C92626802226802226802226AF2A164011 F 0ED527E21787F77 E20 6 0C9CD287F18 4CD287FEBEDB018192A1640E3E521787FCD4D 0CD1C1111 6 019117A7F 1 B 0C9E1221640C92A1640E5E72A10407EFEC62010CD 0132140 3EBED5238 5CDDD1230 3 1 0 0ED43737F18D5 0 0 0 0 0 714 0 0C9 0 03F D1C1C E1C1C E1C1C E1C1C 0 033343B26 01D1C1C1C 03B1D1B1C 0 0 0 0 0 013C3 07EC3 87FC31B7FC3207FC3467F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
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.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.











