APPLICATIONSPROGRAMMATION ★ FAST FILL (COMPUTING WITH THE AMSTRAD) ★

Fast 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 ★ 

IN the September 1986 issue of Computing with the Amstrad Chris Ratcliffe showed us a routine to fill any shape, no matter how intricate, with any colour. This is for CPC464 owners of course - 6128 owners have their own built-in fill command.

Unfortunately the CPC464 fill routine is rather slow. The problem is that it's a legal fill using the Amstrad approved and documented firmware calls.

This Fast Fill routine doesn't use the firmware, but simply peeks and pokes the screen memory.

The result is that the code is only half as long yet it runs up to 12 times faster. To fill a shape first move to the start position and:

CALL &9E00,pen

The fill stops when it hits its own colour, so if you wanted a red flower draw the outline in red and fill it with red.

You can't draw a shape in one colour and fill with another - they both have to be the same. That's not a bug in the routine, it's the way the CPC6128 fill works so I've merely kept it the same.

There is one restriction though. Make sure that there aren't any gaps in the outline or the fill will leak out. It will colour the rest of the Amstrad's memory given half a chance.

When Fast Fill is run HIMEM is moved down to &9E00 to make room for the code and workspace. The routine is less than a page long and is followed by 1 k of workspace.

You can use the workspace from &9D00 onwards as a scratchpad, but remember that Fast Fill will use it when called, so don't store anything there that you want to keep.

CWTA

★ PUBLISHER: Computing with the Amstrad
★ YEAR: 1986
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTIONS: COMPUTING WITH THE AMSTRAD 1986 , COMPUTING WITH THE AMSTRAD-AUSTRALIAN
★ AUTHOR: ROLAND WADDILOVE
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» Fast  Fill    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-25
DL: 200
TYPE: ZIP
SiZE: 4Ko
NOTE: 40 Cyls
.HFE: Χ

» Fast  Fill    (Computing  with  the  Amstrad)    ENGLISH    LISTINGDATE: 2021-02-02
DL: 196
TYPE: PDF
SiZE: 55Ko
NOTE: 1 page/PDFlib v1.6

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

Lien(s):
» Applications » RSX-Fill (CPC Magazin)
» Applications » Pattern-Fill / Pattern-Draw (CPC Amstrad International)
» Applications » RSX DFILL (Schneider Aktiv)
» Applications » Fill routine (Amstrad Computer User)
» Applications » CPC464 Fill Subroutine (Australian Personal Computer)
» Applications » RSX-Fill (Happy Computer)
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.7-desktop/c
Page créée en 207 millisecondes et consultée 1764 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.