2018-06-13 22:18:28 +05:30
|
|
|
# as
|
|
|
|
|
|
|
|
> Portable GNU assembler.
|
|
|
|
> Primarily intended to assemble output from `gcc` to be used by `ld`.
|
2021-07-09 16:45:55 +02:00
|
|
|
> More information: <https://manned.org/as>.
|
2018-06-13 22:18:28 +05:30
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Assemble a file, writing the output to `a.out`:
|
2018-06-13 22:18:28 +05:30
|
|
|
|
2024-08-13 10:24:04 +02:00
|
|
|
`as {{path/to/file.s}}`
|
2018-06-13 22:18:28 +05:30
|
|
|
|
|
|
|
- Assemble the output to a given file:
|
|
|
|
|
2024-08-13 10:24:04 +02:00
|
|
|
`as {{path/to/file.s}} -o {{path/to/output_file.o}}`
|
2018-06-13 22:18:28 +05:30
|
|
|
|
|
|
|
- Generate output faster by skipping whitespace and comment preprocessing. (Should only be used for trusted compilers):
|
|
|
|
|
2024-08-13 10:24:04 +02:00
|
|
|
`as -f {{path/to/file.s}}`
|
2018-06-13 22:18:28 +05:30
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Include a given path to the list of directories to search for files specified in `.include` directives:
|
2018-06-13 22:18:28 +05:30
|
|
|
|
2024-08-13 10:24:04 +02:00
|
|
|
`as -I {{path/to/directory}} {{path/to/file.s}}`
|