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:
Search - search for game programs.
Iron - an overview of the microprocessor Zilog Z380, continued.

В этот день...   1 January

SibNews #08, Woot! #01, Spectrum Magazine #01, ACNews #25, Psychoz #14, ACNews #14, Last 128 #08, Last 128 #06, Last 128 #05, Last 128 #04, Last 128 #03, Last 128 #02, Last 128 #09, Last 128 #3.5, Last 128 #8.025, Sinclair Club #05, Last 128 #M!R 01, Fantadrom #01, Buzz #20, Last 128 #01, DonNews #13, Nicron #120, Promised Land #01, Inferno #01, Marazm #25, Ultimathum #01, Marazm #21, Hooy Mag #02, KrNews #11, Marazm #22, Marazm #23, ZX Football 2000 #01, Codemania #01, Always #03, Bugs #02, IzhNews #08, Virtual Worlds #01, Listok #04, Scenergy #02, Flash Info #18, Marazm #16, Marazm #17, Zed #01, Balagan #02, ZX Format #08, ZX Power #03, Shock #01, Impulse #02, Deja Vu #03, ZX Club #08, ZX Club #06, Numberology #01, Marazm #13, Marazm #12, Marazm #14, Gorodok #02, Zodiac #01, Marazm #15, Deja Vu #07, Marazm #11, Deja Vu #07, Playboy #03, Crazy News #2, Crazy News #4, ZX Light #01, Crazy News #5, Playboy #02, ZX News #03, ZX Review #1-2, Read Me #02, Crazy News #3, Nicron #13, Read Me #01, Public Spirit #01, Faultless #06, Faultless #05, ZX Software #01, Stump #04, Speccy #07, Возраждение #0, Speccy #03, On-Line #17, Scene+ #01, Welcome Press #01, ZX Konig #04, Adventurer #01, Faultless #05, Faultless #04, Di Halt #01, Faultless #01, Playboy #01, Crazy News #1, Faultless #03, Pioneer #03, Sinclair Town #02, ZX Magazine #01, Eldorado #01, ZX Magazine #02, Spectron #01, ZX News #01, ZX Konig #02, 200 #W, Welcome Press #00, Dune #07, Subliminal Extacy #01, Subliminal Extacy #02, ZX Konig #01, Subliminal Extacy #00, Muchomor #01, Spectrofon #01, ZX Revija #02, Outlet #01, Outlet #1-3