Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


PPCAsm

Tool

SYNTAX

PPCAsm [filename] [-auxheader modtype] [-blocksize size] [-c[heck]]
[-case on | off] [-d[efine] name[=value][,name[=value]]…]
[-dialect Power | PowerPC {PPC} | PowerPC64 {PPC64}]
[-i pathname[,pathname]…] [-l] [-lo listingName] [-o objName] [-p]
[-sym man | off | on] [-typecheck strict | on | off]
[-w off | warn[,warn]…]

DESCRIPTION

You use the PPCAsm tool to assemble a PowerPC assembly-language source program into code for the PowerPC runtime environment. After assembling your source file, PPCAsm produces an object file in the Extended Common Object File Format (XCOFF).

To direct PPCAsm to generate symbolic information for source level debuggers, you can use the -sym option.

INPUT

If you do not specify a source file, PPCAsm assembles standard input. In this case, you can press Command-Enter to terminate input. Though ending an assembly source file with a .s suffix is the common file-naming convention, PPCAsm allows any name.

OUTPUT

For both assembly source file or standard input, PPCAsm produces object files with a .o extension. For source files, the object filename is used by default for the assembly source filename but you can use the -o option to create a more meaningful name. For standard input, the object file is a.o.

STATUS

PPCAsm can return the following status codes:

0

No errors detected in any of the files assembled

1

Parameter or options errors

2

Errors detected

3

Execution terminated

PARAMETERS

filename

Specifies the file to be assembled.

OPTIONS

-auxheader modtype

Generates an auxiliary XCOFF header with a module of type modtype. Values for modtype are:

1L     Single use
RE     Reusable
RO     Read only

-blocksize size

Specifies the number of 512 byte blocks in the assembler's I/O buffer.

-c[heck]

Checks syntax only, without generating an object file.

-case on | off

Controls case sensitivity for labels.

on

Distinguishes between uppercase and lowercase letters.

off

Ignores the case of letters (the default).

-d[efine] name[=value][,name[=value]]…

Defines the identifier name as having the specified decimal integer value. This option is equivalent to placing the directive name SET value at the beginning of the source file. You can define more than one name by specifying either multiple -d options or multiple name assignments (separated by commas).

name

Specifies the identifier that PPCAsm defines.

value

Specifies the decimal integer value of the identifier. Omitting the value causes name to have a default value of 1.

-dialect Power | PowerPC {PPC} | PowerPC64 {PPC64}

Specifies the translation for instruction mnemonics.

Power

Selects RS/6000 Power translation.

PowerPC {PPC}

Selects 32-bit PowerPC translation (the default).

PowerPC64 {PPC64}

Selects 64-bit PowerPC translation.

-i pathname[,pathname]…

Directs PPCAsm to search additional directories for include files.

If the include file in the source code is specified with a full pathname, PPCAsm searches for the file at that location. If the include file is specified with a partial pathname, the assembler automatically searches the directories in this order:

1. The current directory.
2. The directory containing the current input file.
3. The directories specified as -i parameters, in the order given.
4. The directories specified in the MPW Shell variable {PPCAsmIncludes}.

-l

Generates an assembly listing to standard output. The listing contains a representation of the generated object code next to each assembly source line.

-lo listingName

Generates an assembly listing to the file listingName in the current directory.

-o objName

Specifies a different filename for the generated object file.

-p

Writes progress and summary information to diagnostic output.

-sym man | off | on

Controls debug data generation.

man

Turns on manual debug data generation (the default).

off

Turns off debug data generation.

on

Turns on automatic debug data generation.

-typecheck strict | on | off

Controls typecheck warnings.

strict

Turns on strict typecheck warnings.

on

Turns on typecheck warnings (the default).

off

Turns off typecheck warnings.

-w off | warn[,warn]…

Suppresses warning messages.

off

Suppresses all warning messages.

warn[,warn]…

Suppresses just the listed warning messages.

EXAMPLES

To assemble a source file, you might enter this command:

ppcasm file1.s -o objfile1.o

Here, file1.s is your source file. The -o option specifies that the name of the resulting object file is objfile1.o.

SEE ALSO

Asm

PPCLink

Assembler for Macintosh With PowerPC

 
 


Last Updated July 2000