AS(1)
Series 300 Only
NAME
as − assembler for MC68000, MC68010, and MC68020
SYNOPSIS
as [options] [file]
as10 [options] [file]
as20 [options] [file]
DESCRIPTION
As assembles the named file (which usually has a .s suffix as in my_prog.s). If file is not specified or if − is given, standard input is used instead.
As (/bin/as) is a driver program that determines the type of processor residing in the host machine, then invokes either /bin/as10 or /bin/as20 as appropriate. The +x and +X options override the test for processor type and invoke either /bin/as20 or /bin/as10, respectively. /bin/as10 and /bin/as20 can also be invoked directly without using as.
If as10 is invoked (directly or through as), MC68010 object code is produced (compatible with both the MC68010 and MC68020). If, on the other hand, as20 is invoked, whether directly or through as, MC68020 object code is produced (some MC68020 processor instructions are not implemented on the MC68010).
All undefined symbols in the assembly are treated as global.
Options are as follows:
−L Generate entries in the linker symbol table for local as well as global symbols. Normally, only global and undefined symbols are entered into the table. This option is useful when using adb(1) to debug assembly language programs.
−l Generate entries in the linker symbol table for all global and undefined symbols, and for all local symbols except those with . or L as the first character. This option is useful when using tools like prof(1) on files generated by cc(1) or f77(1). Linker symbol table entries are generated for user-defined local names, but not for compiler-generated local names.
−m Process the input file using the m4(1) macro preprocessor before assembling it.
−d Cause as20 to generate short-displacement forms for MC68010-compatible syntaxes, including forward references, when used with as20 assembler. This option is ignored by as10.
−o objfile Cause output object code to be placed in file objfile. If −o is not specified and the source file is read from stdin, the object file is written to a.out. If −o is not specified and the source file is not stdin, the object file is written to a file whose name is created by removing the .s suffix (if present) from the basename of filename file, then adding a .o suffix to the base filename. The object .o file is placed in the current directory. To prevent improper interpretation of other options, the name of objfile cannot begin with the character − or +. To prevent accidental overwriting of source files, objfile cannot end with .s or .c.
−w Suppress warning messages (errors are not suppressed).
−A Generate an assembly listing with offsets, a hexadecimal dump of the generated code, and the source text. The assembly listing goes to standard out (stdout). This option cannot be used when input is stdin.
−a listfile Generate an assembly listing in file listfile. The listing option cannot be used when input is stdin. The name of listfile cannot end with .c or .s and cannot start with the character − or +.
−O Enable span-dependent optimization. Optimization is disabled by default.
+X Invoke /bin/as10. Override the test for processor type. This option is ignored when as10 or as20 is invoked directly.
+x Invoke /bin/as20. Override the test for processor type. This option is ignored when as10 or as20 is invoked directly.
Wherever possible, the assembler should be accessed through a compilation system interface program, such as cc(1).
Both assemblers support the complete MC68000 instruction set. However, if you are writing code for an MC68000 processor, you must limit instructions and program structures to those supported by the microprocessor. Using instructions supported by MC68010 or MC68020 processors on an MC68000 will cause an illegal instruction trap during program execution, but may not produce an error during program assembly and loading.
The HP-UX Series 300 assemblers support the complete MC68010 and MC68020 instruction sets. However, some instructions are not fully supported by the HP-UX Series 300 hardware, and should not be used in assembly code written for HP-UX Series 300 machines. These instructions are tas, cas, cas2, and bkpt.
DIAGNOSTICS
If the name chosen for the output file ends with .c or .s or starts with the character + or -, the assembler issues an appropriate complaint and quits. When a syntactic or semantic error occurs, a single-line diagnostic is produced that includes the line number and file name in which the error occurred.
WARNINGS
If the −m option is used, keywords for m4 cannot be used as symbols in the input file because m4 cannot determine which are assembler symbols and which are real m4 macros.
The displacement value for the movp instruction must be a first-pass absolute 16-bit value.
Expressions cannot have more than one forward-referenced symbol, except for the special form <symbol>-<symbol>.
FILES
/usr/tmp/∗ Temporary files (can be changed by using TMPDIR. See tmpnam(3S)).
file.o Object file
SEE ALSO
adb(1), astrn(1), atrans(1), cc(1), f77(1), ld(1), m4(1), nm(1), prof(1), tmpnam(3s), a.out(5).
HP-UX Assembler Reference Manual and ADB Tutorial for Series 300 Computers.
Hewlett-Packard Company — May 11, 2021