needs lib/struct unit emul/cpu struct CPU { uint mem( ; method step halted? ; } : stepN ( n cpu -- ) >r begin ?dup while V1 step V1 halted? not while repeat then rdrop ; : run ( cpu -- ) begin dup step dup halted? until drop ; : newcpu ( 'halted? 'step mem( -- cpu ) 3 n,@ ;