>>oliveo+m5
You use a compiler that accepts the assembly code, and produces output for the target architecture.
This was how DEC VMS was ported from VAX to Alpha and later to Itanium, as a substantial part of that operating system is written in VAX Macro32 assembler.