APPLICATIONSCREATION GRAPHIQUE ★ DRAW UTILITY ★

Draw Utility (Personal Computer NewsApplications Creation Graphique
★ 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 ★ 

Colourful pictures can be stored In the Amstrad's memory and re-drawn using this routine from John Keneally.

The following utility for the Amstrad CPC464 allows pictures to be drawn in four colours (out of a possible 27) and be recreated in user programs. Pictures are stored from address 43902 downwards in a picture buffer. Space must be reserved in the user program by the memory command.

Pictures are numbered from 0 upwards. The picture currently being drawn can call up any previous picture and put it anywhere on the screen. The whole picture can then be re-drawn by clearing the screen and using the draw command.

The commands

  • p select a picture (0,1, etc.).
  • d draw selected picture,
  • f finish current picture and advance to next. Arrow keys .. . move the cursor. I mark start point for line or arc draw.
  • e mark end point for lineor arc and draw it.
  • r mark one corner for a rectangle.
  • m mark opposite corner and draw filled rectangle,
  • i partial infill function,
  • t1 mark first point of triangle.
  • t2 mark second point of triangle.
  • t3 mark third point and draw triangle,
  • z clear screen,
  • k re-draw a previous picture number at cursor position.
  • x delete last command. (Clear screen and draw using (d) command to see effect),
  • b set border colour and the four ink colours,
  • c select an ink for future drawing.
  • g display coordinates of cursor.
  • u display length of picture buffer space used so far.
  • k save/load picture buffer to cassette.

    Note: The routines from line 1000 onwards must be incorporated to use the pictures in other programs. To use, first use gosub 1600 to load the picture buffer (after reserving space for it using the memory command. The (u) command will tell you how long the buffer is. Use a value of 43902 (minus this length). Pictures can then be drawn by setting pn%=- picture number and doing GOSUB 1700: GOSUB 1000.

Program notes

  • 50-110 Program initialisation routine.
  • 130-170 wait for command and flash cursor.
  • 180-270 dispatch command.
  • 280-960 activate the commands.
  • 1000-1520 main draw functions routine.
  • 1120-1130 draw line.
  • 1150-1190 draw rectangle
  • 1200-1310 draw arc.
  • 1320-1480 Routine to allow shapes to be filled in.
  • 1490-1500 draw triangle.
  • 1510-1520 draw another picture.
  • 1600-1620 routine for loading picture buffer.
  • 1700-1800 Routine for the selection of pictures.

PersonalComputerNews #93

★ EDITEUR: Personal Computer News
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTEUR: John Keneally
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Draw  Utility    LISTING    ENGLISHDATE: 2012-12-24
DL: 275
TYPE: PDF
SiZE: 358Ko
NOTE: 2 pages/PDFlib v1.6

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

Lien(s):
Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» 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 170 millisecondes et consultée 1612 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.