%import cx16textio %import cx16flt %zeropage basicsafe main { const uword width = 256 const uword height = 200 const ubyte max_iter = 16 ; 32 looks pretty nice sub start() { initialize() mandel() repeat { ; do nothing } } sub mandel() { const float XL=-2.000 const float XU=0.500 const float YL=-1.100 const float YU=1.100 float dx = (XU-XL)/width float dy = (YU-YL)/height ubyte pixelx ubyte pixely for pixely in 0 to height-1 { float yy = YL+dy*pixely cx16.r0 = 0 cx16.r1 = pixely cx16.FB_cursor_position() for pixelx in 0 to width-1 { float xx = XL+dx*pixelx float xsquared = 0.0 float ysquared = 0.0 float x = 0.0 float y = 0.0 ubyte iter = 0 while iter