APPLICATIONSPROGRAMMATION ★ FILL (COMPUTING WITH THE AMSTRAD) ★

Fill (Computing with the Amstrad)Applications Programmation
★ 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 ★ 

Add this neat machine code routine by CHRIS RATCLIFFE to your own programs and give your micro real painting power

THE Amstrad CPC464 has a very comprehensive

Basic for handling graphics, but unlike some lesser machines, it has no Paint or Fill command.

But now CPC464 users need look no longer at other machines with envy, for here is a machine code routine that will do it for them.

The demonstration. Program I consists of a Basic subroutine from line 9000 which sets up the necessary machine code, lowers the top of memory, and initialises the Basic variable to point to the start of the routine.

This should be run at the beginning of your own program with a GOSUB 9000 statement as shown in line 40.

Once this has been done all you need do to fill a shape is to enter:

CALL paint,x,y,c

As you can see, the routine must be given three parameters to work. These are the coordinates of the starting point to fill from (x,y), and the colour to use (c).

So the instruction:

CALL paint,320,209,2

will fill in the shape around the point 320,200 in the colour of INK 2.

It is quite likely that you will make a few mistakes while typing in lines 9100 to 9680, so the program checks the data for you. If there are any mistakes you will be informed which lines are wrong, so correcting them should be quite easy.

For simple shapes like circles and rectangles, painting is fairly straightforward, but more complex shapes with lots of nooks and crannies require the computer to "remember" to go back and fill in the fiddly bits.

As the program stands, just under 2k of RAM is allocated for this purpose, so it can remember about 500 fiddly bits.

This is more than enough for nearly all situations, but if the program is asked to remember more than this it will start forgetting things and may not fully colour in the shape.

And that's all there is to it - happy painting!

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1988
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1986
★ AUTHOR: CHRIS RATCLIFFE
 



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» FILL    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-20
DL: 340
TYPE: ZIP
SiZE: 5Ko
NOTE: 40 Cyls
.HFE: Χ

» FILL    (Computing  with  the  Amstrad)    ENGLISH    LISTINGDATE: 2013-09-15
DL: 385
TYPE: PDF
SiZE: 219Ko
NOTE: 2 pages/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Fill 464 (AM-Mag)
» Applications » Fill routine (Amstrad Computer User)
» Applications » RSX-Fill (Happy Computer)
» Applications » Rutina FILL in povečani znaki na zaslonu (Moj Micro)
» Applications » RSX Fill (Schneider Aktiv Special)
» Applications » RSX-Fill (CPC Magazin)
Je participe au site:
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.732-desktop/c
Page créée en 383 millisecondes et consultée 2134 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.