initialize mem and pc