ZX Review #3-4
22 июля 1997

Studies - A. Urzha. The procedure for drawing a circle.

<b>Studies</b> - A. Urzha. The procedure for drawing a circle.
            ETUDES



(C) Urzha Andrew
Cheboksary, 1996.

 The procedure for drawing a circle.


   I suggest you the procedure for drawing a circle (much 
faster than the standard CIRCLE). 

   In the register pair HL recorded coordinates of the center, 
and in case D - the radius of the circle. 140.


       ORG 50000

       LD HL, 87 * 256 127
And 87 - Y, 127 - X

       LD D, 50
; R

       LD C, 0

       LD B, D
LOOP CALL PLOT

       LD A, B

       NEG

       LD B, A

       CALL PLOT

       LD A, C

       NEG

       LD C, A

       CALL PLOT

       LD A, B

       NEG

       LD B, A

       CALL PLOT

       LD A, C

       LD C, B

       LD B, A

       CALL PLOT

       LD A, C

       NEG

       LD C, A

       CALL PLOT

       LD A, B

       NEG

       LD B, A

       CALL PLOT

       LD A, C

       NEG

       LD C, A

       CALL PLOT

       LD A, C

       LD C, B

       LD B, A

       INC C

       LD A, D

       SUB C

       LD D, A

       JR NC, LOOP

       DEC B

       LD A, D

       ADD A, B

       LD D, A

       LD A, B

       CP C

       JR NC, LOOP

       RET
PLOT PUSH DE

       PUSH BC

       PUSH HL

       LD A, H

       ADD A, B

       LD B, A

       LD A, L

       ADD A, C

       LD C, A

       CALL # 22E5

       POP HL

       POP BC

       POP DE

       RET
2

   The length of the procedure, 93 bytes.

   The idea is taken from the ZX-FORUM 3. Not
doubt that the procedure can be
much easier (especially the first part). Also there is a 
limitation - you can not specify the radius zero.


********************************





Other articles:

TR-DOS for beginners - Part 1.

Authoring - General Sound - Multimedia for the ZX Spectrum!

Business Card - Introducing the new electronic journal "Major Wares" (c) Codebusters & VMG

Computer novella - Knight Lore "legends of chivalry times."

New Programs - I. Roshchin. HELP_Z80. Davydov. Catalog's Base v1.8.

description of the shell of the journal "ZX-REVIEW"

Crossing Dragon - Aavlon, Castle of Dreams, Erik the Viking.

Crossing Dragon - Eureka!, Eye of Bain, Kentilla.

Crossing - Sherlock, Apollo, Shadows of Mordor, Rigels Revenge, Temple of Terror, ID, That's the Spirit, Return to Ithaka.

Retro - Dzh.Hardman, E. Hyuzon. Top 40 procedures.

Expert Tips - Castle Master.

Expert Tips - Firelord.

Expert Tips - Stonkers.

Forum Games - Insult Megademo, Catch 23, Livingstone, Rock Star ate my Hampster, UFO-2: Devils of the Abyss, Terminator 2, Venturama, The Spririts, Nipper, Sweewo'S World, King's Bounti -2, Hacker 2, Black Magic, Satcom, Star Heritage.

Forum - A. Gura. Code programmer.

Forum - A. Strelnikov. Prospects of development of ZX Spectrum.

Forum - Davydov. According to materials published in the ZX-REVIEW: Some issues related to autostart BASIC programs. Redefine Keys. How to print 42 characters per line. The procedure of multiplication HL = B * C. Refinement cloning downloaders. Mini-driver disk.

Forum - With 'Light'. Music processor ZX-Speccy.

Forum - Dmitry Fyodorov: Print images with a mask with pixel precision. Algorithm for calculating the address coordinates to within a pixel.

Forum - I. Roshchin. Sharing ZX ASM 3.0 and STS 5.1.

Forum - M. Bekarev. The calculation of the address display area of familiarity, and vice versa.

Forum - VP Fedin. Refinement Profi for conflict-free peripheral connectivity.

Forum - S. Astrov. Pseudorandom number generator.

reader-reader - V. Sirotkin. Protection program (look at the problem).

reader-reader - I. Roshchin. Display driver for the computer, "Pentagon-128.

Studies - A. Savinov: The procedure for displaying a double-height characters. Procedure "dissolution" of characters.

Studies - A. Urzha. The procedure for drawing a circle.

Studies - V. Sirotkin. Program checksum.

Studies - E. Volchkov. Improvement routines address calculation system on display file.

Studies - E. Frost. Running line.

Studies - I. Komandin. The program display screen.

Studies - I. Roshchin. Two graphic effect.

Studies - M. Lazutov: The modernization program font. Program encode / decode block codes. The effect of the attributes.

Studies - O. Smolyankin: Procedures for cleaning the screen. Output of text messages on the screen.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
On asshole - Overfile Must Die!!!
Comics - Comic from "Bang."
Gfx scene - overview charts with a virtual party of Antique Toy 2007.
SOFTWARE - New System Software: UNIVERSAL VIEWER v1.0, MODERN WORD v1, GLOBAL COMMANDER v1.21, BEST VIEW v2.4, REFRESH OPTIMIZER.

В этот день...   3 December