2022-05-22 15:34:08 +00:00
|
|
|
%import textio
|
2022-07-31 11:38:00 +00:00
|
|
|
%zeropage basicsafe
|
2022-03-13 11:52:12 +00:00
|
|
|
|
2022-08-12 22:14:19 +00:00
|
|
|
|
2022-07-08 19:50:32 +00:00
|
|
|
main {
|
2022-08-07 11:45:03 +00:00
|
|
|
sub start() {
|
2022-08-11 22:46:38 +00:00
|
|
|
|
2022-08-22 22:05:57 +00:00
|
|
|
ubyte c
|
|
|
|
ubyte radius = 1
|
|
|
|
ubyte[] circle_radius = [5,10,15,20,25,30]
|
|
|
|
|
|
|
|
for c in 0 to len(circle_radius)-1 {
|
|
|
|
if distance(c) < (radius as uword) + circle_radius[c]
|
|
|
|
txt.chrout('y')
|
|
|
|
else
|
|
|
|
txt.chrout('n')
|
|
|
|
|
|
|
|
cx16.r15 = (radius as uword) + circle_radius[c]
|
|
|
|
if distance(c) < cx16.r15
|
|
|
|
txt.chrout('y')
|
|
|
|
else
|
|
|
|
txt.chrout('n')
|
|
|
|
txt.nl()
|
|
|
|
}
|
|
|
|
}
|
2022-08-12 22:14:19 +00:00
|
|
|
|
2022-08-22 22:05:57 +00:00
|
|
|
sub distance(ubyte cix) -> uword {
|
|
|
|
uword sqx = cix+10
|
|
|
|
return sqrt16(sqx*sqx)
|
2022-08-12 22:14:19 +00:00
|
|
|
}
|
2022-07-14 17:25:08 +00:00
|
|
|
}
|