implemented all but HALT and READ