introduce a error flag
introduce a halted flag
configure machine