High Resolution Graphics is a machine code graphics toolkit for the ZX81/TS1000 that provides a 256×192 (or similar high-resolution) pixel display system accessible via direct USR calls. The program documents eight entry points—spanning addresses 16514 through 17600—that handle switching to the high-res screen, returning to the standard Sinclair display, clearing and inverting the high-res frame buffer, plotting and unplotting individual points, testing a point’s state, and driving an uppercase/lowercase printer routine. The REMs at line 0 and line 1 contain dense machine code stored as tokenized BASIC data, a common technique for embedding Z80 routines directly in the program file. Lines 20–320 serve as a self-contained demonstration and can be deleted once the USR entry points are in use, as noted by the on-screen instructions. A companion “BUSTOUT” breakout game and a “SAMPLE” program are included, both relying on the same machine code kernel loaded into memory above the BASIC area.
Program Analysis
Program Structure
The listing actually contains three independent programs sharing a common machine code kernel embedded in REM statements:
- High Resolution Graphics loader/demo (lines 10–320) — documents entry points and runs a brief display demonstration.
- BUSTOUT (lines 1–60 of the second block) — a Breakout-style game that calls
USR 17298for its main game loop. - SAMPLE (lines 10–120 of the third block) — a skeleton that invokes the hi-res screen and waits for a keypress before returning to the standard display.
The machine code payload is stored in REM lines 0 and 1 of the respective blocks. Because the ZX81/TS1000 BASIC interpreter stores the raw bytes of a REM line verbatim, this is the standard method for embedding Z80 binary data inside a BASIC file without needing a separate loader.
Machine Code Entry Points
The BASIC documentation at lines 80–170 lists eight USR entry points. Their advertised functions are:
| Address | Function |
|---|---|
16514 | Switch to the high-res display |
16563 | Return to the standard Sinclair display |
16572 | Clear the high-res display |
16594 | Plot a point |
16598 | Unplot a point |
16602 | Test a point |
17285 | Upper/lowercase printer driver |
17572 | Print out the high-res screen |
17600 | Invert the high-res screen |
The close spacing of addresses 16594, 16598, and 16602 (4 bytes apart each) strongly suggests a common pixel-address calculation subroutine shared by all three point operations, with each entry point branching into it and then performing a set, reset, or test of the relevant bit.
Demonstration Sequence (Lines 240–320)
The demo loop at lines 240–280 iterates N from 0 to 20, POKEing 16417 with N before each RAND USR 17285 call. Address 16417 is a system variable, and passing an incrementing value there likely selects successive character rows or scroll positions for the printer driver, creating a scrolling text effect. After the loop, RAND USR 17600 inverts the screen, SLOW restores normal display mode, and RAND USR 16514 switches to the hi-res framebuffer. The program then spins at line 290 waiting for any keypress, then FASTs, CLSes, and calls RAND USR 16563 to restore the standard display.
Key BASIC Idioms
RAND USR <address>— the idiomatic way to call machine code from BASIC; the return value in HL is discarded by RAND, preventing any type-mismatch error.IF INKEY$ ="" THEN GOTO 290— a busy-wait keypress loop; the program blocks here until any key is pressed.POKE 16417,Ninside the demo loop passes a parameter to the machine code via a fixed memory location rather than through a register, a common technique when calling Z80 routines that do not use the BASIC parameter stack.SLOW/FASTat lines 284 and 300 switch between the display-generating (SLOW) and non-display (FAST) modes, necessary when the hi-res driver manages the display independently.
REM-Embedded Machine Code
The lengthy REM at line 0 (and its counterpart in the other program blocks) contains the entire Z80 machine code binary. When the BASIC file is loaded, this data sits at a fixed offset from the start of the BASIC area. The RAND USR 16572 at line 30 is the first call, using it to initialize or clear the hi-res buffer before the demo proceeds. Because the REM content is rendered here as tokenized BASIC keywords (the file’s bytes happen to match keyword token values), the disassembly-like appearance of the REM line is an artifact of the tokenizer, not actual BASIC code.
BUSTOUT Integration
The BUSTOUT game calls USR 17298, an entry point not listed in the documentation panel, suggesting it is an internal game-logic routine within the same machine code block. The game uses PAUSE 3E4 (approximately 30,000 display frames) at line 30 as a long delay, and its main loop is entirely handled in Z80 code. Lines 1–9 provide instructions and wait for a keypress before starting; line 10 launches the machine code game engine.
SAMPLE Program
The SAMPLE skeleton (third block, lines 30–120) calls the same three USR entry points — 16572 (clear), 16514 (show hi-res), and 17298 (game/demo loop) — confirming the shared kernel design. Line 110 begins a FOR N=18024 TO 18081 loop with only a REM body, indicating that range covers the machine code area and the loop was likely used during development to examine or verify memory contents.
Anomalies and Notes
- Line 200 instructs the user to press ENTER to exit, but the actual wait at line 290 responds to any key, not specifically ENTER.
- The
SAVE "HIRE[S]"at line 20 andSAVE "BUSTOU[T]"/SAVE "SAMPL[E]"in the other blocks allow each program to re-save itself with its machine code REM intact. - Lines 20–320 are explicitly noted as removable once the USR entry points are in use, making the toolkit self-documenting in its own source.
Content
Source Code
0 REM Y: GOSUB #<>5["]RNDTAN 5 TO NEW)5 NEXT : RETURN▞-( RETURN▞"" GOSUB #PEEK COPY;LN INT RND▌TAB [,]RNDLN [>]▝LN 4▝<>5["]RND#[8]▝Y2 GOSUB #<>5▟▝TAN 5 #:""▞4Q~~7( CLSQTAN 7$4 NEXT TAN DIM TAN : /▞:▘/▝:▝U#RND #A ##DDDDD;U#RND RETURN█K#▞▒ACS ZK▝ACS SACS ZK▖ACS SACS S#-#;# FAST5ZINKEY$ ##[Y]C▀7/ IF [R] GOSUB ###[R]4▖#[K]/▞X4~~#J[5]#;# LPRINT #/▘ LPRINT #[5]C▌R▘▘ TAN ▘ [R]TAN RETURN▝~~A▜[)]["]9[Z]▙▝Z[9]")▖[A][~~][$][$]~~~~~~~~~~▗>>)>>[-]Q[-][X][-]S[-]Q~~Q~~~~~~Q~~[-]££[-]B~~BL▌▌▌▌▌L▌LLLLL▌BL▜£▜LB£8▜L▜8£~~~~[-]~~~~[-]~~~~QQ[-]QQ~~~~~~~~[-]~~~~~~~~,,[Z]Q[Z],,~~£8▜L▌>▝~~Q~~~~Q▌~~~~~~~~~~~~Q▌~~~~~~~~~~QQ[Z]?????[Z]▌[X]QQQQQ[.]▀£[-]>>[-][-]££[-]££[-]???[-]£££[-]>>[Z]££[Z][-]>>[-]??[-][-]£8▜L▌>▙▀▀▙▀▀▙[-]??[-]££[-]~~~~[Z][D][D][Z]£>>[-]???[-]~~~~[-]>>>[-]££[-]???[-]~~~~[-]?[-]>[-][Z]▌▌[-]▌▌▌~~~~[-]?[-]£[-]>>[-]????L~~LLLLL£~~££££[-]>>[:][X]B[X][:]LLLLLLL~~~~[-]TTTT~~~~[-]????~~~~[-]???[-]~~~~[-]?[-]>>~~~~[-]?[-]1A~~~~[-]>>>>~~~~[-]>[-]£[-]LL[-]LLL[.]~~~~????[-]~~~~?[D]QQL~~~~TTTT[-]~~~~?[D]Q[D]?~~~~??[-]£[-]~~~~[-]▜QQ[-][-]??[-]???[-]??[-]??[-][-]>>>>>[-][Z][D]▀▀▀[D][Z][-]>>[-]>>[-][-]>>[-]>>>[-]>>>[:]?[-]▀▀▀▙▀▀▀[Z]QQQQQ[Z]£££££O[.]?[:][X]B[X][:]?>>>>>>[-][-]TTTTTT▀99▞██▀[-]?????[-][-]??[-]>>>[-]???T[:][-][-]??[-][X][X][:][-]>>[-]££[-][-]QQQQQQ??????[-]??[D][D]QQLTTTTTT[-]?[D][D]Q[D][D]??[D]QLQQQ[-]▜▜QQQ[-]YYY""#YYC##[>]#YU5RNDA #▘ #DDD##DDDDD,,;6##E£RND76##E### RETURN# RETURN C#CHR$ "M▟# RETURN[,]S▌CHR$ #M▟#E### RETURNTAN COS 6▙#▘ U▟#A ###DDD[B] GOSUB #,,)#INKEY$ ;#ACS [R]E###)5 ;6##£Y▛[T]4 OR E▙#76##E##76##/[7]E##76##/ INPUT 76##E##76##/▙E##76##/ INPUT -▘5WRNDLN SCROLL▝VAL FAST[J]#PEEK CLS LPRINT LN #?S▌3PEEK CLSINT £<= CLS▗ IF THEN▒K INPUT FASTSTR$ # RETURN▝[3][7]▛[7]###7 RETURN#C8 FASTACS B▗▗A▛ACS =▄#ACS )[3][I]#▞▒#ACS ▘3#<= CLS3K CLS#PEEK CLS( LET LPRINT /STR$ <= CLS3K CLS#?PEEK CLSSGN 0ACS #▞[B]AT +4[4]Y▖PEEK CLSLN ▛▝AT 5#RNDQ#▞4FQ ( CLS#ACS COPYMSRNDTAN Y""5 #)WRND▘4 FAST PRINT GOSUB [K]LN 4# LET LPRINT ▘5 ,,X4 REM TAN 5 #2█:""▞4#▚#7( IF 7$4 POKE TAN G BIRD (C) 1984
10 REM HIGH RESOLUTION GRAPHICS PROGRAM VERSION 2.1 (C) 1984 CRAIG BIRD
20 SAVE "HIRE[S]"
30 RAND USR 16572
40 PRINT "[H][I][G][H] [R][E][S][O][L][U][T][I][O][N] [G][R][A][P][H][I][C][S] [P][R][O][G][R][A][M]"
50 PRINT " [V]ERSION 2"
60 PRINT " ([C]) 1984 BY [C]RAIG [B]IRD"
70 PRINT
80 PRINT "16514-[G]OTO HIGH RES SCREEN"
90 PRINT "16563-[R]ETURN TO [S]INCLAIR DISPLAY"
100 PRINT "16572-[C]LEAR HIGH-RES DISPLAY"
110 PRINT "16594-[P]LOT A POINT "
120 PRINT "16598-[U]NPLOT A POINT"
130 PRINT "16602-[T]EST A POINT"
140 PRINT "17285-[U]/[L] CASE PRINTER"
150 PRINT "17572-[P]RINT OUT HIGH-RES SCREEN"
160 PRINT "17600-[I]NVERT HIGH-RES SCREEN"
170 PRINT
180 PRINT "[L]INES 20 TO 320 MAY BE REMOVED"
190 PRINT
200 PRINT "[P]RESS [E][N][T][E][R] TO EXIT"
240 FOR N=0 TO 20
250 POKE 16417,N
260 RAND USR 17285
270 SCROLL
280 NEXT N
282 RAND USR 17600
284 SLOW
286 RAND USR 16514
290 IF INKEY$ ="" THEN GOTO 290
300 FAST
310 CLS
320 RAND USR 16563
0 REM Y: GOSUB #<>5["]RNDTAN 5 TO NEW)5 NEXT : RETURN▞-( RETURN▞"" GOSUB #PEEK COPY;LN INT RND▌TAB [,]RNDLN [>]▝LN 4▝<>5["]RND#[8]▝Y2 GOSUB #<>5▟▝TAN 5 #:""▞4Q~~7( CLSQTAN 7$4 NEXT TAN DIM TAN U9RND RETURN COPY4 RAND LN ▙RND5[S]#:▒LN AT RND#P#W###### RETURNTAN COS RETURN~~4▝: RETURN£4▝:▀ RETURN▜4▝:£ RETURN[)]4▝:? RETURNI4▝:K RETURN[M]4▝:N RETURN[Z]4▖7£/ RUN FASTCHR$ 0#A ; FOR LPRINT 7# RETURN<C+ RETURN#C) FASTSTR$ LPRINT ▞,,;FLN ▖INKEY$ 7( SAVE FOR LPRINT /PEEK [*][T]COS [B] GOSUB # GOSUB # FOR [B]TAN 6MRNDACS [W]SGN TAN UVRND PRINT LN F?LN ##[B]4▝INT COPY RETURNC4 POKE LET ACS #""#7?###P?### PRINT ▒#▘ ##"VAL ▞(##5 DACS )*K▘;( RUN AT TAN :▘/▞:▝/▝: #[E] NEW█#STR$ LN GOSUB INKEY$ STOPLN GOSUB INKEY$ FOR LPRINT #[B]CQ#[L] FAST GOSUB # GOSUB # FASTAT SGN 5 RZ PRINT ##2▒DK▌[?] GOSUB #/,,▗ GOSUB #S▀ GOSUB PIXW14 GOTO # LET K LLIST ACS #4▘ FOR ACS #COS /"LN #INKEY$ ACS (SQR /▀#▛SQR FOR [B] GOSUB # GOSUB #TAN #▛S▞[P]COS 5▘ TAN 5 COPY COPYTAN [B] GOSUB #TAN [B] GOSUB ##[P]5 ""GTAN [B] GOSUB #COS / STOP FOR ▘ █/▖ FOR ▘▘█#[C]##[C]# GOSUB #A ##** INPUT ▘#TAN #[P]5 COS #[N]COS GTAN #[P][M] GOSUB #/ PRINT Y▘/▘[J] STOP#7#7 STOPFD;[B]C▒ FOR LPRINT STOP FOR #7#TAN #7# FOR TAN FOR LN #PI FOR TAN STR$ )# GOSUB #MRND▀##LN ,,< FAST##LN ,,<AT #▟K▘▖##[(]K▘9#F##INKEY$ U5RNDACS #4,ACS #4~~ACS #C▞Y-NOT LN LIST INKEY$ ▘ LIST **2 COPYVAL LN LPRINT ▛LN [H]~~ FASTAT 5#RND#20#ACS #C▘#[*] GOSUB #▄NOT [*] GOSUB #▄NOT ACS #ACS IF C LOAD TAN LPRINT #7 RETURN#CJ RETURN#4▀NOT / NEXT LN #INKEY$ / INPUT [*]/▝Y[(]##5KRND##STR$ FASTLN [M]" LPRINT SGN #TAN LN £PI#[P] STOP#7#7 STOP"" LPRINT FOR DIM # NEW3# CLEARACS ▘#C~~ CLEAR[-]SACS COPYLEN WUSR #▒ CLEAR▚T RETURN5UURND THEN▘LN IF ▒ CLEARACS ▘LEN TAN LPRINT #7#7 FASTSTR$ 5▛ ;▞▖#F#FSTR$ ( RAND LPRINT AT SGN #; FOR LPRINT STOP#7#VAL LPRINT ▛K▘ FOR LN .PI LPRINT **AT DIM FOR #TAN AT FASTAT TAN #A TAN ) AND ZSTR$ FASTTAN VAL LPRINT TAN FOR LN ## FOR TAN LN ##S CLSLN ##K CLSSTR$ LN [V]▝ FASTAT G#C▖LN [X]▛#A #SGN TAN 5? 6##5 6##5- 6##5▀ 6█#5 6▙#5# 6▜#5 COPY COPY6▚#5▘ 6[▒]#5[W]RNDLN ##6MRND5▙RNDLN ##6MRND5 6[~~]#5▀ 6[£]#5▘ 6[:]#5 GOTO #6[(]#55#6[>]#5 NEW#6[=]#5▘ 6[-]#5▖#6[/]#E[>]#LN ##)TAN LN =PILN CLEARPIF#)▒▘E[~~]#LN [,]INKEY$ FOR E[>]#; FAST5[-] SGN LN ##LN J#[>]#LN J#[~~]#5* 6[,]#E##6[0]#)▘ E▜#LN 5PILN IF PI##5 6[~~]#E▜#6[£]#5▘ 6[:]#5##6[(]#LN J#[~~]## THEN#E[0]#6[2]#E##6[0]#LN ##5 6[~~]#5▝ 6[£]#5▘ 6[:]#5[-]#6[(]#5▖ 6[>]#5▛ 6[=]#5▘ 6[-]#5[I]#6[/]# GOSUB #[~~]#E[4]#; FAST)5 E[>]#LN [,]INKEY$ FOR LPRINT ; FAST5~~ SGN LN ##LN J#[>]#LN J#[~~]#E[2]#6[0]#LN ##)▀ LN #PILN [-]INKEY$ )▝ LN ,,PILN CLEARPI RETURN#)▘ E▜#LN ▌PI6▜#)8 LN ##LN ,,PI FAST)1 E[0]#LN =PI FOR LPRINT LN PPILN CLEARPI9#)▘ E[0]#;6[0]#)5 LN ##LN ,,PI FAST) E[0]#LN =PI FOR LPRINT LN PPILN CLEARPI##)▘ E[0]#LN ▌PI6[0]# GOSUB #[0]#E##LN =PILN CLEARPI##LN ##E[0]#6##LN ##5 6[~~]#5▝ 6[£]#5▘ 6[:]#5▟#6[(]#5▌ 6[>]#5▛ 6[=]#5▘ 6[-]#5[;]#6[/]# GOSUB #[~~]#E[4]#; FAST)5 E[>]#LN [,]INKEY$ FOR LPRINT ; FAST5C SGN LN ##LN J#[>]#LN J#[~~]#)▐ E[4]#; FAST5[C] SGN LN ##)▀ LN #PILN [-]INKEY$ )▝ LN ,,PILN IF PIP#E▙#6[0]#E##6[,]#LN ##5 6[>]#5▛ 6[=]#5▘ 6[-]#5~~#6[/]#)5 E[>]#LN [,]INKEY$ FOR E[4]#; FAST5~~ SGN LN ##LN J#[>]# GOSUB #▚#E##;6## GOSUB #[▒]#E▙#;6▙#E▙#6[0]#E##6[,]#LN ##)▜ E[4]#;LN ##)[C] LN ,,PILN IF PI##)LEN E[4]#;LN ##)C LN ,,PILN IF PI##)# E[4]#;LN ##)[-] LN ,,PILN IF PI##) E##LN ,,PILN CLEARPI[1]#5▘ 6▚#)* E##LN ,,PILN IF PI[2]#) E▙#LN ,,PI FAST)3 E▙#LN ,,PI FOR LPRINT LN RNDPILN CLEARPISGN #E[▒]#LN LIST INKEY$ 6[▒]#E▙#6[0]#E##6[,]#LN ##E[4]# FAST5[Z] SGN LN ##)5 E[4]#; FAST5[-] SGN LN ##5▝ 6[>]#5▌ 6[=]#5▘ 6[-]#5>#6[/]#)5 E[>]#LN [,]INKEY$ FOR E[4]#; FAST5C SGN LN ##LN J#[>]#)LEN E[4]#; FAST5[-] SGN LN ##) SCROLL E[4]#; FAST5[Z] SGN LN ###P#)▘ E##LN ▌PI6##5 COPY COPY6▚##[F]#E▚#LN LIST INKEY$ 6▚#)~~ E##;6##) ▌E##LN [>]INKEY$ FOR 5 ▌LN [,]INKEY$ FOR E##LN ▌PI) LN ,,PILN IF PI[.]##[,,]##TAB #)▘ E█#LN ▌PI6█#)5 LN ##LN ,,PI FAST)8 LN ##LN ,,PI FOR LPRINT LN RNDPI FAST) COPY LN ##LN ,,PI FOR LPRINT LN RNDPILN IF PI[E]#5- 6##5 6▙#5 COPY COPY6▚#5▘ 6[▒]#5? 6##5[N]RNDLN ##6MRND5 FAST5 SGN LN #INKEY$ LN ABS PISCORE>#E##LN [>]PILN ABS PI<#LN [:]"LN ABS PILIVES=#E█#LN [>]PIY#NOT ) E█#LN 4PILN IF PIABS RND5~~ FAST5" SGN LN #INKEY$ LN ABS PIGAME OVER#Y#NOT LN ## GOSUB #[0]#5 #; FAST)▒▘E[,]#LN [,]INKEY$ FOR LPRINT ;6[4]#LN ##? [-] - V COPY COPY▘ ▀ ▝ ▘ ▟#▒ ▛ ▘ ~~#* < £ ACS #
1 REM BUSTOUT BYDALE BIRD
2 GOTO 10
3 SAVE "BUSTOU[T]"
4 SLOW
5 PRINT " BUST OUT",,,
6 PRINT "THE OBJECT OF THE GAME IS TODEFLECT THE BALL OFF YOUR PADDLETO HIT THE BRICKS ABOVE.YOU MUSTNOT LET THE BALL GET PAST YOU ORYOU WILL LOSE ONE OF YOUR INITIAL THREE BALLS"
7 PRINT ,,"WHEN YOU MISS THE BALL HOLD DOWNANY KEY TO SEE THE SCORE THEN RELEASE IT.",,,,"USE THE ""5"" KEY TO GO LEFT AND THE ""8"" KEY TO GO RIGHT"
8 PRINT ,,,,,,,,,,,,"PRESS ANY KEY TO BEGIN"
9 IF INKEY$ ="" THEN GOTO 9
10 CLS
20 LET A=USR 17298
30 PAUSE 3E4
40 CLS
50 GOTO 5
60 REM
1 REM Y: GOSUB #<>5["]RNDTAN 5 TO NEW)5 NEXT : RETURN▞-( RETURN▞"" GOSUB #PEEK COPY;LN INT RND▌TAB [,]RNDLN [>]▝LN 4▝<>5["]RND#[8]▝Y2 GOSUB #<>5▟▝TAN 5 #:""▞4Q~~7( CLSQTAN 7$4 NEXT TAN DIM TAN -#U#RNDACS ZACS Z#A U#RND###DDDDD,,;### RETURNTAN COS RETURN~~4▝: RETURN£4▝:▀ RETURN▜4▝:£ RETURN[)]4▝:? RETURNI4▝:K RETURN[M]4▝:N RETURN[Z]4▝:W RETURN▙4▝:Z RETURN▝4▝:"" RETURNZ4▝:# RETURN[9]4▝:ATN RETURN"4FLN ▖INKEY$ 7( SAVE FOR LPRINT /PEEK [*][T]COS [B] GOSUB # GOSUB # FOR [B]TAN 6MRNDACS [W]SGN TAN UVRND PRINT LN F?LN ##[B]4▝INT COPY RETURNC4 POKE LET ACS #""#7?###P?### PRINT ▒#▘ ##"VAL ▞(##5 DACS )*K▘;( RUN AT TAN :▘/▞:▝/▝: #[E] NEW█#STR$ LN GOSUB INKEY$ STOPLN GOSUB INKEY$ FOR LPRINT #[B]CQ#[L] FAST GOSUB # GOSUB # FASTAT SGN 5 RZ PRINT ##2▒DK▌[?] GOSUB #/,,▗ GOSUB #S▀ GOSUB PIXW14 GOTO # LET K LLIST ACS #4▘ FOR ACS #COS /"LN #INKEY$ ACS (SQR /▀#▛SQR FOR [B] GOSUB # GOSUB #TAN #▛S▞[P]COS 5▘ TAN 5 COPY COPYTAN [B] GOSUB #TAN [B] GOSUB ##[P]5 ""GTAN [B] GOSUB #COS / STOP FOR ▘ █/▖ FOR ▘▘█#[C]##[C]# GOSUB #A ##** INPUT ▘#TAN #[P]5 COS #[N]COS GTAN #[P][M] GOSUB #/ PRINT Y▘/▘[J] STOP#7#7 STOPFD;[B]C▒ FOR LPRINT STOP FOR #7#TAN #7# FOR TAN FOR LN #PI FOR TAN STR$ )# GOSUB #MRND▀##LN ,,< FAST##LN ,,<AT #▟K▘▖##[(]K▘9#F##INKEY$ U5RNDACS #4,ACS #4~~ACS #C▞Y-NOT LN LIST INKEY$ ▘ LIST **2 COPYVAL LN LPRINT ▛LN [H]~~ FASTAT 5#RND#20#ACS #C▘#[*] GOSUB #▄NOT [*] GOSUB #▄NOT ACS #ACS IF C LOAD TAN LPRINT #7 RETURN#CJ RETURN#4▀NOT / NEXT LN #INKEY$ / INPUT [*]/▝Y[(]##5KRND##STR$ FASTLN [M]" LPRINT SGN #TAN LN £PI#[P] STOP#7#7 STOP"" LPRINT FOR DIM # NEW3# CLEARACS ▘#C~~ CLEAR[-]SACS COPYLEN WUSR #▒ CLEAR▚T RETURN5UURND THEN▘LN IF ▒ CLEARACS ▘LEN TAN LPRINT #7#7 FASTSTR$ 5▛ ;▞▖#F#FSTR$ ( RAND LPRINT AT SGN #; FOR LPRINT STOP#7#VAL LPRINT ▛K▘ FOR LN .PI LPRINT **AT DIM FOR #TAN AT FASTAT TAN #A TAN ) AND ZSTR$ FASTTAN VAL LPRINT TAN FOR LN ## FOR TAN LN ##S CLSLN ##K CLSSTR$ LN [V]▝ FASTAT G#C▖LN [X]▛#A #SGN TAN 5TAB #LN ##6##5##LN ##6##5CODE #6##5##6##5▝ 6##5[W]#6##) PRINT #E##LN ,,PILN CLEARPIUSR #)▘ E##;6##E##LN ##) LN ,,PILN IF PI>#E##LN ##6##)▘ E##;LN ##6##LN M#E##6##E##6##LN J####Z#)▘ E##;6##E##LN ##6##)▘ E##;LN ##6##)▝ E##;6### FAST#5/ 6##5# 6##LN ##5/ 6##5# 6##LN ##5; 6##5# 6##LN ##5? 6##5# 6##LN ##LN ##E##6##)M E##;6##5▞ 6##5[,]#6##LN [9]#LN J###LN ##E##6##E##6█#)▖ E##;6##E##6##LN M#E##6##)▖ E##;6##)▀ E##LN ▌PI6##LN M#E##6##E##6##)▖ E##LN ▌PI6##LN M#E##6##E##6##)▀ E##;6##)▖ E##LN ▌PI6##LN M#E##6##E█#6##LN ##E##6▙#E##6▜# GOSUB ###E##LN ▌PI6▚# GOSUB ###E##LN ▌PI6[▒]#E▚#LN RUN INKEY$ 6[~~]#E[▒]#LN RUN INKEY$ 6[£]#E▚#LN RUN INKEY$ 6[:]#5 6[(]#E▚#LN GOSUB INKEY$ 6[>]#E[▒]#LN GOSUB INKEY$ 6[=]# GOSUB #[=]#E[>]#LN 4PILN IF PI[V]#5 6[:]#E[▒]#LN RUN INKEY$ 6[(]#E[▒]#LN GOSUB INKEY$ 6[>]#E▚#LN GOSUB INKEY$ 6[=]#)▝ E[>]#LN [>]INKEY$ 6[-]#5 6[/]#E[>]#6[,]#5▘ 6[0]#5 TO #6[2]#5#RND FASTE##SGN LN ##5#RND FASTE##SGN LN ##5[O]#LN ##6[4]# GOSUB #[=]#E[-]#;6[-]# GOSUB #[>]#E[-]#LN 5PILN IF PIY# GOSUB #[>]#E[-]#LN ▌PI6[-]# GOSUB #[~~]#E##;6## GOSUB #[£]#E##;6##### GOSUB #[:]#E##;6## GOSUB #[(]#E##;6##LN J#[/]#E▙#6##E▜#6##LN ### INKEY$ ▞ [,]## ? ##▝ [W]#Z # Z # W # ▀ UNPLOT COPY▘ COPY COPY COPY COPY▖ ▀ ▘ ▌ ▖ ▘ TO # NEXT #
10 REM ............-#U#RNDACS ZACS Z#A U#RND###DDDDD,,;### RETURNTAN COS RETURN~~4▝: RETURN£4▝:▀ RETURN▜4▝:£ RETURN[)]4▝:? RETURNI4▝:K RETURN[M]4▝:N RETURN[Z]4▝:W RETURN▙4▝:Z RETURN▝4▝:"" RETURNZ4▝:# RETURN[9]4▝:ATN RETURN"4▝:INT RETURN)4▝: LIST RETURN▖4▝: NEXT RETURN[A]4▝: UNPLOT RETURNC4▝: COPYU#RND NEW▀ RETURN 4▝Y"" RETURN▘4▝YK RETURN▝4▝Y£ RETURN▀4▝Y▀[L] RETURN 4▝Q~~ RETURN▀4▝Q£ RETURN£4▝Q▜ RETURN?4▝Q[)] RETURNK4▝QI RETURNN4▝Q[M] RETURNW4▝Q[Z] RETURNZ4▝Q▙ RETURN""4▝Q▝ RETURN#4▝QZ RETURNATN 4▝Q[9] RETURNINT 4▝Q" RETURN LIST 4▝Q) RETURN NEXT 4▝Q▖ RETURN UNPLOT 4▝Q[A] RETURN COPY""QCTAN ... .....
20 REM C~~C==#####-#=#-#▝#▌▙#▙##▝# C~~#~~#=#7#▙#2#=#~~#=###### H:E:E(H(H>E> J>J: J£J£ L>L:O:O> T:Q:Q>T> V>V£ X:RND:RND>X>X(Z( PI>PI: PI£PI£ #>#:#: C~~#~~ ,RND1RND/#.# 3RND5# 6RND3# 8RND7#A#BRND8RND 8PIAPI ERNDD# 2#~~#;#.........
30 RAND USR 16572
40 RAND USR 16514
50 RAND USR 17298
60 IF INKEY$ ="" THEN GOTO 60
70 RAND USR 16563
80 STOP
90 SAVE "SAMPL[E]"
95 SLOW
100 RUN
110 FOR N=18024 TO 18081
120 REM UN TO USE PROGRAM
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
