; conway's game of life. %import math %import textio life { const ubyte WIDTH = 40 const ubyte HEIGHT = 30 const uword STRIDE = $0002+WIDTH uword world1 = memory("world1", (WIDTH+2)*(HEIGHT+2), 0) uword world2 = memory("world2", (WIDTH+2)*(HEIGHT+2), 0) uword @requirezp active_world = world1 sub benchmark(uword max_time) -> uword { txt.clear_screen() sys.memset(world1, (WIDTH+2)*(HEIGHT+2), 0) sys.memset(world2, (WIDTH+2)*(HEIGHT+2), 0) set_start_gen() uword gen cbm.SETTIM(0,0,0) while cbm.RDTIM16()