This page (revision-10) was last changed on 03-Feb-2023 15:21 by Carsten Strotmann 

This page was created on 08-Apr-2010 05:45 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
10 03-Feb-2023 15:21 13 KB Carsten Strotmann to previous
9 08-Apr-2010 05:57 13 KB Carsten Strotmann to previous | to last
8 08-Apr-2010 05:55 13 KB Carsten Strotmann to previous | to last
7 08-Apr-2010 05:53 12 KB Carsten Strotmann to previous | to last
6 08-Apr-2010 05:52 12 KB Carsten Strotmann to previous | to last
5 08-Apr-2010 05:49 11 KB Carsten Strotmann to previous | to last
4 08-Apr-2010 05:49 11 KB Carsten Strotmann to previous | to last
3 08-Apr-2010 05:46 11 KB Carsten Strotmann to previous | to last
2 08-Apr-2010 05:45 11 KB Carsten Strotmann to previous | to last
1 08-Apr-2010 05:45 11 KB Carsten Strotmann to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 6 lines
[{Image src='mojmikro_logo.png' }]
[{TableOfContents }] \\
Original from Posting on [AtariAge|http://www.atariage.com/forums/topic/161073-moj-mikro-magazine-listings-super-fast-circle-routine/]
At line 15 changed one line
* Atari BASIC listing on disk (tokenized): M8903284.BAS
* Atari BASIC listing on disk (tokenized): [M8903284.BAS]
At line 27 added 2 lines
[{Image src='circles_7.png' }] [{Image src='circles_10.png' }]
At line 101 added 2 lines
[{Image src='circles_6.png' }] [{Image src='circles_12.png' }]
At line 395 removed one line
Description
At line 406 added 4 lines
[{Image src='circles_5.png' }]
!!Description
At line 401 changed 2 lines
Usage of the routine
!!!Usage of the routine
{{{
At line 417 added one line
}}}
At line 405 changed 5 lines
30000 - Starting address of the calling routine
POK - 1 (draw the circle), 0 (erase the circle)
X - X coordinate of the circle
Y - Y coordinate of the circle
R - Radius of the circle
| 30000 | Starting address of the calling routine
| POK | 1 (draw the circle), 0 (erase the circle)
| X | X coordinate of the circle
| Y | Y coordinate of the circle
| R | Radius of the circle
At line 417 changed one line
Fast circle drawing in pure Atari BASIC
!! Fast circle drawing in pure Atari BASIC
At line 419 changed 5 lines
Magazine: Moj Mikro, 1989/3
Author : Zlatko Bleha
Page : 27 - 31
Atari BASIC listing on disk (tokenized): M8903282.BAS
Atari BASIC listing (listed): M8903282.LST
* Magazine: Moj Mikro, 1989/3
* Author : Zlatko Bleha
* Page : 27 - 31
* Atari BASIC listing on disk (tokenized): M8903282.BAS
* Atari BASIC listing (listed): M8903282.LST
At line 427 changed one line
[{Image src='circles_2.png' }]
At line 443 added 34 lines
[{Image src='circles_3.png' }]
[{Image src='circles_4.png' }]
!Basic Listing M8903282.LST
{{{
1 REM *******************************
2 REM PROGRAM : FAST CIRCLE DRAWING
3 REM AUTHOR : ZLATKO BLEHA
4 REM PUBLISHER: MOJ MIKRO MAGAZINE
5 REM ISSUE NO.: 1989, NO.3, PAGE 29
6 REM *******************************
7 REM
10 GRAPHICS 8:SETCOLOR 2,0,0:COLOR 3
20 ? "ENTER X, Y AND R"
30 INPUT X,Y,R
40 IF R=0 THEN PLOT X,Y:END
50 B=R:C=0:A=R-1
60 PLOT X+C,Y+B
70 PLOT X+C,Y-B
80 PLOT X-C,Y-B
90 PLOT X-C,Y+B
100 PLOT X+B,Y+C
110 PLOT X+B,Y-C
120 PLOT X-B,Y-C
130 PLOT X-B,Y+C
140 C=C+1
150 A=A+1-C-C
160 IF A>=0 THEN 190
170 B=B-1
180 A=A+B+B
190 IF B>=C THEN 60
}}}
At line 479 added one line
{{{
At line 482 added one line
}}}
At line 434 changed one line
Slow circle drawing in Atari BASIC
!! Slow circle drawing in Atari BASIC
At line 436 changed 5 lines
Magazine: Moj Mikro, 1989/3
Author : Zlatko Bleha
Page : 27 - 31
Atari BASIC listing on disk (tokenized): M8903281.BAS
Atari BASIC listing (listed): M8903281.LST
* Magazine: Moj Mikro, 1989/3
* Author : Zlatko Bleha
* Page : 27 - 31
* Atari BASIC listing on disk (tokenized): [M8903281.BAS]
* Atari BASIC listing (listed): M8903281.LST
At line 494 added one line
[{Image src='circles_1.png' }]
At line 496 added 16 lines
!Basic Listing M8903281.LST
{{{
1 REM *******************************
2 REM PROGRAM : SLOW CIRCLE DRAWING
3 REM AUTHOR : ZLATKO BLEHA
4 REM PUBLISHER: MOJ MIKRO MAGAZINE
5 REM ISSUE NO.: 1989, NO.3, PAGE 29
6 REM *******************************
7 REM
10 GRAPHICS 8:SETCOLOR 2,0,0:COLOR 3
20 FOR A=0 TO 6.28 STEP 0.02
30 X=SIN(A)*50+150
40 Y=COS(A)*50+80
50 PLOT X,Y
60 NEXT A
}}}
At line 446 changed one line
Conclusion
!! Conclusion
At line 451 changed one line
{{{
At line 520 added one line
}}}
At line 454 changed 3 lines
POK - 1 (drawing a pixel), 0 (erasing a pixel)
X - X coordinate of the pixel
Y - Y coordinate of the pixel
| POK | 1 (drawing a pixel), 0 (erasing a pixel)
| X | X coordinate of the pixel
| Y | Y coordinate of the pixel
At line 458 changed one line
The routine alone is not any faster than normal PLOT command from Atari BASIC, because USR command takes approximatelly 75% of whole execution. But, used as part of the main circle routine it does not matter anymore, because it is integrated in one larger entity. There the execution is very fast, with no overhead. PLOT routine is here for you to examine anyway. You never know if you will maybe need it in the future.
The routine alone is not any faster than normal PLOT command from Atari BASIC, because USR command takes approximately 75% of whole execution. But, used as part of the main circle routine it does not matter anymore, because it is integrated in one larger entity. There the execution is very fast, with no overhead. PLOT routine is here for you to examine anyway. You never know if you will maybe need it in the future.