reformat and add memory parameter in instructions