%import cx16textio %import cx16flt %zeropage basicsafe main { const uword width = 256 const uword height = 200 const ubyte max_iter = 32 sub start() { initialize() mandel() repeat { ; do nothing } } sub mandel() { ubyte pixelx ubyte pixely for pixely in 0 to height-1 { float yy = (pixely as float)/0.35/height - 1.35 cx16.r0 = 0 cx16.r1 = pixely cx16.FB_cursor_position() for pixelx in 0 to width-1 { float xx = (pixelx as float)/0.3/width - 2.2 float xsquared = 0.0 float ysquared = 0.0 float x = 0.0 float y = 0.0 ubyte iter = 0 while iter