Graphic - Christmas Card (Popular Computing Weekly)Coding Listings
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 
There have been Christmas cards. There have been musical Christmas cards. And now here is the computerised Christmas card! As you listen to a three-part arrangement of We Wish You A Merry Christmas, watch snowflakes fall gently around the Christmas tree.

The program itself occupies about kB of Ram, and consists largely of data statements containing the musical information. Because of the large number of data elements, we have included a preprogram (Lines 10-90) which verifies the data. This is automatically deleted when the data is confirmed to be correct.
All three sound channels are used in the musical arrangement. Rendezvous is provided between the channels, and short breaks are used to distinguish consecutive notes of the same frequency. Notes are specified as channel status, pitch, and duration; and are read from the data statements three at a time. This ensures that the sound channels are kept busy while the program gosnbs to the moving graphics routine.

The snowflakes are chosen at random and are moved down the screen by reading an array. p(). giving the current snowflake position, which is then updated and a new snowflake printed. To ensure that snowflakes do not print over the Christmas tree, the bottom of the screen is redefined using an elliptical envelope. This is effected by the user defined function in Line 160.
The tree is drawn using the usual graphics commands, but is made simpler by the use of for ... next loops permitted by regular symmetry of the tree. In order to get maximum effect from both green and colour monitor screens, two distinct versions of ink statements are given in Line 210. You should use whichever is appropriate. Part two next week.

If you would prefer not to type the listing, you can obtain a tape copy by sending a blank cassette, together with an SAE and £1 to 217 Whitehorse Road, Croydon CRO 2LH.



★ ANNÉE: ???
★ AUTHORS: Rachel Braverman and Jon Tarrant

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 129 millisecondes et consultée 805 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.