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 October
Scream #04(scl),
Bred #02,
Screamergy #01,
Bred #01,
Open Letters #08,
Millenium #01,
Body #2F,
Deja Vu #0A,
X-Magazine #17,
ZX Chart #01,
Skimer #02,
X-Magazine #12,
Body #17,
Bugs #01,
Adventurer #10,
X-Magazine #07,
Wallpaper #05,
Proton #48,
ZX Pilot #29,
Cheat #03 demo,
Proton #48,
Deja Vu #06,
Deja Vu #02,
ZX-News #41,
Spectrum Progress #01,
Nicron #01,
Maximum #18,
ZX Digest #02,
Speccy #01,
Emulate #02,
Speccy #01,
200 #B,
Spectrofon #09,
ZX Revija #01