You don't compile assembly code, you assemble it (and link it if you want a working executable).

As slarty said assembly languages is usually tied to both the assembler and the architecture. There is a huge amount of assemblers out their for different systems and architectures, so it would be easier to help if we had that information.