building M1 code