Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ as(1) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adb(1)

astrn(1)

atrans(1)

ld(1)

m4(1)

nm(1)

a.out(5)

AS(1)

Series 300 Only starting at HP-UX Release 5.15

NAME

as − assembler for MC68000, MC68010, and MC68020

SYNOPSIS

as [−L] [−Nsn] [−m] [−d] [−w] [−o objfile] [file]
as10 [−L] [−Nsn] [−m] [−d] [−w] [−o objfile] [file]
as20 [−L] [−Nsn] [−m] [−d] [−w] [−o objfile] [file]

Remarks:

This version of as is implemented on Series 300 only. 

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 is linked to as10 or as20 at installation time to match the system processor model.  This link determines which of the two assemblers is the default for as. If as10 is invoked (separately or through as), MC68010 object code is produced (compatible with both the MC68010 and MC68020).  If, on the other hand, as20 is invoked, MC68020 object code is produced (some MC68020 processor instructions are not supported by the MC68010). 

All undefined symbols in the assembly are treated as global. 

Options are as follows:

−L Generates 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.

−Nsn
Changes the size of the user symbol table to accommodate up to n elements.  Default is 4000 entries. 

−m Processes the input file using the m4(1) macro preprocessor before assembling it.

−d When used with as20 assembler, as20 generates short-displacement forms for MC68010-compatible syntaxes, including forward references.  This option is ignored by as10.

−o Causes 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. 

−w Suppresses warning messages (errors are not suppressed). 

FILES

/usr/tmp/∗temporary files (can be changed by using TMPDIR.  See tmpnam(3S)).
file.oobject file

SEE ALSO

adb(1), astrn(1), atrans(1), ld(1), m4(1), nm(1), a.out(5). 
HP-UX Assembler Reference and ADB Tutorial for Series 200/300 Computers. 

DIAGNOSTICS

If the name chosen for the output file is of the form ∗.c or ∗.s, the assembler issues an appropriate complaint and quits.  When syntactic or semantic errors occur, a single-line diagnostic is produced, including the line number and file name in which it occurred. 

RESTRICTIONS/CAVEATS

Expressions cannot have more than one forward-referenced symbol, except for the special form <symbol>-<symbol>. 

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. 

BUGS

The displacement value for the movp instruction must be a first-pass absolute 16-bit value. 

NOTES

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. 

Hewlett-Packard Company  —  May 11, 2021

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