Im Magazin „8000 PLUS" wurde im Dezember 1989 der folgende Artikel abgedruckt.
(Im Januar 1990 erfolgte eine Korrektur)
Ein Feuerwerk auf dem PCW1

FIREWORX

By Richard Cox
This is one of the programs which was screaming, "Run me!" when it came out of the envelope. It also came with a note to "switch all the lights off and turn the PCWs brightness up full." So we did. It's only by dint of the fact that we got hungry that we're not still watching the display now. It really is very impressive indeed.
The less fun loving of our readers should skip this listing as all it does is to produce a quite spectacular fireworks display on the screen of the PCW. The display can either be controlled from the keyboard using the numeric keypad or you can sit back and watch the built-in demonstration.
To add some zing for the hard core programmers amongst you, there is also the possibility of adding your own data lines. This will enable you to create even bigger and better displays. The data statements within lines 50-130 are the demonstration and can be customised. They consist of an encoded series of keypresses with delays in between. Each keypress is represented by a shift state (n,N, for normal or S,s for shifted) followed by the key number in decimal form. N01 is unshifted [EOL]. A delay time, consisting of a decimal integer must follow each keypress. Missing out this time assumes a gap of 65,536 (about 90 minutes).This confuses the display. Two codes do not fit the pattern; Q which terminates the current CALL FIREWORX! (the exclamation mark is mandatory) and K which stops the display and enters keyboard mode. Lines 150-170 demonstrate these. Neither Q nor K require a delay time.
The core of the program lies in lines 200-570 which hold the machine code subroutine Fireworx!. They also hold the routine to load Fireworx!
To control your own display you will need to use the numeric keypad as follows:
Oooooooo! Ahhhhhh! Wow! and erm.....bang! Light up the sky with Basic fireworx!
KeyKey no
Position on screen 
[RELAY] 01
bottom left 
[ENTER]78
bottom right 
[2]07
middle 
[EOL]13
top left 
[5]14
top middle 
[WORD/CHAR]05
top right 
When [SHIFT] is pressed, a large firework is set off. The space bar has a special function: each firework is a collection of moving dots of which there is a finite number. After about eight normal sized fireworks you run out of dots. Pressing the space bar reclaims some of them for recycling. Pressing the space bar and [SHIFT] instantly reclaims all of the dots.
Due to lack of space, we can't go into the program in greater detail. Suffice it to say that it should provide hours of enjoyment both from a programming and a sensory level. Thanks to Richard Cox for the excellent idea, execution and documentation.
This is the demonstration display which can be edited or completely replaced at your whim.
Thi5 section puts you into keyboard mode and allows you to create your own on screen displays.
Line 210 contains a version check which looks to see which version of Basic your machine uses. 9512s use v1.39 while the 8000 series use v1.29. Line 250 acts on this by selecting the correct line of code to be loaded at the end.
The dreaded DATA. As Richard Cox says 'Just think beautiful moving pictures.

FIREWORX WHICH DIDN'T

As many of you will have noticed, last month's Fireworx program was more like "DAMPSQUIB.BAS".
Our fault entirely, and like Guy Fawkes, we have suffered suitably appalling punishment. The problem
arose in line 260 which ended rather abruptly. The line should be as follows:

READ x$:WHILE x$<>"*":POKE a,VAL("&H"+x$):a=a+1:READ x$:WEND:RETURN
Many apologies to Richard Cox annd to everyone who
spent time tearing their hair out.
[Das korrigierte BASIC-Listing und das Assembler-Listing]

1. Das Feuerwerk benötigt die BASIC-Version v1.29 (8000er Serie) oder v1.39 (9512 Serie). Bei allen anderen Versionen funktioniert das Programm NICHT

Ich habe die entsprechenden Stellen in der Version 1.47 gefunden, so dass das Programm auch unter dieser Version laufen sollte.

In der Zeile 210 findet sich die Anweisung;
210 ... v1.39=PEEK(&H151)=&H33
Die Adresse &H151 weist auf den Wert in einer der Versionsmeldungen:
Mallard-80  BASIC with Jetsam   Version 1.29
                                          ^   &H32
Mallard-80  BASIC with Jetsam   Version 1.39
                                          ^   &H33
Mallard-80  BASIC with Jetsam   Version 1.47
                                          ^   &H34
Das Originalprogramm setzt den Wert der Variablen v1.39 bei der Version 1.39 auf -1, sonst auf 0. In der Zeile 250 erfolgt dann die Entscheidung, welcher Code verwendet wird — entweder Zeile 560 oder 570. Ich habe die Zeilen 251 und 252 angefügt, die die Versionen 1.29 und 1.47 abfragen. Ist keine der beiden Versionen vorhanden, dann bricht das Programm mit einer Fehlermeldung ab.
[Das angepasste BASIC-Listing]

HTML-Bearbeitung von Werner Cirsovius
Januar 2015
© 8000 PLUS