ok the first unit tests are in, looking reasonable. CR0 gets set EQ=1 when the end of the loop is reached, so that beq can be used to jump back. unit tests along that vein tomorrow. l.