(almost all) main CPU logic outline