ZX Review #3-4
22 июля 1997 |
![]() |
Studies - 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:
Similar articles:
В этот день... 1 April
Info Guide #13,
ACNews #50,
Avro News #01,
ACNews #47,
ACNews #40,
ACNews #29,
Black Metall #01,
ACNews #16,
Adventurer #13,
Polesse #19,
Subliminal Extacy #03,
ZX Pilot #37,
Always #03,
Born Dead #0G,
Odyssey paper #08,
Optron #26,
City #08,
Zodiac #02,
Polesse #05,
Nicron #108,
X-Magazine #10,
Nicron #82,
Energy #01,
Sorrow News #03,
Sorrow News #02,
Proton #27,
Think #08,
Wallpaper #01,
Spectrum Progress #03,
Spectrum Expert #02,
Micro #01,
X-Files #02,
Gorodok #05,
Deja Vu #04,
Anecdotes #01,
X-Files #02,
Maximum #35,
Impulse #01,
Spectrofun #01,
Faultless #07,
Breeze #06,
Nicron #27,
Echo #03,
Oberon #01,
Spectrofon #19,
On-Line #30,
Sinclair Town #01,
Sinclair Classic #04,
Spectrofon #04