CODINGLISTINGS ★ Big Scroll ★

Big Scroll (Computing With the Amstrad)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 ★ 

IN the December issue of Computing with the Amstrad Kevin Edwards introduced us to the Amstrad's 6845 Cathode Ray Tube Controller. This powerful chip is responsible for the screen display and can be programmed to perform some neat tricks as Kevin showed us. If you haven't read this excellent article then I recommend you do as you may need it to understand how this utility, called Scroller, works.

Program VI in his article showed how a large pyramid could be moved smoothly across the screen under cursor control. This is achieved by writing to registers 12 and 13 of the 6845 which hold the offset from the start of the screen memory.

Every time the offset is incremented the screen scrolls left two bytes. This program uses the same technique developed in Kevin's article to scroll text across the screen.

The characters can be any size ranging from the normal one line to 16 lines high. The scrolling routine is in machine code for speed - it wouldn't be possible to print characters 16 lines high fast enough in Basic.

However a simple Basic program can be used to read the text from data statements and pass it on to the machine code.

Enter and run Program I which contains the machine code in data statements plus the demonstration program.

After the code has been stored you'll see the words Computing with the Amstrad scrolling rapidly across the screen in a varety of different sizes and colour combinations.

The routine expects several parameters to be passed. First is the address of the string, which is compulsory. The pen, paper and size which follow this are optional. The full call would be:

CALL &A000,@a$,b,c,d

although it could be abbreviated to:

CALL &A000,@a$

if you want to keep the same size and colour as a previous CALL.

Here a$ is the string to be scrolled. The maximum length depends on the size - the smaller the characters the longer the string can be. The last parameter d is the size, ranging from 1 to 16.

The pen and paper aren't the PEN and PAPER numbers that Basic uses. The values passed are poked directly into the screen memory producing shades and striped patterns as well as solid colour. Try experimenting with different values until you find a suitable combination.

Program II is an assembly listing of the code showing how it actually works. First the parameters passed are picked up and stored. Mode 1 is selected for the display, and this also serves to reset the 6845.

As each character is collected from tne string the character data is copied from the lower ROM to eight bytes of workspace. The screen is scrolled by writing directly to the 6845 and the left hand column of the character is printed.

This process is repeated with the second and third columns and so on, until all the character has been printed. The next character is collected and the process repeats.

As you can see from the demonstration the Amstrad becomes an excellent electronic notice board with its ability to scroll messages. It can be used for shop displays and shows, in fact anywhere where you need to catch people's attention from a distance.

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1986
★ AUTHOR: ROLAND WADDILOVE

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Big  Scroll-Roland  Waddilove    LISTINGDATE: 2013-09-21
DL: 35 fois
TYPE: PDF
SIZE: 279Ko
NOTE: 4 pages/PDFlib v1.6

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding Src's » Landscapes
» Coding Src's » Electronic Rainbow
» Coding Src's » Poly Stars
» Coding Src's » Gummi Script (CPC Amstrad International)
» Coding Src's » Jouez avec les allumettes
» Coding Src's » Trix

QUE DIT LA LOI FRANÇAISE:

L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 120 millisecondes et consultée 830 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.