1 fn draw-circle screen: (addr screen), cx: int, cy: int, radius: int, color: int {
6 var tmp/eax: int <- copy radius
16 var tmpx/ecx: int <- copy 0
17 var tmpy/edx: int <- copy 0
24 pixel screen, tmpx, tmpy, color
30 pixel screen, tmpx, tmpy, color
36 pixel screen, tmpx, tmpy, color
42 pixel screen, tmpx, tmpy, color
46 # if (r <= y) { ++y; err += (y*2 + 1); }
57 # if (r > x || err > y) { ++x; err += (x*2 + 1); }
58 $draw-circle:second-check: {
66 break $draw-circle:second-check
74 # loop termination condition
80 fn draw-disc screen: (addr screen), cx: int, cy: int, radius: int, color: int, border-color: int {
81 var r/eax: int <- copy 0
85 draw-circle screen, cx cy, r, color
89 draw-circle screen, cx cy, r, border-color