added write flags, self resetting registers and autostall