Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly Code File Extension

I'm just beginning to learn assembly code, and am still unsure about something; what file extension would assembly code source use?

like image 647
Zach Brantmeier Avatar asked Oct 02 '13 23:10

Zach Brantmeier


1 Answers

You can (probably) use whatever you want. Some common ones are .s, .S, and .asm. Check your compiler/assembler documentation to find out if one is preferred for your system/toolchain. GCC and Clang, for example, will assume a file contains assembly code if you use a .s extension. If you use something else, you need to pass an appropriate -x flag to have the front-end do the right thing.

like image 143
Carl Norum Avatar answered Sep 28 '22 00:09

Carl Norum