09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7<br />

as: ASSEMBLER<br />

This chapter describes the usage and input syntax of the <strong>XENIX</strong> 80<strong>86</strong>/<strong>2<strong>86</strong></strong> assembler, as.<br />

The assembler produces relocatable object files from 80<strong>86</strong>/<strong>2<strong>86</strong></strong> assembly language<br />

source files. Object files contain relocation information and a complete symbol table<br />

and may be linked to other object files using the <strong>XENIX</strong> link editor 1d.<br />

as is designed to be used in those rare cases where C programs do not satisfy a<br />

programming requirement. Thus, you can combine as object files with object files<br />

produced by the <strong>XENIX</strong> C compiler, cc, to make complete programs. Note that the<br />

output format of as has been designed so that if a file contains no unresolved references<br />

to external symbols, it is executable without further processing.<br />

This chapter does not teach assembly language programming, nor does it give a detailed<br />

description of 80<strong>86</strong>/<strong>2<strong>86</strong></strong> operation codes.<br />

Command Usage<br />

as is invoked as follows:<br />

as [ option ]... filename ...<br />

where each option is an assembler option and filename is the name of the assembler<br />

source file. If the file name does not have the extension ".s", as displays a warning<br />

message before assembling the file. Although as has a large nu mber of options, the<br />

most commonly used are the -1 and -o options.<br />

The -1 option causes the assembler to create an assembly listing that includes the<br />

source, the assembled (binary) code, and any assembly errors. The listing file is named<br />

filename.L.<br />

The -o option causes the output to be placed in a given file. The option has the form<br />

-o outfile<br />

where outfile is the name of the file to receive the assembled program. If you do not<br />

use the -o option, as copies the output to filename.o in the current directory.<br />

For a complete description of all assembler options, see as in Appendix B, "Programming<br />

Commands."<br />

7-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!