Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — NeXTSTEP 3.1 Prerelease 1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

ld(1)

nm(1)

otool(1)

Mach-O(5)

AS(1)  —  UNIX Programmer’s Manual

NAME

as − NeXT, GNU based, assemblers producing Mach object files

SYNOPSIS

as [ option ] ... [ file ] ... 

DESCRIPTION

As Translates assembly code in the named files object code (reads from stdin if no files are specified).  All undefined symbols in the assembly are treated as global.  The output of the assembly is left in the file a.out by default. 

The program /bin/as is a driver that executes assemblers for specific target architectures.  If no target architecture is specified it defaults to the architecture of the host it is running on. 

OPTIONS

−o name
The name argument after −o is used as the name of the as output file, instead of a.out. 

−arch arch_type
Specifies to the target architecture, arch_type, of the assembler to be executed.  The target assemblers for each architecture are in /lib/arch_type/as.

−− Use stdin for the assembly source input. 

−f Fast, no need for the “app” (assembler) preprocessor.  The assembler preprocessor can also be turned off by starting the assembly file with "#NO_APP\n".  This is intended for use by compilers which produce assembly code in a strict "clean" format that specifies exactly where whitespace can go.  The app preprocessor needs to be run on hand written assembly files and or file that have been preprocessed by the ’C’ preprocessor “cpp”.  This typicly is needed when assembler files are assembled through the use of the cc(1) command that automaticly runs the ’C’ pre-processor on assembly source files.  The assembler preprocessor function is to strips out excess spaces, turns single-quoted characters into a decimal constant, and turn # <number> <filename> <level> into a .line <number>;.file <filename> pairs. When the assembler preprocessor has been turned off via a "#NO_APP\n" at the start of a file it can be turned on an off with pairs of "#APP\n" and "#NO_APP\n" at the beginning of lines.  This is used by the compiler to wrap assembly statements produces from asm() statements.

−k Produces a warning when the statment “.word symbol1-symbol2+offset” does not fit in a 16 bit word (only applicable on the 68000 processor where .word is 16 bits and addresses are 16 bits).  Not applicable on NeXT machines. 

−g Produce debugging information for the symbolic debugger gdb(1) so the the assembly source can be debugged symbolicly.  For include files, included via the ’C’ pre-processor’s #include or the directive .include, that produce instructions in the (__TEXT,__text) section the include file must be included while a .text directive is in effect (that is a .text before the include) and end with the a .text directive in effect (at the end of the include file). Or otherwise the debugger will get confused when in that assembly file.

−v Print the version the the assembler (both the NeXT version and the GNU version that it is based on). 

−Idir Add the directory dir to the list of directories to search for files included with the .include directive.  The default place to search is the current directory then /usr/include . 

−W Suppress warnings. 

−L Save defined labels beginning with an ’L’, which are normally discarded to save space in the resultant symbol table.  The compiler generates such temporary labels. 

Assembler options for the mc68000 processors

−l For offsets off of an address register that refers to an undefined symbol, as in a6@(foo) where foo is not defined in the assembly file, make the offset and the relocation entry width 32 bits rather than 16 bits. 

−mc68000 and −mc68010
Generate branches that the mc68000 and mc68010 can use (that don’t use 32 bit pc-relative jumps and branches since the are not implemented on these two processors).  Not applicable on NeXT machines.

−mc68020
Generate branches that use 32 bit pc-relative displacements. This is the default.

FILES

a.outoutput file

SEE ALSO

cc(1), ld(1), nm(1), otool(1), Mach-O(5)

NeXT Computer, Inc.  —  September 13, 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026