Need to know more? That’s ez, too. Technical support for MCUez development tools is available through your regional Motorola office or by contacting: Motorola, Inc. 6501 William Cannon Drive West MD:OE17 Austin, Texas 78735 Phone (800) 521-6274 Fax (602) 437-1858 CRC@CRC.email.sps.mot.com Motorola reserves the right to make changes without further notice to any products herein.
User’s Manual A G R E E M E N T MCUez HC12 Assembler N O N - D I S C L O S U R E R E Q U I R E D MCUEZASM12/D Rev.
R E Q U I R E D User’s Manual Important Notice to Users N O N - D I S C L O S U R E A G R E E M E N T While every effort has been made to ensure the accuracy of all information in this document, Motorola assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document, its updates, supplements, or special editions, whether such errors are omissions or statements resulting from negligence, accident, or any other cause.
User’s Manual — MCUez HC12 Assembler List of Sections Section 1. General Information . . . . . . . . . . . . . . . . . . . . 23 Section 2. Graphical User Interface. . . . . . . . . . . . . . . . . 37 Section 3. Environment Variables . . . . . . . . . . . . . . . . . . 55 Section 4. Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Section 5. Assembler Options . . . . . . . . . . . . . . . . . . . . . 77 Section 6. Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of Sections User’s Manual 6 MCUez HC12 Assembler List of Sections MOTOROLA
User’s Manual — MCUez HC12 Assembler Table of Contents Section 1. General Information 1.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.3 Structure of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.4 1.4.1 1.4.2 1.4.3 1.4.4 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 2.4.8 2.4.8.1 2.4.8.2 2.4.8.3 2.5 Specifying the Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Using the Editable Combo Box in the Toolbar . . . . . . . . . . . . . 53 Using the Entry File | Assembly ... . . . . . . . . . . . . . . . . . . . . . . 53 Using Drag and Drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Error Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Section 3.
Table of Contents 4.4.4 4.4.5 4.4.6 Listing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Debug Listing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Error Listing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Section 5. Assembler Options 5.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5.2 Introduction. . . . . . . . . . .
Table of Contents 6.3.1 6.3.2 6.3.3 Code Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Constant Data Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Data Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.4 Section Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.4.1 Absolute Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 7.4.3.11 7.4.3.12 7.4.3.13 7.4.3.14 7.4.3.15 7.4.3.16 7.4.4 Indexed, Pre-Increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Indexed, Post-Decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Indexed, Post-Increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Indexed, Accumulator Offset . . . . . . . . . . . . . . . . . . . . . . . . . 142 Indexed-Indirect, D Accumulator Offset . . . . . . . . . . . . . . . .
Table of Contents Section 8. Assembler Directives 8.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 8.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.2.7 8.2.8 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Section Definition Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Constant Definition Directives. . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 8.20 LIST — Enable Listing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 8.21 LLEN — Set Line Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8.22 LONGEVEN — Forcing Longword Alignment. . . . . . . . . . . . . . . . 188 8.23 MACRO — Begin Macro Definition . . . . . . . . . . . . . . . . . . . . . . . . 189 8.24 MEXIT — Terminate Macro Expansion . . . . . . . . . . . . . . . . . . . . . 190 8.
Table of Contents 9.6 Macro Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 9.7 Labels Inside Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 9.8 Macro Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 9.9 Nested Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Section 10. Assembler Listing File 10.1 Content . . . . . . . . . . . . . .
Table of Contents 11.6 Using Direct Addressing Mode to Access Symbols . . . . . . . . . . . . . 233 11.6.1 Using Direct Addressing Mode to Access External Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 11.6.2 Using Direct Addressing Mode to Access Exported Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 11.6.3 Defining Symbols in the Direct Page. . . . . . . . . . . . . . . . . . . . . . 234 11.6.4 Using a Force Operator . . . . . . . . . . .
Table of Contents 12.3.16 12.3.17 12.3.18 12.3.19 12.3.20 12.3.21 12.3.22 12.3.23 12.3.24 12.3.25 12.3.26 12.3.27 12.3.28 12.3.29 12.3.30 12.3.31 12.3.32 12.3.33 12.3.34 12.3.35 12.3.36 12.3.37 12.3.38 12.3.39 12.3.40 12.3.41 12.3.42 12.3.43 12.3.44 12.3.45 12.3.46 12.3.47 12.3.48 12.3.49 12.3.50 12.3.51 A2306: Macro not Closed at End of Source . . . . . . . . . . . . . . . . 260 A2307: Macro Redefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 A2308: Filename Expected . . . . . . . .
Table of Contents 12.3.52 12.3.53 12.3.54 12.3.55 12.3.56 12.3.57 12.3.58 12.3.59 12.3.60 12.3.61 12.3.62 12.3.63 12.3.64 12.3.65 12.3.66 12.3.67 12.3.68 12.3.69 A12010: Register Expected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 A12011: Size Specification Expected . . . . . . . . . . . . . . . . . . . . . 292 A12102: Page Value Expected . . . . . . . . . . . . . . . . . . . . . . . . . . 293 A12103: Operand not Allowed . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents Appendix B. MCUasm Compatibility B.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 B.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 B.3 Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 B.4 Set Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 B.
User’s Manual — MCUez HC12 Assembler List of Figures Figure Title 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 MCUez Shell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Environment Configuration Dialog Box. . . . . . . . . . . . . . . . . . . . . . . 25 Working Project Directory Dialog Box . . . . . . . . . . . . . . . . . . . . . . . 26 New Configuration Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Assembler Window. . . . . . . . . . .
List of Figures Figure Title 7-1 7-2 7-3 7-4 Relocatable Symbols Program Example. . . . . . . . . . . . . . . . . . . . . . 146 Set or EQU Directive Program Example . . . . . . . . . . . . . . . . . . . . . 146 External Symbol Program Example . . . . . . . . . . . . . . . . . . . . . . . . . 146 Undefined Symbol Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 11-1 11-2 11-3 11-4 Starting the MCUez Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User’s Manual — MCUez HC12 Assembler List of Tables Table Title 2-1 2-2 2-3 Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Assembler Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Advanced Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3-1 Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of Tables User’s Manual 22 MCUez HC12 Assembler List of Tables MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 1. General Information 1.1 Contents 1.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.3 Structure of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.4 1.4.1 1.4.2 1.4.3 1.4.4 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Creating a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Information 1.3 Structure of This Manual This list describes the topics contained in this manual.
General Information Getting Started 1.4.1 Creating a New Project The first step in creating an application is to define the new project. Do this by using the MCUez Shell. 1. Start the MCUez Shell. Figure 1-1. MCUez Shell 2. Click on the ezMCU button to open the Configuration dialog box. Figure 1-2. Environment Configuration Dialog Box 3. Click on the New button to open the Project Directory dialog box.
General Information 4. Enter the path for the new project in the edit box. For example, substitute C:\MCUEZ\MCuez12\DEMO\WMMDS12A with C:\MCUEZ\MCUez12\DEMO\mydir as the example shows in Figure 1-3. Figure 1-3. Working Project Directory Dialog Box NOTE: The specified directory must be accessible from a PC. 5. Click on the OK button to close the Project Directory dialog box. The New Configuration dialog box will then appear. 6. Define the editor to use with the project. Select the Editor tab.
General Information Getting Started Figure 1-4. New Configuration Dialog Box 7. Click on the OK button in the New Configuration dialog box to create the MCUez configuration files in the specified project directory.
General Information 1.4.2 Creating an Assembly Source File Once the project has been configured, writing the application can begin. For example, source code may be stored in a file named test.asm and may look as like this: XDEF entry initStk: EQU $AFE dataSec: SECTION var1: DC.W 5 codeSec: SECTION entry: LDS #initStk LDD var1 BRA entry ; ; ; ; ; ; ; ; ; ; Make the symbol entry visible for external module.
General Information Getting Started 1.4.3 Assembling a Source File This procedure describes how to assemble a source file. 1. Start the assembler by clicking on the ezASM button in the MCUez Shell. Enter the name of the file to be assembled in the editable combo box, as shown in Figure 1-5. Figure 1-5.
General Information 2. Select the menu entry Assembler | Options to generate an ELF/DWARF 2.0 object file. The Options Settings dialog is displayed as shown in Figure 1-6. Figure 1-6.
General Information Getting Started 3. In the Output folder, select the check box in front of the label Object File Format shown in Figure 1-7. Select the radio button ELF/DWARF 2.0 Object File Format and click OK. Figure 1-7.
General Information 4. The file is assembled, as shown in Figure 1-8, when the Assemble button is clicked. Figure 1-8. Assembling a File The macro assembler indicates a successful assembler session by printing the number of generated bytes of code. The message Code size: 10 indicates that test.asm was assembled without errors. The macro assembler generates a binary object file and a debug listing file for each source file. The binary object file has the same name as the input module with an extension of .
General Information Getting Started The list file generated by the macro assembler looks like this: Motorola HC12-Assembler (c) COPYRIGHT MOTOROLA 1991-1997 Abs. Rel. Loc. Obj. code Source line ---- --------------------------1 1 XDEF entry ... 4 4 0000 0AFE initStk: EQU $AFE ; ; 5 5 dataSec: SECTION ; 6 6 000000 0005 var1: DC.
General Information NOTE: The commands in the linker parameter file are described in detail in the MCUez Linker User’s Manual, Motorola document order number MCUEZLNK/D. 4. Click the eZLink button in the MCUez Shell. The linker is started as shown in Figure 1-9. 5. Enter the name of the file to be linked in the editable combo box. To start linking, press the Enter key or click on the Link button. Link Button Figure 1-9.
General Information Getting Started Once the linker is started, the linker window displays the link process as shown in Figure 1-10. Figure 1-10.
General Information User’s Manual 36 MCUez HC12 Assembler General Information MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 2. Graphical User Interface 2.1 Contents 2.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.3 Starting the Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 2.4 Assembler Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.4.1 Window Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.4.
Graphical User Interface 2.3 Starting the Motorola Assembler Start the assembler from the MCUez Shell by clicking on the ezASM icon in the toolbar. When the assembler is started, a standard Tip of the Day window, containing tips about the assembler, is displayed. Figure 2-1. Tip of the Day Window Click Next Tip to see the next piece of information about the assembler. Click Close to close the Tip of the Day dialog.
Graphical User Interface Assembler Graphical Interface 2.4 Assembler Graphical Interface If the assembler was started without specifying a filename, the window in Figure 2-2 is displayed. The assembler window provides a window title, menu bar, toolbar, content area, and status bar. Menu Bar Toolbar Content Area Status Bar Figure 2-2. Assembler Window 2.4.1 Window Title The window title displays the assembler name and project name. If no project is currently loaded, Default Configuration is displayed.
Graphical User Interface 2.4.2 Content Area The content area displays logging information about the assembly session and consists of: • Name of file being assembled • Complete path and name of files processed (main assembly file and all included files) • List of error, warning, and information messages • Size of code generated during the assembly session If a filename is dragged and dropped into the content area, the file is either loaded as a configuration file or is assembled.
Graphical User Interface Assembler Graphical Interface After an assembly session has completed, error feedback can be performed automatically by double clicking on the message in the content area. The source file containing the error or warning message will open to the line containing the problem. 2.4.3 Assembler Toolbar Figure 2-3 illustrates the assembler toolbar.
Graphical User Interface 2.4.4 Status Bar Figure 2-4 shows the assembler status bar. Current Time Message Area Figure 2-4. Assembler Status Bar Point to a menu entry or button in the toolbar to display a brief explanation in the message area. 2.4.5 Assembler Menu Bar The entries in Table 2-1 are available in the Menu Bar. Table 2-1.
Graphical User Interface Assembler Graphical Interface Assembler configuration information is stored in the specified configuration file. As many configuration files as required for a project can be defined. Switch to different configuration files by selecting File|Load Configuration and File|Save Configuration, or by clicking the corresponding toolbar buttons. For instance: • Choose File|Assemble to open a standard Open File dialog box. A list of all .asm files in the project directory is displayed.
Graphical User Interface 2.4.6.1 Editor Settings Dialog This dialog box has several radio buttons for selecting a type of editor. Depending on the type selected, the content below it changes. These are the main entries: • Global Editor (Configured by the Shell) Figure 2-5. Starting the Global Editor This entry is enabled only when an editor is defined in the [Editor] section of the global initialization file mcutools.ini.
Graphical User Interface Assembler Graphical Interface • Local Editor (Configured by the Shell) Figure 2-6. Starting the Local Editor This entry is only enabled if an editor is defined in the local configuration file, usually project.ini in the project directory. The Global Editor and Local Editor settings cannot be edited within this dialog box, since they are read only. These entries can be configured with the MCUez Shell application.
Graphical User Interface • Editor started with Command Line Figure 2-7. Starting the Editor with the Command Line When this editor type is selected, a separate editor is associated with the assembler for error feedback. The editor configured in the shell will not be used for error feedback. Enter the appropriate path and command name to start the editor. Command modifiers are specified on the command line. Example: For WinEdit 32-bit version C:\WinEdit32\WinEdit.
Graphical User Interface Assembler Graphical Interface • Editor started with DDE Figure 2-8. Starting the Editor with DDE Enter the service, topic, and client name to be used for a DDE connection to the editor. All entries can have modifiers for filename and line number as explained in the next example.
Graphical User Interface • Modifiers When either entry Editor Started with the Command line or Editor started with DDE is selected, the configuration may contain modifiers to identify which file to open and which line to select. – The %f modifier refers to the name of the file (including path) where the error has been detected. – The %l modifier refers to the line number where the message has been detected. The editor format depends on the command syntax used to start the editor.
Graphical User Interface Assembler Graphical Interface 2.4.6.2 Save Configuration Dialog Figure 2-9 shows the Save Configuration dialog box. Figure 2-9. Save Configuration Dialog Box The second page of the configuration dialog consists of save operations. In the Save Configuration dialog, select attributes to be stored in the project file. This dialog box provides the following configurations: • Options — When set, the current option settings are stored in the configuration file.
Graphical User Interface • NOTE: Save on exit — If this option is set, the assembler will save the configuration on exit. No prompt will appear to confirm this operation. If this option is not set, the assembler will ignore any changes. Almost all settings are stored in the configuration file. Exceptions are the recently used configuration list and all settings in this dialog. These settings are stored in the assembler section of the mcutools.ini file.
Graphical User Interface Assembler Graphical Interface • Choose View|Log ...|Change Font to open a standard Font Selection dialog box. Options selected in this dialog are applied to the assembler window content area. • Choose View|Log ...|Clear Log to clear the assembler window content area. 2.4.7.1 Option Settings Dialog Box This dialog box enables the user to set/reset assembler options, as shown in Figure 2-10. Figure 2-10.
Graphical User Interface Available options are arranged in different groups as shown in Table 2-3. Table 2-3. Advanced Options Option Group Description Output Lists options related to the output files generated (type of files to be generated) Input Lists options related to the input file Host Lists options related to the host Code Generation Lists options related to code generation (memory models, ...
Graphical User Interface Error Feedback 2.4.8.1 Using the Editable Combo Box in the Toolbar The following describes how to use the Editable Combo box. • Assembling a new file — A new filename and additional assembler options can be entered on the command line. Click on the Assemble button or press the Enter key to assemble the specified file. • Reassembling a file — The previously executed command can be displayed by clicking on the arrow on the right side of the command line.
Graphical User Interface Example: >> in “C:\DEMO\fiboerr.asm”, line 76, col 20, pos 1932 BRA label ^ ERROR A1104: Undeclared user defined symbol: label Errors can be corrected by using the editor defined during configuration. Editors such as WinEdit Version 95 (or higher) or Codewright from Premia Corporation can be started with a line number in the command line. If configured correctly, these editors are activated automatically by double clicking on an error message.
User’s Manual — MCUez HC12 Assembler Section 3. Environment Variables 3.1 Contents 3.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.3 Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.4 Line Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.5 Environment Variables Description . . . . . . . . . . . . . . . . . . . . . . . . . .
Environment Variables 3.2 Introduction This section describes environment variables used by the MCUez assembler. Environment variables are set in the Paths or Additional tab of the MCUez shell New Configuration or Current Configuration dialog box. Refer to the MCUez Installation and Configuration User’s Manual, Motorola document order number MCUEZINS/D. Environment variables that define paths (such as GENPATH, OBJPATH, ABSPATH, etc.) are used by the assembler and other MCUez applications. 3.
Environment Variables Line Continuation 3.4 Line Continuation It is possible to specify an environment variable over more than one line by using the line continuation character \ (back slash). Example: ASMOPTIONS=\ -W2 \ -WmsgNe=10 This is the same as ASMOPTIONS=-W2 -WmsgNe=10 Observe the following when using the continuation character in path definitions: GENPATH=.\ TEXTFILE=.\txt Will result in GENPATH=.TEXTFILE=.
Environment Variables 3.5 Environment Variables Description The remainder of this section describes each of the environment variables available for the assembler. The information in Table 3-1 describes the structure for explaining each environment variable. Table 3-1.
Environment Variables Environment Variables Description 3.5.1 ASMOPTIONS Syntax: ASMOPTIONS= Arguments: : Assembler command line option Description: If this environment variable is set, the assembler appends its contents to its command line each time a file is assembled. It can be used to globally specify certain options that should always be set, so they don’t have to be specified each time a file is assembled.
Environment Variables 3.5.2 GENPATH NOTE: Syntax: GENPATH= Arguments: : Paths separated by semicolons, without spaces. Description: The macro assembler will look for the source or included files first in the project directory, then in the directories listed in the environment variable GENPATH. If a directory specification in this environment variable starts with an asterisk (*), the entire directory tree is searched recursively, for instance, all subdirectories are searched.
Environment Variables Environment Variables Description 3.5.3 ABSPATH Syntax: ABSPATH= Arguments: : Paths separated by semicolons, without spaces Description: This environment variable is only relevant when absolute files are directly generated by the macro assembler instead of object files. When this environment variable is defined, the assembler will store the absolute files it produces in the first directory specified.
Environment Variables 3.5.4 OBJPATH Syntax: OBJPATH= Arguments: : Paths separated by semicolons, without spaces Description: When this environment variable is defined, the assembler will store the object files it produces in the first directory specified. If OBJPATH is not set, the generated object files will be stored in the directory where the source file was found. Example: OBJPATH=\sources\bin;..\..\headers;\usr\local\bin MCUez Shell: Open the Current Configuration dialog.
Environment Variables Environment Variables Description 3.5.5 TEXTPATH Syntax: TEXTPATH= Arguments: : Paths separated by semicolons, without spaces Description: When this environment variable is defined, the assembler will store the listing files it produces in the first directory specified. If TEXTPATH is not set, the generated listing files will be stored in the directory where the source file was found. Example: TEXTPATH=\sources\txt;..\..
Environment Variables 3.5.6 SRECORD Syntax: SRECORD= Arguments: : Force the type for the Motorola S record that must be generated. This parameter may take the value S1, S2, or S3. Description: This environment variable is only relevant when absolute files are generated directly by the macro assembler instead of object files.
Environment Variables Environment Variables Description 3.5.7 ERRORFILE Syntax: ERRORFILE= Arguments: : Filename with possible format specifiers Description: The environment variable ERRORFILE specifies the name of the error file used by the assembler. Possible format specifiers are: %n: Substitute with the filename, without the path %p: Substitute with the path of the source file %f: Substitute with the full filename (path included; same as %p%n) Examples: ERRORFILE=MyErrors.
Environment Variables ERRORFILE=%p\errors.txt An error file \dir1\dir2\errors.txt will be generated for a source file \dir1\dir2\test.asm. If the environment variable ERRORFILE is not set, errors are written to the default error file. The default error filename is dependent upon how the assembler is configured and started. If no filename is provided, errors are written to the err.txt file in the project directory. MCUez Shell: Open the Current Configuration dialog. Select the Additional tab.
Environment Variables Environment Variables Description 3.5.8 COPYRIGHT: Copyright Entry in Object File Tools: Assembler and linker Syntax: COPYRIGHT= Arguments: : String for the copyright entry in the object file Default: None Description: Each object file contains an entry for a copyright string. This information may be retrieved from the object files. Example: COPYRIGHT=Copyright by Motorola MCUez Shell: Open the Current Configuration dialog.
Environment Variables 3.5.9 INCLUDETIME: Create Time in Object File Tools: Assembler and linker Syntax: INCLUDETIME=(ON | OFF) Arguments: ON: Include time information in object file OFF: Do not include time information in object file. Default: ON Description: Normally, each object file created contains a time stamp indicating the creation time and data as strings. So whenever a new file is created by one of the tools, the new file gets a new time stamp entry.
Environment Variables Environment Variables Description 3.5.10 USERNAME: User Name in Object File Tools: Assembler and linker Syntax: USERNAME= Arguments: : Name of user Default: None Description: Each object file contains an entry identifying the user who created the object file. This information may be retrieved from the object files using a decoder. Example: USERNAME=MOTOROLA MCUez Shell: Open the Current Configuration dialog. Select the Additional tab.
Environment Variables User’s Manual 70 MCUez HC12 Assembler Environment Variables MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 4. Files 4.1 Contents 4.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.3 4.3.1 4.3.2 Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.4 4.
Files 4.3.1 Source Files The macro assembler takes any file as input and does not require the filename to have a special extension. However, it is suggested that all source filenames have the extension .asm and all included files have the extension .inc. Source files will be searched first in the project directory and then in the GENPATH directory. 4.3.2 Include Files The search for include files is governed by the environment variable GENPATH.
Files Output Files 4.4.2 Absolute Files When an application is encoded in a single module and all the sections are absolute sections, the user can decide to generate an absolute file instead of an object file. This file is written to the directory given in the environment variable ABSPATH. If that variable contains more than one path, the absolute file is written in the first directory given. If this variable is not set, the absolute file is written in the directory where the source file was found.
Files 4.4.4 Listing Files After a successful assembly session, the macro assembler generates a listing file containing each assembly instruction with its associated hexadecimal code. This file is generated when the option -L is activated, even if the macro assembler generates an absolute file. This file is written to the directory given in the environment variable TEXTPATH. If that variable contains more than one path, the listing file is written in the first directory specified.
Files Output Files 1. Current Directory 2. GENPATH .inc 1. Current Dir 2. GENPATH .asm ASSEMBLER ERRORFILE .o or .abs 1. OBJPATH 2. Source File Path .lst 1. TEXTPATH 2. Source File Path err.txt or EDOUT .dbg Figure 4-1.
Files User’s Manual 76 MCUez HC12 Assembler Files MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 5. Assembler Options 5.1 Contents 5.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.3 ASMOPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.4 Assembler Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.4.1 -CI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 5.
Assembler Options 5.2 Introduction The assembler offers a number of options that control how the assembler operates. Options consist of a dash (-) followed by one or more letters or digits. Anything not starting with a dash is assumed to be the name of a source file to be assembled. Assembler options may be specified on the command line or in the ASMOPTIONS environment variable. Typically, each assembler option is specified only once per assembly session.
Assembler Options Assembler Options 5.4 Assembler Options Table 5-1 describes how assembler options are grouped and Table 5-2 describes the scope of each option. Table 5-1. Assembler Option Group Group Description HOST Lists options related to the host OUTPUT Lists options related to output file generation (type of file to be generated) INPUT Lists options related to input file CODE Lists options related to code generation (memory models, float format, etc.
Assembler Options Table 5-3.
Assembler Options Assembler Options 5.4.1 -CI -CI: Set case sensitivity for label names OFF Group: INPUT Scope: Assembly unit Syntax: -CI Arguments: None Default: ON Description: Switches case sensitivity OFF for label names. When this option is activated, the assembler ignores case sensitivity for label names. This option can be only specified when the assembler generates an absolute file. (Option -FA2 must be activated.
Assembler Options 5.4.2 -Env -Env: Set environmental variable Group: HOST Scope: Assembly unit Syntax: -Env = Arguments: : Environment variable to be set : Assigned value Default: None Description: This option sets an environment variable. Example: ASMOPTIONS=-EnvOBJPATH=\sources\obj This is the same as OBJPATH=\sources\obj in the default.env file. See also: Section 3.
Assembler Options Assembler Options 5.4.3 -F2 -FA2 -F: Object file format Group: OUTPUT Scope: Application Syntax: -F (2 | A2) Arguments: 2: ELF/DWARF 2.0 object file format A2: ELF/DWARF 2.0 absolute file format (default) Default: -FA2 Description: Defines format for the output file generated by the assembler With the option -F2 set, the assembler produces an ELF/DWARF 2.0 object file. With the option -FA2 set, the assembler produces an ELF/DWARF 2.0 absolute file.
Assembler Options 5.4.4 -H -H: Short help Scope: None Syntax: -H Arguments: None Default: None Description: The -H option will display a short list of available options. No other option or source file should be specified when the -H option is invoked.
Assembler Options Assembler Options 5.4.5 -L -L: Generates a listing file Group: OUTPUT Scope: Assembly unit Syntax: -L Arguments: None Default: None Description: Switches on generation of the listing file. This listing file will have the same name as the source file, but with the extension .lst. The listing file contains macro definitions, invocation, and expansion lines as well as expanded include files.
Assembler Options Generates the following output in the assembly listing file: 5 5 INCLUDE 6 7 8 9 10 11 1i 2i 3i 4i 5i 6 12 13 7 8 14 2m 000000 FC xxxx + LDD 15 3m 000003 7C xxxx + STD "macro.inc" cpChar: MACRO LDD \1 STD \2 ENDM codeSec: SECTION Start: cpChar ch1, ch2 ch1 ch2 16 17 9 10 000006 A7 000007 A7 NOP NOP Contents of included files, as well as macro definition, invocation and expansion are stored in the listing file. Refer to Section 10.
Assembler Options Assembler Options 5.4.6 -Lc -Lc: No macro call in listing file Group: OUTPUT Scope: Assembly unit Syntax: -Lc Arguments: None Default: None Description: Switches on generation of the listing file, but macro invocations are not present in the listing file. The listing file contains macro definitions and expansion lines as well as expanded include files. Example: ASMOPTIONS=-Lc In the following assembly code example, the macro cpChar accepts two parameters.
Assembler Options Generates the following output in the assembly listing file: 5 5 cpChar: 6 6 7 7 8 8 9 9 codeSec: 10 12 10 6m Start: 000000 FC xxxx + 13 7m 000003 7C xxxx + 14 12 000006 A7 15 13 000007 A7 MACRO LDD \1 STD \2 ENDM SECTION LDD char1 STD char2 NOP NOP Contents of included files, macro definitions, and expansion are stored in the list file. The source line containing the macro call is not present in the listing file. Refer to Section 10.
Assembler Options Assembler Options 5.4.7 -Ld -Ld: No macro definition in listing file Group: OUTPUT Scope: Assembly unit Syntax: -Ld Arguments: None Default: None Description: Switches on generation of the listing file, but macro definitions are not present in the listing file. The listing file contains macro invocation and expansion lines as well as expanded include files. Example: ASMOPTIONS=-Ld In the following example, the macro cpChar accepts two parameters.
Assembler Options Generates this output in the assembly listing file: 5 5 cpChar: 9 9 codeSec: 10 11 Start: MACRO SECTION 10 11 cpChar char1, char2 12 LDD char1 13 STD char2 14 NOP 15 NOP 6m 000000 FC xxxx + 7m 000003 7C xxxx + 12 000006 A7 13 000007 A7 Contents of included files, as well as macro invocation and expansion are stored in the listing file. Source code from the macro definition is not present in the listing file. Refer to Section 10.
Assembler Options Assembler Options 5.4.8 -Le -Le: No macro expansion in listing file Group: OUTPUT Scope: Assembly unit Syntax: -Le Arguments: None Default: None Description: Switches on generation of the listing file, but macro expansions are not present in the listing file. The listing file contains macro definitions and invocation lines as well as expanded include files. Example: ASMOPTIONS=-Le In the following example, the macro cpChar accepts two parameters.
Assembler Options Generates this output in the assembly listing file: 5 5 cpChar: 6 6 7 7 8 8 9 9 codeSec: 10 11 Start: MACRO LDD \1 STD \2 ENDM SECTION 10 11 cpChar char1, char2 14 NOP 15 NOP 12 000006 A7 13 000007 A7 Contents of included files, as well as macro definitions and invocation are stored in the listing file. Macro expansion lines are not present in the listing file. Refer to Section 10. Assembler Listing File for detailed information. See also: 5.4.
Assembler Options Assembler Options 5.4.9 -Li -Li: No included file in listing file Group: OUTPUT Scope: Assembly unit Syntax: -Li Arguments: None Default: None Description: Switches on generation of the listing file, but include files are not expanded in the listing file. The listing file contains macro definitions, invocation, and expansion lines. Example: ASMOPTIONS=-Li When option -Li is specified, this portion of code: INCLUDE "macro.
Assembler Options 5.4.10 -Ms -Mb -M: Memory model Group: CODE Scope: Application Syntax: -M (s | b) Arguments: s: Small memory model b: Banked memory model Default: -Ms Description: The assembler for the MC68HC12 supports two different memory models. Default is the small memory model, which corresponds to the normal setup, for example, a 64-Kbyte code-address space. If a code memory expansion scheme is used, the banked memory model may be changed.
Assembler Options Assembler Options 5.4.11 -MCUasm -MCUasm: Switch ON MCUasm compatibility Group: VARIOUS Scope: Assembly unit Syntax: -MCUasm Arguments: None Default: None Description: Switches ON MCUasm assembler compatibility mode. Additional features supported are listed in Appendix B. MCUasm Compatibility.
Assembler Options 5.4.12 -N -N: Display error notification box Group: MESSAGES Scope: Assembly unit Syntax: -N Arguments: None Default: None Description: Causes the assembler to display an alert box if an error occurs during assembly. This is useful when running a makefile, since the assembler waits for the user to acknowledge the message, thus suspending makefile processing.
Assembler Options Assembler Options 5.4.13 -V NOTE: -V: Displays the assembler version Group: VARIOUS Scope: None Syntax: -V Arguments: None Default: None Description: Prints the assembler version and the current directory This option is useful to determine the current directory. Example: -V produces this list: Directory: C:\MCUEZ\demo\WMMDS12A Limitation Status: none Common Module V-5.0.4, Date Mar 18 1998 Assembler Kernel, V-5.0.9, Date Mar 20 1998 User Interface Module, V-5.0.
Assembler Options 5.4.14 -W1 -W1: No information messages Group: MESSAGES Scope: Assembly unit Syntax: -W1 Arguments: None Default: None Description: INFORMATION messages are not displayed. Only WARNING and ERROR messages are listed.
Assembler Options Assembler Options 5.4.15 -W2 -W2: No information and warning messages Group: MESSAGES Scope: Assembly unit Syntax: -W2 Arguments: None Default: None Description: INFORMATION and WARNING messages are not displayed. Only ERROR messages are listed.
Assembler Options 5.4.16 -WmsgNe -WmsgNe: Number of error messages Group: MESSAGES Scope: Assembly unit Syntax: -WmsgNe Arguments: : Maximum number of error messages Default: 50 Description: Sets the number of errors detected before the assembler stops processing Example: ASMOPTIONS=-WmsgNe2 The assembler stops assembling after two error messages. See also: 5.4.17 -WmsgNi and 5.4.
Assembler Options Assembler Options 5.4.17 -WmsgNi -WmsgNi: Number of information messages Group: MESSAGES Scope: Assembly unit Syntax: -WmsgNi Arguments: : Maximum number of information messages Default: 50 Description: Sets the maximum number of information messages to be logged Example: ASMOPTIONS=-WmsgNi10 The first 10 information messages are logged. See also: 5.4.16 -WmsgNe and 5.4.
Assembler Options 5.4.18 -WmsgNw -WmsgNw: Number of warning messages Group: MESSAGES Scope: Assembly unit Syntax: -WmsgNw Arguments: : Maximum number of warning messages Default: 50 Description: Sets the maximum number of warning messages to be logged Example: ASMOPTIONS=-WmsgNw15 The first 15 warning messages are logged. See also: 5.4.16 -WmsgNe and 5.4.
Assembler Options Assembler Options 5.4.19 -WmsgFbv -WmsgFbm -WmsgFb: Set message file format for batch mode Group: MESSAGE Scope: Assembly unit Syntax: -WmsgFb [v | m] Arguments: v: Verbose format m: Microsoft format Default: -WmsgFbm Description: The assembler can be started with additional arguments (for example, files to be assembled together with assembler options).
Assembler Options By default, the assembler generates the following error information if it is running in batch mode: X:\TW2.ASM(12):ERROR: conditional else not allowed here Setting the format to verbose, more information is listed: ASMOPTIONS=-WmsgFbv >> in "X:\TW2.ASM", line 12, col 0, pos 215 endif endif ^ ERROR A1001: Conditional else not allowed here See also: 5.4.
Assembler Options Assembler Options 5.4.20 -WmsgFiv -WmsgFim -WmsgFi: Set message file format for interactive mode Group: MESSAGE Scope: Assembly unit Syntax: -WmsgFi [v | m] Arguments: v: Verbose format m: Microsoft format NOTE: Default: -WmsgFiv Description: If the assembler is started without additional arguments, the assembler is in interactive mode (a window is visible).
Assembler Options By default, the assembler generates the following error output in the assembler window if it is running in interactive mode: >> in "X:\TWE.ASM", line 12, col 0, pos 215 endif endif ^ ERROR A1001: Conditional else not allowed here Setting the format to Microsoft, less information is displayed: ASMOPTIONS=-WmsgFim X:\TWE.ASM(12): ERROR: conditional else not allowed here See also: 5.4.
User’s Manual — MCUez HC12 Assembler Section 6. Sections 6.1 Contents 6.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.3 6.3.1 6.3.2 6.3.3 Section Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Code Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Constant Data Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Data Sections . .
Sections 6.3 Section Attributes According to content, an attribute is associated with each section. A section may be a: • Code section • Constant data section • Data section 6.3.1 Code Sections A section containing at least an instruction is considered to be a code section. Code sections are always allocated in the target processor ROM area. Code sections should not contain any variable definitions (variables defined using the DS (define space) directive).
Sections Section Types 6.3.3 Data Sections A section containing variables (variable defined using the DS directive) is considered to be a data section. Data sections are always allocated in the target processor RAM area. Empty sections that do not contain any code or data declarations are also considered to be data sections. 6.
Sections In the previous example, two bytes of storage are allocated starting at address $A00. Symbol cst1 will be allocated at address $A00 and cst2 will be allocated at address $A01. All subsequent instructions or data allocation directives will be located in the absolute section until another section is specified using the ORG or SECTION directive. When using absolute sections, the user is responsible for ensuring that no overlap exists between the different absolute sections defined in the application.
Sections Section Types The linker PRM file contains at least: • The name of the absolute file (command LINK) • The name of the object file that should be linked (command NAMES) • Specification of a memory area where the sections containing variables must be allocated. At least the predefined section .data must be placed there (command SEGMENTS and PLACEMENT). For applications containing only absolute sections, nothing will be allocated.
Sections In the previous example, two bytes of storage are allocated in section constSec. Symbol cst1 will be allocated at offset 0 and cst2 at offset 1 from the beginning of the section. All subsequent instructions or data allocation directives will be located in the relocatable section constSec until another section is specified using the ORG or SECTION directive. When using relocatable sections, the user does not need to worry about overlapping sections.
Sections Section Types The linker PRM file contains at least: • The name of the absolute file (command LINK) • The name of the object file which should be linked (command NAMES) • Specification of a memory area where the sections containing variables must be allocated. At least the predefined section .data must be placed there (command SEGMENTS and PLACEMENT). • Specification of a memory area where the sections containing code or constants must be allocated. At least the predefined section .
Sections According to the PRM file in Figure 6-2: • The section dataSec will be allocated starting at 0x0900. • The section constsec will be allocated starting at 0x0C00. • The section codeSec will be allocated starting at 0x0B00. 6.4.3 Relocatable versus Absolute Section Generally, developing an application using relocatable sections is recommended. Relocatable sections offer several advantages. 6.4.3.
Sections Section Types 6.4.3.3 Early Development The application can be developed before the application memory map is known. Often the definitive application memory map can be determined only once the size required for code and data can be evaluated. The size required for code or data can be quantified only once the major part of the application is implemented. When absolute sections are used, defining the definitive memory map is an iterative process of mapping and remapping the code.
Sections User’s Manual 116 MCUez HC12 Assembler Sections MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 7. Assembler Syntax 7.1 Contents 7.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 7.3 Comment Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 7.4 Source Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 7.4.1 Label Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 7.
Assembler Syntax 7.5 7.5.1 7.5.2 7.5.3 7.5.4 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 User-Defined Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 External Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Undefined Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Reserved Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assembler Syntax Introduction 7.2 Introduction An assembler source program is a sequence of source statements. Each source statement is coded on one line of text and can be a: • Comment line • Source line 7.3 Comment Line A comment can occupy an entire line to explain the purpose and usage of a block of statements or to describe an algorithm. A comment line contains a semicolon followed by text. Comments are included in the assembly listing, but are not significant to the assembler.
Assembler Syntax 7.4.1 Label Field The label field is the first field in a source line. A label is a symbol followed by a colon. Labels can include letters (A... Z or a... z), underscores, periods, and numbers. The first character must not be a number. NOTE: For compatibility with other macro assembler vendors, an identifier starting on column 1 is considered to be a label, even if it is not terminated by a colon.
Assembler Syntax Source Line 7.4.2.1 Instructions Executable instructions for the M68HC12 processor are defined in the CPU Reference Manual, Motorola document order number CPU12RM/AD. Table 7-1 presents a summary of available executable instructions. Table 7-1.
Assembler Syntax Table 7-1.
Assembler Syntax Source Line Table 7-1.
Assembler Syntax Table 7-1.
Assembler Syntax Source Line Table 7-1.
Assembler Syntax Table 7-1.
Assembler Syntax Source Line Table 7-1.
Assembler Syntax Table 7-1.
Assembler Syntax Source Line 7.4.3 Operand Fields The operand fields, when present, follow the operation field and are separated by white space. When two or more operand subfields appear within a statement, a comma must separate them. The address mode notations in Table 7-2 are allowed in the operand field. Table 7-2.
Assembler Syntax 7.4.3.1 Inherent Instructions using this addressing mode either have no operands or all operands are stored in internal CPU registers. The CPU does not need to perform memory access to complete the instruction. Example: NOP CLRA ; Instruction with no operand ; Operand is in CPU register A 7.4.3.2 Immediate The opcode contains the value to use with the instruction rather than the address of this value. The # (pound sign) character is used to indicate an immediate addressing mode operand.
Assembler Syntax Source Line One very common programming error is to omit the # character. This causes the assembler to misinterpret the expression as an address rather than explicit data. Example: LDAA $60 means load accumulator A with the value stored at address $60. 7.4.3.3 Direct The direct addressing mode is used to access operands in the direct page of the memory (location $0000 to $00FF).
Assembler Syntax 7.4.3.4 Extended The extended addressing mode is used to access memory located above the direct page in a 64-Kbyte memory map. Example: data: MyCode: Entry: XDEF Entry ORG $100 DS.B 1 SECTION main: LDS #$AFE LDAA #$01 STAA data BRA main ; init Stack Pointer In this example, the value in register A is stored in the variable data. This variable is located at address $0100 in the memory map. 7.4.3.
Assembler Syntax Source Line Long branch instructions (LBRA, LBEQ, etc.) expect a signed offset encoded on two bytes. The valid range for a long branch offset is [–32,768...32,767]. Using the special symbol for location counter, it is possible also to specify an offset to the location pointer as the target for a branch instruction. The * (asterisk) refers to the beginning of the instruction where it is specified.
Assembler Syntax 7.4.3.6 Indexed, 5-Bit Offset This addressing mode adds a 5-bit signed offset to the base index register to form the memory address, which is referenced in the instruction. The valid range for a 5-bit signed offset is [–16...15]. The base index register may be X, Y, SP, PC, or PCR. For information about indexed PC and indexed PC relative addressing modes, see 7.4.3.16 Indexed PC versus Indexed PC Relative Addressing Mode.
Assembler Syntax Source Line 7.4.3.7 Indexed, 9-Bit Offset This addressing mode adds a 9-bit signed offset to the base index register to form the memory address, which is referenced in the instruction. The valid range for a 9-bit signed offset is [–256...255]. The base index register may be X, Y, SP, PC, or PCR. For information about indexed PC and indexed PC relative addressing modes, see 7.4.3.16 Indexed PC versus Indexed PC Relative Addressing Mode.
Assembler Syntax 7.4.3.8 Indexed, 16-Bit Offset This addressing mode adds a 16-bit offset to the base index register to form the memory address, which is referenced in the instruction. The 16-bit offset may be considered signed or unsigned ($FFFF may be considered to be –1 or 65,535). The base index register may be X, Y, SP, PC, or PCR. For information about indexed PC and indexed PC relative addressing modes, see 7.4.3.16 Indexed PC versus Indexed PC Relative Addressing Mode.
Assembler Syntax Source Line 7.4.3.9 Indexed, Indirect 16-Bit Offset This addressing mode adds a 16-bit offset to the base index register to form the address of a memory location containing a pointer to the memory location referenced in the instruction. The 16-bit offset may be considered either as signed or unsigned ($FFFF may be considered to be –1 or 65,535). The base index register may be X, Y, SP, PC, or PCR. For information about indexed PC and indexed PC relative addressing modes, see 7.4.3.
Assembler Syntax 7.4.3.10 Indexed, Pre-Decrement This addressing mode allows the user to decrement the base register by a specified value before indexing takes place. The base register is decremented by the specified value and the content of the modified base register is referenced in the instruction. The valid range for a pre-decrement value is [1...8]. The base index register may be X, Y, or SP. Example: CST_TBL: END_TBL: main: ORG $1000 DC.B $5, $10, $18, $20, $28, $30 DC.
Assembler Syntax Source Line 7.4.3.11 Indexed, Pre-Increment This addressing mode allows the user to increment the base register by a specified value before indexing takes place. The base register is incremented by the specified value and the content of the modified base register is referenced in the instruction. The valid range for a pre-increment value is [1...8]. The base index register may be X, Y, or SP. Example: CST_TBL: END_TBL: main: ORG $1000 DC.B $5, $10, $18, $20, $28, $30 DC.
Assembler Syntax 7.4.3.12 Indexed, Post-Decrement This addressing mode allows the user to decrement the base register by a specified value after indexing takes place. The content of the base register is read and then decremented by the specified value. Valid range for a pre-decrement value is [1...8]. The base index register may be X, Y, or SP. Example: CST_TBL: END_TBL: main: ORG $1000 DC.B $5, $10, $18, $20, $28, $30 DC.
Assembler Syntax Source Line 7.4.3.13 Indexed, Post-Increment This addressing mode allows the user to increment the base register by a specified value after indexing takes place. The content of the base register is read and then incremented by the specified value. The valid range for a pre-increment value is [1...8]. The base index register may be X, Y, or SP. Example: CST_TBL: END_TBL: main: ORG $1000 DC.B $5, $10, $18, $20, $28, $30 DC.
Assembler Syntax 7.4.3.14 Indexed, Accumulator Offset This addressing mode adds the value in the specified accumulator to the base index register to form the address, which is referenced in the instruction. The base index register may be X, Y, SP, or PC. The accumulator may be A, B, or D. Example: main: LDAB #$20 LDX #$600 LDAA B,X LDY #$1000 STAA $140, Y The value stored in B ($20) is added to the value of X ($600) to form a memory address ($620). The value stored at $620 is loaded in accumulator A.
Assembler Syntax Source Line 7.4.3.15 Indexed-Indirect, D Accumulator Offset This addressing mode adds the value in D to the base index register. This forms the memory address containing a pointer to the memory location referenced in the instruction. The base index register may be X, Y, SP, or PC. Example: entry1: entry2: entry3: NOP NOP NOP NOP NOP NOP main: goto1: goto2: goto3: LDD JMP DC.W DC.W DC.W #2 [D, PC] entry1 entry2 entry3 This example represents a jump table.
Assembler Syntax 7.4.3.16 Indexed PC versus Indexed PC Relative Addressing Mode When using the indexed addressing mode with PC as the base register, the macro assembler allows use of either indexed PC (, PC) or indexed PC relative (, PCR) notation. When indexed PC notation is used, the offset specified is inserted directly in the opcode. Example: main: LDAB DC.B 3, PC $20, $30, $40, $50 In the previous example, register B is loaded with the value stored at address PC + 3 ($50).
Assembler Syntax Symbols Inside a relocatable section, expressions specified in an indexed PC relative addressing mode may be: • A label defined in any absolute section • A label defined in any relocatable section • An external label, defined in an XREF directive 7.4.4 Comment Field The last field in a source statement is an optional comment field. A semicolon (;) is the first character in the comment field. Example: NOP ; Comment following an instruction 7.
Assembler Syntax Symbols can be defined relocatable in the label field of an instruction or data definition source line. In the next example, labelx is used to represent a symbol. Sec: SECTION label1: DC.B 2 ; label1 is assigned offset 0 within Section label2: DC.B 5 ; label2 is assigned offset 2 within Section label3: DC.B 1 ; label3 is assigned offset 7 within Section Figure 7-1.
Assembler Syntax Constants 7.5.3 Undefined Symbols If a label is neither defined in the source file nor declared external using XREF or XREFB, the assembler considers it to be undefined and generates an error. codeSec: SECTION entry: NOP BNE entry NOP JMP end JMP label <- Undeclared user defined symbol : label end: RTS END Figure 7-4. Undefined Symbol Example 7.5.4 Reserved Symbols Reserved symbols cannot be used for user-defined symbols. Register names are reserved identifiers.
Assembler Syntax 7.6.1 Integer Constants The assembler supports four representations of integer constants: • A decimal constant is defined by a sequence of decimal digits (0–9). Example: 5, 512, 1024 • A hexadecimal constant is defined by a dollar character ($) followed by a sequence of hexadecimal digits (0–9, a–f, A–F). Example: $5, $200, $400 • An octal constant is defined by the at character (@) followed by a sequence of octal digits (0–7).
Assembler Syntax Operators 7.7 Operators The following subsections describe the operators used in expressions that are recognized by the assembler. 7.7.1 Addition and Subtraction Operators (Binary) Syntax: Addition: + Subtraction: – Description: The + (plus) operator adds two operands, whereas the – (minus) operator subtracts them. The operands can be any expression evaluating to an absolute or relocatable expression.
Assembler Syntax 7.7.3 Sign Operators (Unary) Syntax: Plus: + Minus: – Description: The + (plus) operator does not change the operand, whereas the – (minus) operator changes the operand to its two’s complement. These operators are only valid for absolute expression operands. Example: +$32 –$32 ; ( = $32) ; ( = $CE = –$32) 7.7.
Assembler Syntax Operators 7.7.5 Bitwise Operators (Binary) Syntax: Bitwise AND: Bitwise OR: & | Bitwise XOR: Description: ^ The & (ampersand) operator performs an AND between the two operands at the bit level. The | (vertical bar) operator performs an OR between the two operands at the bit level. The ^ (caret) operator performs an XOR between the two operands at the bit level.
Assembler Syntax 7.7.7 Logical Operators (Unary) Syntax: Logical NOT: ! Description: The ! (exclamation point) operator returns 1 (true) if the operand is 0; otherwise, it returns 0 (false). The operand can be any expression evaluating to an absolute expression. Example: !(8<5) ; = $1 (TRUE) 7.7.
Assembler Syntax Operators 7.7.9 Memory PAGE Operator (Unary) Syntax: Get allocation page: PAGE() Description: The PAGE operator returns the page number where the operand is allocated. For a value coded on four bytes, the PAGE operator returns the content of bits 23 to 16 of the value. The operand can be any expression evaluating to an absolute or relocatable expression.
Assembler Syntax The > (greater than) operator may be useful to force the 16-bit immediate, indexed, or extended addressing mode for an instruction. The operand can be any expression evaluating to an absolute or relocatable expression. Example: label label.W ; ; ; ; label label label label is is is is an 8-bit an 8-bit a 16-bit a 16-bit address address address address Operator precedence follows the rules for ANSI C operators. See Table 7-3. Table 7-3.
Assembler Syntax Expressions Table 7-3. Operator Precedence (Continued) Operator Description Associativity < <= > >= Less than Less or equal to Greater than Greater or equal to Left to right =, == !=, <> Equal to Not Equal to Left to right & Bitwise AND Left to right ^ Bitwise exclusive OR Left to right | Bitwise OR Left to right 7.8 Expressions An expression is composed of one or more symbols or constants, which are combined with unary or binary operators.
Assembler Syntax All valid user-defined symbols representing memory locations are simple relocatable expressions. This includes labels specified in XREF directives, which are assumed to be relocatable symbols. 7.8.1 Absolute Expressions Expressions involving constants, known as absolute labels, or expressions are absolute expressions. An expression containing an operation between an absolute expression and a constant value is also an absolute expression.
Assembler Syntax Expressions 7.8.2 Simple Relocatable Expression A simple relocatable expression results from an operation such as the one shown here: • + • – • + < relocatable expression> Example: XREF XtrnLabel DataSec: SECTION tabBegin: DS.B 5 tabEnd: DS.
Assembler Syntax Table 7-5 describes the type of expression according to left and right operands in a binary operation. Table 7-5.
User’s Manual — MCUez HC12 Assembler Section 8. Assembler Directives 8.1 Contents 8.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.2.7 8.2.8 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Section Definition Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Constant Definition Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Data Allocation Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assembler Directives 8.17 IF — Conditional Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 8.18 IFCC — Conditional Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8.19 INCLUDE — Include Text from Another File. . . . . . . . . . . . . . . . . 185 8.20 LIST — Enable Listing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 8.21 LLEN — Set Line Length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8.
Assembler Directives Introduction 8.2 Introduction This chapter introduces assembler directives. Functional descriptions and examples for each directive are provided. The following tables give an overview of the different directives. 8.2.1 Section Definition Directives The directives in Table 8-1 define new sections. Table 8-1. Section Directives Directive Description ORG Defines an absolute section SECTION Defines a relocatable section OFFSET Defines an offset section 8.2.
Assembler Directives 8.2.4 Symbol Linkage Directives The directives in Table 8-4 export or import global symbols. Table 8-4. Symbol Linkage Directives Directive Description ABSENTRY Specifies the application entry point when an absolute file is generated XDEF Makes a symbol public, visible from outside XREF Imports reference to an external symbol XREFB Imports reference to an external symbol located on the direct page 8.2.
Assembler Directives Introduction 8.2.6 Listing File Control Directives The directives in Table 8-6 control generation of the assembler listing file. Table 8-6.
Assembler Directives 8.2.8 Conditional Assembly Directives The directives in Table 8-8 are used for conditional assembling. Table 8-8. Conditional Assembly Directives Directive Description ELSE Alternate of conditional block ENDIF End of conditional block IF Start of conditional block. A Boolean expression follows this directive.
Assembler Directives ABSENTRY — Application Entry Point 8.3 ABSENTRY — Application Entry Point Syntax: ABSENTRY Description: This directive specifies the application entry point in a directly generated absolute file (the option -FA2 ELF/DWARF 2.0 absolute file must be enabled). Using this directive, the entry point is written in the ELF header of the generated absolute file.
Assembler Directives 8.4 ALIGN — Align Location Counter Syntax: ALIGN Description: This directive forces the next instruction to a boundary that is a multiple of , relative to the start of the section. The value of must be a positive number between 1 and 32,767. The ALIGN directive can force alignment to any size. The filling bytes inserted for alignment purposes are initialized with \0. ALIGN can be used in code or data sections.
Assembler Directives BASE — Set Number Base 8.5 BASE — Set Number Base Syntax: BASE Description: This directive sets the default number base for constants to . The operand may be prefixed to indicate its number base; otherwise, the operand is considered to be in the current default base. Valid values of are 2, 8, 10, and 16. Unless a default base is specified using the BASE directive, the default number base is decimal.
Assembler Directives 8.6 CLIST — List Conditional Assembly Syntax: CLIST [ON | OFF] Description: The CLIST directive controls the listing of subsequent conditional assembly blocks. It precedes the first directive of the conditional assembly block to which it applies and remains effective until the next CLIST directive is read. When ON is specified with the CLIST directive, the listing file includes all directives and instructions in the conditional assembly block, even those that do not generate code.
Assembler Directives CLIST — List Conditional Assembly Example: Listing file with CLIST ON: When assembling the code: CLIST ON Try:EQU 0 IFEQ Try LDD #1023 ELSE LDD #0 ENDIF The corresponding listing file is: 37 B5 03 FF Try:EQU 0 IFEQ LDD ELSE ADD ENDIF MCUez HC12 Assembler MOTOROLA Try #1023 #0 User’s Manual Assembler Directives 169
Assembler Directives 8.7 DC — Define Constant Syntax: [:] DC [] [, ]... where = B (default), W, or L. Description: The DC directive defines constants in memory. It can have one or more operands, which are separated by commas. The can contain an actual value (binary, octal, decimal, hexadecimal, or ASCII).
Assembler Directives DC — Define Constant Example for DC.L: 000000 000004 000008 00000C 000010 000014 000018 0000 4243 0000 0000 0000 0000 xxxx 0041 4445 000A 000A 0001 000A xxxx Label: DC.L "ABCDE" DC.L %1010, @12, 1, $A DC.L Label If the value in an operand expression exceeds the size of the operand, the value is truncated and a warning message is generated.
Assembler Directives 8.8 DCB — Define Constant Block Syntax: [:] DCB [] , where = B (default), W, or L Description: The DCB directive causes the assembler to allocate a memory block initialized with the specified . The length of the block is * . may not contain undefined, forward, or external references. It may range from 1 to 4096.
Assembler Directives DS — Define Space 8.9 DS — Define Space Syntax: [:] DS [.] where = B (default), W, or L Description: The DS directive is used to reserve memory for variables. The content of the reserved memory is not initialized. The length of the block is * . may not contain undefined, forward, or external references. It may range from 1 to 4096. Example: Counter: DS.B DS.B 2 2 DS.
Assembler Directives 8.10 ELSE — Conditional Assembly Syntax: IF [] [ELSE] [] ENDIF Description: If is true, the statements between IF and the corresponding ELSE directive generate code. If is false, the statements between ELSE and the corresponding ENDIF directive generate code. Nesting of conditional blocks is allowed. The maximum level of nesting is limited by the available memory at assembly time.
Assembler Directives END — End Assembly 8.11 END — End Assembly Syntax: END Description: The END directive indicates the end of the source code. Subsequent source statements in this file are ignored. An END directive in included files causes subsequent source statements in the include file to be skipped.
Assembler Directives 8.12 ENDIF — End Conditional Assembly Syntax: ENDIF Description: The ENDIF directive indicates the end of a conditional block. Nesting of conditional blocks is allowed. The maximum level of nesting is limited by the available memory at assembly time. Example: See an example of directive IF in 8.17 IF — Conditional Assembly. 8.13 ENDM — End Macro Definition Syntax: ENDM Description: The ENDM directive terminates both the macro definition and macro expansion.
Assembler Directives EQU — Equate Symbol Value 8.14 EQU — Equate Symbol Value Syntax: : EQU Description: The EQU directive assigns the value of the in the operand field to . The and fields are both required, and the cannot be defined anywhere else in the program. The cannot include a symbol that is undefined or not yet defined. The EQU directive does not allow forward references.
Assembler Directives 8.15 EVEN — Force Word Alignment Syntax: EVEN Description: This directive forces the next instruction to the next even address relative to the start of the section. EVEN is an abbreviation for ALIGN 2. Some processors require word and longword operations to begin at even address boundaries. In such cases, the use of the EVEN directive ensures correct alignment. Omission of the directive can result in an error message. Example: 6 7 8 9 10 12 6 000000 ; location count ; inserted.
Assembler Directives FAIL — Generate Error Message 8.16 FAIL — Generate Error Message Syntax: FAIL | Description: FAIL directive operation depends on the operand specified. If is in the range [500–$FFFFFFFF], the assembler generates a warning message, including the line number and argument of the directive.
Assembler Directives The following code segment: cpChar: MACRO IFC "\1", "" FAIL 200 MEXIT ELSE LDD \1 ENDIF IFC "\2", "" FAIL 600 ELSE STD \2 ENDIF ENDM codeSec: SECTION Start: cpChar , char2 Generates this error message: >> in "Y:\DEMO\HC12A\cbe.asm",line 7,col 19, pos 112 IFC "\1", "" FAIL 200 ^ ERROR A2329: FAIL found If a string is supplied as the operand, the assembler generates an error message, including the line number and . The assembler does not generate an object file.
Assembler Directives FAIL — Generate Error Message Example: The following code segment: cpChar: MACRO IFC "\1", "" FAIL "A character must be specified as first parameter" MEXIT ELSE LDD \1 ENDIF IFC "\2", "" FAIL 600 ELSE STD \2 ENDIF ENDM codeSec: SECTION Start: cpChar , char2 Generates this error message: >> in "Y:\DEMO\HC12A\cbe.
Assembler Directives 8.17 IF — Conditional Assembly Syntax: IF [] [ELSE] [] ENDIF Description: If is true, the statements immediately following the IF directive generate code. Assembly continues until the corresponding ELSE or ENDIF directive is reached. Then all statements until the corresponding ENDIF directive are ignored. Nesting of conditional blocks is allowed.
Assembler Directives IFCC — Conditional Assembly 8.18 IFCC — Conditional Assembly Syntax: IFCC [] [ELSE] [] ENDIF Description: These directives can be replaced by the IF directive. If IFCC is true, the statements immediately following the IFCC directive are assembled. Assembly continues until the corresponding ELSE or ENDIF directive is reached, after which assembly moves to the statements following the ENDIF directive.
Assembler Directives Example: The following is an example of using conditional assembly directives: Try: EQU 0 IFNE Try LDD #1023 ELSE LDD #0 ENDIF The value of TRY determines the instruction to be assembled in the program. As shown, the LDD #0 instruction generates code. Changing the directive to IFEQ causes the LDD #1023 instruction to generate code instead.
Assembler Directives INCLUDE — Include Text from Another File 8.19 INCLUDE — Include Text from Another File Syntax: INCLUDE Description: This directive causes the included file to be inserted in the source input stream. The is not case sensitive and must be enclosed in quotation marks. The assembler attempts to open relative to the current working directory.
Assembler Directives 8.20 LIST — Enable Listing Syntax: LIST Description: Specifies that the following instructions must be inserted in the listing and debug files. The listing file is only generated if the option -L is specified on the command line. The source text following the LIST directive is listed until a NOLIST or an END is reached. This directive is not written to the listing and debug file.
Assembler Directives LLEN — Set Line Length 8.21 LLEN — Set Line Length Syntax: LLEN Description: Sets the number of characters, , from the source line that are included on the listing line. The values allowed for are in the range [0 – 132]. If a value smaller than 0 is specified, the line length is set to 0. If a value bigger than 132 is specified, the line length is set to 132. Lines of the source file that exceed the specified number of characters are truncated in the listing file.
Assembler Directives 8.22 LONGEVEN — Forcing Longword Alignment Syntax: LONGEVEN Description: This directive forces the next instruction to the next long-word address relative to the start of the section. LONGEVEN is an abbreviation for ALIGN 4. Example: 2 2 3 4 3 4 5 6 7 8 9 5 6 7 8 9 10 11 10 11 000000 01 dcb.b 1,1 ; location counter is not a multiple of 4, filling bytes are ; required. 000001 0000 00 longeven 000004 0002 0002 dcb.
Assembler Directives MACRO — Begin Macro Definition 8.23 MACRO — Begin Macro Definition Syntax: : MACRO Description: The of the MACRO directive is the name by which the macro is called. This name must not be a processor machine instruction or assembler directive name. For more information on macros, refer to Section 9. Macros.
Assembler Directives 8.24 MEXIT — Terminate Macro Expansion Syntax: MEXIT Description: MEXIT is usually used together with conditional assembly within a macro. In that case, macro expansion might terminate prior to terminating the macro definition. The MEXIT directive causes macro expansion to skip any remaining source lines ahead of the ENDM directive.
Assembler Directives MLIST — List Macro Expansions 8.25 MLIST — List Macro Expansions Syntax: MLIST [ON | OFF] Description: When the ON keyword is entered with an MLIST directive, the assembler includes the macro expansions in the listing and debug files. When the OFF keyword is entered, macro expansions are omitted from the listing and debug files. This directive is not written to the listing and debug files, and the default value is ON.
Assembler Directives 8.26 NOLIST — Disable Listing Syntax: NOLIST Description: Suppresses printing of the following instructions in the assembly listing and debug files until a LIST directive is reached.
Assembler Directives NOPAGE — Disable Paging 8.27 NOPAGE — Disable Paging Syntax: NOPAGE Description: Disables pagination in the listing file. Program lines are listed continuously without headings or top or bottom margins. 8.28 ORG — Set Location Counter Syntax: ORG Description: The ORG directive sets the location counter to the value specified by . Subsequent statements are assigned memory locations starting with the new location counter value.
Assembler Directives 8.29 OFFSET — Create Absolute Symbols Syntax: OFFSET Description: The OFFSET directive declares an offset section and initializes the location counter to the value specified in . The must be absolute and may not contain references to external, undefined, or forward defined labels. The OFFSET section is useful to simulate data structure or a stack frame.
Assembler Directives OFFSET — Create Absolute Symbols Example: 7 8 9 10 11 12 13 14 15 16 17 7 8 9 10 11 12 13 14 15 16 17 000000 11 000001 11 ConstSec: SECTION cst1: DC.B $11 cst2: DC.B $13 000000 000001 000003 0000 0007 ID: COUNT: VALUE: SIZE: OFFSET DS.B DS.W DS.L EQU * 0 1 1 1 000002 22 cst3: DC.B $22 In the previous example, the symbol cst3, defined after the OFFSET directive, defines a constant byte value.
Assembler Directives 8.30 PAGE — Insert Page Break Syntax: PAGE Description: Inserts a page break in the assembly listing Example: The following portion of code: codeSec: SECTION nop nop page nop nop Generates this listing file: Motorola HC12-Assembler (c) COPYRIGHT MOTOROLA 1991-1997 Abs. ---1 3 4 Rel. ---1 3 4 Loc. Obj. code ------ --------000000 A7 000001 A7 Source line ----------codeSec: SECTION nop nop Motorola HC12-Assembler (c) COPYRIGHT MOTOROLA 1991-1997 Abs. ---6 7 Rel. ---6 7 Loc.
Assembler Directives PLEN — Set Page Length 8.31 PLEN — Set Page Length Syntax: PLEN Description: Sets the page length to lines. may range from 10 to 10,000. If the number of lines already listed on the current page is greater than or equal to , listing will continue on the next page with the new page length setting. The default page length is 65 lines. 8.
Assembler Directives Example: 2 3 4 5 6 7 8 9 The following example demonstrates the definition of a section aaa, which is split into two blocks, with section bbb between them. The location counter associated with label zz is 1, because a NOP instruction was already defined in this section at label xx.
Assembler Directives SET — Set Symbol Value 8.33 SET — Set Symbol Value Syntax: : SET Description: Similar to the EQU directive, the SET directive assigns the value of the in the operand field to the symbol in the field. The cannot include a symbol that is undefined or not yet defined. The is an assembly time constant; SET does not generate machine code. The value is temporary; a subsequent SET directive can redefine it.
Assembler Directives 8.34 SPC — Insert Blank Lines Syntax: SPC Description: Inserts blank lines in the assembly listing. may range from 0 to 65. This has the same effect as writing that number of blank lines in the assembly source. A blank line is a line containing only a carriage return. 8.35 TABS — Set Tab Length Syntax: TABS Description: Sets tab length to spaces. The default tab length is eight. may range from 0 to 128. 8.
Assembler Directives XDEF — External Symbol Definition 8.37 XDEF — External Symbol Definition Syntax: XDEF [.] [,]... where = B, W (default), or L Description: This directive specifies labels defined in the current module that are to be passed to the linker as labels that can be referenced by other modules linked to the current module. The number of symbols listed in an XDEF directive is only limited by the memory available at assembly time.
Assembler Directives 8.38 XREF — External Symbol Reference Syntax: XREF [.] [,]... where = B, W (default), or L Description: This directive specifies symbols referenced in the current module but defined in another module. The list of symbols and corresponding 16-bit values are passed to the linker. The number of symbols listed in an XREF directive is only limited by the memory available at assembly time.
User’s Manual — MCUez HC12 Assembler Section 9. Macros 9.1 Contents 9.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.3 Macro Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.4 Defining a Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 9.5 Calling Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 9.
Macros statements generated by a macro call are inserted in the source file at the position where the macro is invoked. To call a macro, write the macro name in the operation field of a source statement. Place the arguments in the operand field. The macro may contain conditional assembly directives that cause the assembler to produce inline coding variations of the macro definition. Macro calls produce inline code to perform a predefined function.
Macros Calling Macros 9.5 Calling Macros The form of a macro call is: [:] [.] [ [,]...] Although a macro may be referenced by another macro prior to its definition in the source module, all macros must be defined before their first call. The name of the called macro must appear in the operation field of the source statement. Arguments are supplied in the operand field, separated by commas.
Macros Arguments in the operand field of the macro call refer to parameter designators \1 through \9 and \A through \Z, in that order. The argument list (operand field) of a macro call cannot be extended onto additional lines. At the time of a macro call, arguments from the macro call are substituted with parameter designators in the body of the macro as literal (string) substitutions.
Macros Macro Expansion This macro is called in the application: clear clear temporary data The two macro calls of clear are expanded this way: clear temporary LDX temporary LDAB #16 _00001LOOP:CLR 0,X INX DECB BNE _00001LOOP clear data LDX data LDAB #16 _00002LOOP:CLR 0,X INX DECB BNE _00002LOOP 9.8 Macro Expansion When the assembler reads a statement in a source program that calls a previously defined macro, it processes the call as described here. The symbol table is searched for the macro name.
Macros 9.9 Nested Macros Macro expansion is performed at invocation time, which is also the case for nested macros. If the macro definition contains a nested macro call, the nested macro expansion takes place inline. Recursive macro calls are also supported. A macro call is limited to the length of one line, for example, 1024 characters.
User’s Manual — MCUez HC12 Assembler Section 10. Assembler Listing File 10.1 Content 10.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 10.3 Page Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 10.4 Source Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 10.4.1 Absolute (Abs.) Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assembler Listing File 10.3 Page Header The page header consists of three lines: • The first line contains an optional user string defined in the directive TITLE. • The second line contains the name of the assembler vendor (MOTOROLA) as well as the target processor name (HCxx). • The third line contains a copyright notice. Example: Demo Application Motorola HC12-Assembler (c) COPYRIGHT MOTOROLA 1991-1997 10.4 Source Listing The following sections describe each column.
Assembler Listing File Source Listing 10.4.1 Absolute (Abs.) Listing This column contains the absolute line number for each instruction. The absolute line number is the line number in the DBG file, which contains all included files and where all macro calls have been expanded. Example: Abs. ---1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Rel. ---1 2 3 4 5 1i 2i 3i 4i 5i 6 7 8 2m 3m 9 10 Loc. ------ Obj. code Source line --------- ----------;---------------; File: test.o ;---------------INCLUDE "macro.
Assembler Listing File 10.4.2 Relative (Rel.) Listing This column contains the relative line number for each instruction. The relative line number is the line number in the source file. For included files, the relative line number is the line number in the included file. For macro call expansion, the relative line number is the line number of the instruction in the macro definition. An i suffix is appended to the relative line number, if the line comes from an included file.
Assembler Listing File Source Listing 10.4.3 Location (Loc.) Listing This column contains the address of the instruction. For absolute sections, the address is preceded by the letter a and contains the absolute address of the instruction. For relocatable sections, this address is the offset of the instruction from the beginning of the relocatable section. This address is a hexadecimal number coded on six digits.
Assembler Listing File 10.4.4 Object (Obj.) Code Listing This column contains the hexadecimal code of each instruction in hexadecimal format. This code is not identical to the code stored in the object file. The letter x is displayed at the position where the address of an external or relocatable label is expected. The address is determined at link time. Example: Abs. ---1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Rel. ---1 2 3 4 5 1i 2i 3i 4i 5i 6 7 8 2m 3m 9 10 Loc. Obj.
Assembler Listing File Source Listing 10.4.5 Source Line Listing This column contains the source statement. This is a copy of the source line from the source module. For lines resulting from a macro expansion, the source line is the expanded line where parameter substitution has been performed. Example: Abs. ---1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Rel. ---1 2 3 4 5 1i 2i 3i 4i 5i 6 7 8 2m 3m 9 10 Loc. Obj. code ------ --------- INCLUDE "macro.
Assembler Listing File User’s Manual 216 MCUez HC12 Assembler Assembler Listing File MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 11. Operating Procedures 11.1 Contents 11.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 11.2.1 Working with Absolute Sections . . . . . . . . . . . . . . . . . . . . . . . . . 218 11.2.2 Defining Absolute Sections in the Assembly Source File . . . . . . 218 11.2.3 Linking an Application Containing Absolute Sections . . . . . . . . 219 11.3 Working with Relocatable Sections . . . . . . . . . . . . . . .
Operating Procedures 11.2 Introduction This section provides operating procedures for the MCUez assembler. 11.2.1 Working with Absolute Sections An absolute section has its start address known at assembly time. (See modules fiboorg.asm and fiboorg.prm in the demo directory.) 11.2.2 Defining Absolute Sections in the Assembly Source File An absolute section is defined by the directive ORG.
Operating Procedures Introduction In the previous code, the instruction LDAA will be located at address $C00 and instruction ADDA at address $C03, as shown in this code listing.
Operating Procedures The minimal linker parameter file will look like this: LINK test.abs /* Name of the executable file generated. */ NAMES test.o /* Name of the object files in the application. */ END SEGMENTS /* READ_ONLY memory area. There should be no overlap between this memory area and the absolute sections defined in the assembly source file. */ MY_ROM = READ_ONLY 0x1000 TO 0x1FFF; /* READ_WRITE memory area.
Operating Procedures Working with Relocatable Sections 11.3 Working with Relocatable Sections A relocatable section is a section whereby the start address is determined at link time. See modules fibo.asm and fibo.prm in the demo directory. 11.3.1 Defining Relocatable Sections in the Assembly Source File A relocatable section is defined using the directive SECTION. Example: Defining a relocatable section containing data: constSec: SECTION ; Relocatable constant data section. cst1: DC.B $A6 cst2: DC.
Operating Procedures In the previous portion of code, the instruction LDAA will be located at offset 0 from the section codeSec start address, and instruction ADDA will be located at offset 3 from the codeSec start address.
Operating Procedures Working with Relocatable Sections The minimal linker parameter file will look like this: LINK test.abs /* Name of the executable file generated. */ NAMES test.o /* Name of the object files in the application. */ END SEGMENTS /* READ_ONLY memory area. */ MY_ROM = READ_ONLY 0x0B00 TO 0x0BFF; /* READ_WRITE memory area. */ MY_RAM = READ_WRITE 0x0800 TO 0x08FF; END PLACEMENT /* Relocatable variable sections are allocated in MY_RAM.
Operating Procedures 11.4 Initializing the Vector Table The vector table is initialized in the assembly source file or in the linker parameter file. Initializing it in the PRM file is recommended. 11.4.1 Initializing the Vector Table in the Linker PRM File Initializing the vector table from the PRM (parameter) file allows initialization of single entries in the table. The user can decide to initialize all the entries in the vector table or not.
Operating Procedures Initializing the Vector Table NOTE: The functions XIRQFunc, SWIFunc, and ResetFunc are published. This is required because they are referenced in the linker PRM file. All interrupt functions must be terminated with an RTI instruction. The vector table is initialized using the linker command VECTOR ADDRESS. Example: LINK test.abs NAMES test.o END SEGMENTS MY_ROM = READ_ONLY 0x0800 TO 0x08FF; MY_RAM = READ_WRITE 0x0B00 TO 0x0CFF; END PLACEMENT .data INTO MY_RAM; .
Operating Procedures Example: XDEF ResetFunc DataSec: SECTION Data:DS.
Operating Procedures Initializing the Vector Table NOTE: Each constant in the section VectorTable is defined as a word (2-byte constant) because the entries in the HC12 vector table are 16 bits wide. In the previous example, the constant XIRQInt is initialized with the address of the label XIRQFunc. The constant COPResetInt is initialized with the address of the label DummyFunc because this interrupt is not in use.
Operating Procedures NOTE: The statement Vector = READ_ONLY 0xFFF2 TO 0xFFFF defines the memory range for the vector table. The statement VectorTable INTO Vector specifies that the vector table should be loaded in the read-only memory area vector. This means the constant IRQInt will be allocated at address 0xFFF2, the constant XIRQInt will be allocated at address 0xFFF4, and so on. The constant ResetInt will be allocated at address 0xFFFE. The statement ENTRIES * END switches smart linking OFF.
Operating Procedures Initializing the Vector Table Example: XDEF ResetFunc DataSec: SECTION Data: DS.
Operating Procedures NOTE: Each constant in the section VectorTable is defined as a word (2-byte constant, because the entry in the HC12 vector table is 16 bits wide. In the previous example, the constant IRQInt is initialized with the address of the label IRQFunc, the constant COPResetInt is initialized with the address of the label DummyFunc, etc. Labels specified as initialization values must be defined, published (using XDEF) or imported (using XREF) before the vector table section.
Operating Procedures Splitting an Application into Different Modules 11.5 Splitting an Application into Different Modules A complex application or application involving several programmers can be split into several simple modules. In order to avoid any problem when merging different modules, adhere to the following. For each assembly source file, one include file must be created containing the definition of the symbols exported from this module.
Operating Procedures Each assembly module using a symbol defined in another assembly file should include the corresponding include file. Example of assembly file (Test2.asm): XDEF entry INCLUDE “Test1.inc” initStack: EQU $AFE CodeSec: entry: SECTION LDS #initStack LDD #$7 JSR AddSource BRA entry The application PRM file must list both object files used to build the application.
Operating Procedures Using Direct Addressing Mode to Access Symbols NOTE: The statement NAMES test1.o test2.o END lists the two object files building the application. A space character separates the object filenames. The section CodeSec is defined in both object files. In test1.o, the section CodeSec contains the symbol AddSource. In test2.o, the section CodeSec contains the symbol entry.
Operating Procedures 11.6.3 Defining Symbols in the Direct Page Symbols that are defined in the predefined section BSCT are always accessed using the direct addressing mode. Example: … BSCT DirLabel: DS.B 3 dataSec: SECTION ExtLabel: DS.B 5 … codeSec: SECTION … LDD DirLabel ; Direct addressing mode is used … LDD ExtLabel ; Extended addressing mode is used 11.6.4 Using a Force Operator A force operator can be specified in an assembly instruction to force direct or extended addressing mode.
Operating Procedures Directly Generating an .abs File 11.6.5 Using SHORT Sections Symbols defined in a section with the qualifier SHORT are always accessed using the direct addressing mode. Example: …… shortSec:SECTION SHORT DirLabel: DS.B 3 dataSec: SECTION ExtLabel: DS.B 5 … codeSec: SECTION … LDD DirLabel ; Direct addressing mode is used. … LDD ExtLabel ; Extended addressing mode is used. 11.7 Directly Generating an .abs File The MCUez assembler generates an .
Operating Procedures 11.7.1 Assembler Source File When an .abs file is generated using the assembler (no linker), the application must be implemented in a single assembly unit and contain only absolute sections. This is shown in this code example. Example: ABSENTRY entry ; ; iniStk: EQU $AFE ; ORG $FFFE ; Reset: DC.W entry ORG $40 ; var1: DC.B 5 ; ORG $80 ; data: DS.
Operating Procedures Directly Generating an .abs File When writing an assembly source file for direct absolute file generation, pay special attention to these points: • The directive ABSENTRY is used to write the entry point address in the generated absolute file. To set the entry point of the application to the label entry in the absolute file, this code is needed: ABSENTRY entry • The reset vector must be initialized in the assembly source file, specifying the application entry point.
Operating Procedures 11.7.2 Assembling and Generating the Application Once the source file is available, it can be assembled. 1. Start the macro assembler by clicking the eZASM icon in the MCUez Shell toolbar. The assembler is started as shown in Figure 11-1. Enter the name of the file to be assembled in the editable combo box, for example, abstest.asm. Figure 11-1.
Operating Procedures Directly Generating an .abs File 2. Select the menu entry Assembler | Options. The Options Settings dialog is displayed, as shown in Figure 11-2. . Figure 11-2.
Operating Procedures 3. In the Output folder, select the check box in front of the label Object File Format. More information is displayed at the bottom of the dialog, as shown in Figure 11-3. Figure 11-3.
Operating Procedures Directly Generating an .abs File 4. Select the radio button ELF/DWARF 2.0 Absolute File and click OK. The assembler is now ready to generate an absolute file. Click on the Assemble button to assemble the file. The assembly process is shown in Figure 11-4. Figure 11-4. Generating an .abs File The generated absolute file (.abs ) is used with the target board or emulator. This file can be downloaded directly to the HC08 target.
Operating Procedures User’s Manual 242 MCUez HC12 Assembler Operating Procedures MOTOROLA
User’s Manual — MCUez HC12 Assembler Section 12. Assembler Messages 12.1 Contents 12.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 12.2.1 Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 12.2.2 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 12.2.3 Fatal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assembler Messages 12.3.23 12.3.24 12.3.25 12.3.26 12.3.27 12.3.28 12.3.29 12.3.30 12.3.31 12.3.32 12.3.33 12.3.34 12.3.35 12.3.36 12.3.37 12.3.38 12.3.39 12.3.40 12.3.41 12.3.42 12.3.43 12.3.44 12.3.45 12.3.46 12.3.47 12.3.48 12.3.49 12.3.50 12.3.51 12.3.52 12.3.53 12.3.54 12.3.55 12.3.56 12.3.57 12.3.58 A2313: Nesting of Include Files Exceeds 50. . . . . . . . . . . . . . . . 265 A2314: Expression Must Be Absolute. . . . . . . . . . . . . . . . . . . . . 265 A2316: Section Name Required . . . . . . . . .
Assembler Messages Introduction 12.3.59 12.3.60 12.3.61 12.3.62 12.3.63 12.3.64 12.3.65 12.3.66 12.3.67 12.3.68 12.3.69 12.3.70 A12109: Illegal Character at the End of Line . . . . . . . . . . . . . . . 298 A12110: No Operand Expected . . . . . . . . . . . . . . . . . . . . . . . . . . 299 A12201: Lexical Error in First or Second Field . . . . . . . . . . . . . 300 A12202: Not an HC12 Instruction or Directive. . . . . . . . . . . . . .
Assembler Messages 12.2.3 Fatal A message will be printed and assembly will be aborted. A fatal message indicates a severe error that will stop the assembly process. 12.3 Message Codes If the assembler prints out a message, the message contains a message code (A for assembler) and a 4- to 5-digit number. This number may be used to search for the indicated message in the manual. All messages generated by the assembler are documented in increasing order for easy and fast retrieval.
Assembler Messages Message Codes 12.3.1 A1000: Conditional Directive not Closed Type: Error Description: One of the conditional blocks is not closed. A conditional block can be opened using one of these directives: IF, IFEQ, IFNE, IFLT, IFLE, IFGT, IFGE, IFC, IFNC, IFDEF, IFNDEF Example: IFEQ (defineConst) const1: DC.B 1 const2: DC.B 2 Tip: Close the conditional block with an ENDIF or ENDC directive. Example: IFEQ (defineConst) const1: DC.B 1 const2: DC.
Assembler Messages 12.3.2 A1001: Conditional Else not Allowed Here Type: Error Description: A second ELSE directive is detected in a conditional block. Example: IFEQ (defineConst) ... ELSE ... ELSE ... ENDIF Tip: Remove the superfluous ELSE directive. Example: IFEQ (defineConst) ... ELSE ...
Assembler Messages Message Codes 12.3.3 A1051: Zero Division in Expression Type: Error Description: A zero division is detected in an expression. Example: label: EQU 0; label2: EQU $5000 ... LDX #(label2/label) Tip: Modify the expression or specify it in a conditional assembly block. Example: label: EQU 0; label2: EQU $5000 ... IFNE (label) LDX #(label2/label) ELSE LDX #label2 ENDIF 12.3.
Assembler Messages 12.3.5 A1053: Left Parenthesis Expected Type: Error Description: A left parenthesis is missing in an expression containing a reference to the page (bank) where an object is allocated. Example: MyData: SECTION variable: DS.B 1 label3: EQU PAGE variable) Tip: Insert the left parenthesis at the correct position. Example: MyData: SECTION variable: DS.
Assembler Messages Message Codes 12.3.6 A1054: References on Non-Absolute Objects Are not Allowed When Options -FA1 or -FA2 Are Enabled Type: Error Description: A reference to a relocatable object has been detected during generation of an absolute file by the assembler. Example: XREF extData DataSec: SECTION data1: DS.
Assembler Messages 12.3.7 A1101: Illegal Label: Label is Reserved Type: Error Description: A reserved identifier is used as a label. Reserved identifiers are: • Mnemonics associated with target processor registers are A, B, CCR, D, PC, SP, TEMP2, TEMP3, X, Y. • Mnemonics associated with special target processor operator are PAGE. Example: A: Tip: NOP NOP RTS Modify the label name to an identifier that is not reserved.
Assembler Messages Message Codes 12.3.8 A1103: Illegal Redefinition of Label Type: Error Description: The label specified in front of a comment, assembly instruction, or directive is detected twice in a source file. Example: DataSec1: SECTION label1: DS.W 2 label2: DS.L 2 … CodeSec1: SECTION Entry: LDS #$4000 LDX #label1 CPX #$500 BNE label2 … label2: RTS Tip: Modify the label names so that labels are unique in each assembly file. Example: DataSec1: SECTION DataLab1: DS.W 2 DataLab2: DS.
Assembler Messages 12.3.9 A1104: Undeclared User-Defined Symbol Type: Error Description: The label is referenced in the assembly file, but it is never defined. Example: Entry: LDX #56 STX #Variable RTS Tip: The label must be defined in the current assembly file or specified as an external label.
Assembler Messages Message Codes 12.3.10 A1201: Label Referenced in Directive ABSENTRY is not Defined in Code Segment Type: Error Description: The label specified in the directive ABSENTRY is an EQU label or is located in a data section. The label specified in ABSENTRY must be a valid label defined in a code section. Only labels defined in a code segment are allowed in the ABSENTRY directive.
Assembler Messages 12.3.11 A2301: Label is Missing Type: Error Description: A label is missing at the front of an assembly directive requiring a label: SECTION, EQU, and SET. Example: SECTION 4 … EQU $67 … SET $77 Tip: Insert a label in front of the directive. Example: codeSec: SECTION 4 … myConst: EQU $67 … mySetV: SET $77 12.3.12 A2302: Macro Name is Missing Type: Error Description: A label name is missing in front of a MACRO directive.
Assembler Messages Message Codes 12.3.13 A2303: ENDM is Illegal Type: Error Description: An ENDM directive is detected outside a macro. Example: AddM: MACRO LDD \1 ADD \2 STD \1 ENDM NOP AddM data1, data2 ENDM Tip: Remove the superfluous ENDM directive.
Assembler Messages 12.3.14 A2304: Macro Definition Within Definition Type: Error Description: A macro definition is detected inside another macro definition. The macro assembler does not support this. Example: AddM: MACRO AddX: MACRO LDX \1 INX STX \1 ENDM LDD \1 ADD \2 STD \1 ENDM Tip: Define the second macro outside the first one.
Assembler Messages Message Codes 12.3.15 A2305: Illegal Redefinition of Instruction or Directive Name Type: Error Description: An assembly directive or an HC12 instruction name has been used as a macro name. This is not allowed to avoid any ambiguity when the symbol name is encountered. The macro assembler cannot detect if the symbol refers to the macro or the instruction. Example: ADDD: MACRO LDD \1 ADD \2 STD \1 ENDM Tip: Change the name of the macro to an unused identifier.
Assembler Messages 12.3.16 A2306: Macro not Closed at End of Source Type: Error Description: An ENDM directive is missing at the end of a macro. The end of the input file is detected before the end of the macro. Example: AddM: MACRO LDD \1 ADD \2 STD \1 NOP AddM data1, data2 Tip: Insert the missing ENDM directive at the end of the macro.
Assembler Messages Message Codes 12.3.17 A2307: Macro Redefinition Type: Error Description: The input file contains the definition of two macros that have the same name. Example: AddM: MACRO LDX \1 INX STX \1 ENDM … AddM: MACRO LDD \1 ADD \2 STD \1 ENDM Tip: Change the name of one of the macros to generate unique identifiers.
Assembler Messages 12.3.18 A2308: Filename Expected Type: Error Description: A filename is expected in an INCLUDE directive. Example: xxx: EQU $56 … INCLUDE xxx Tip: Specify a filename after the include directive. Example: xxx: EQU $56 … INCLUDE “xxx.inc” 12.3.19 A2309: File not Found Type: Error Description: The macro assembler cannot locate a file that is specified in the INCLUDE directive. Tip: If the file exists, check if the directory is specified in the GENPATH environment variable.
Assembler Messages Message Codes 12.3.20 A2310: Illegal Size Character Type: Error Description: An invalid size specification character is detected in a DCB, DC, DS, FCC, FCB, FDB, RMB, XDEF, or XREF directive. For XDEF and XREF directives, valid size specification characters are: • .B for symbols located in a section where direct addressing mode can be used • .
Assembler Messages 12.3.21 A2311: Symbol Name Expected Type: Error Description: A symbol name is missing after an XDEF, XREF, IFDEF, or IFNDEF directive. Example: XDEF $5645 XREF ; This is a comment CodeSec: SECTION … IFDEF $5634 Tip: Insert a symbol name at the requested position. Example: XDEF exportedSymbol XREF importedSymbol; This is a comment CodeSec: SECTION … IFDEF changeBank 12.3.
Assembler Messages Message Codes 12.3.23 A2313: Nesting of Include Files Exceeds 50 Type: Error Description: The maximum number of nested include files has been exceeded. The assembler supports up to 50 nested include files. Tip: Reduce the number of nested include files to 50. 12.3.24 A2314: Expression Must Be Absolute Type: Error Description: An absolute expression is expected at the specified position.
Assembler Messages 12.3.25 A2316: Section Name Required Type: Error Description: A SWITCH directive is not followed by a symbol name. Absolute expressions or strings are not allowed in a SWITCH directive. The symbol specified in a SWITCH directive must refer to a previously defined section. Example: dataSec: SECTION label1: DS.B 1 … codeSec: SECTION … SWITCH $A344 … Tip: Specify the name of a previously defined section in the SWITCH instruction. Example: dataSec: SECTION label1: DS.
Assembler Messages Message Codes 12.3.26 A2317: Illegal Redefinition of Section Name Type: Error Description: The name associated with a section was previously used as a label in a code or data section or is specified in an XDEF directive. The macro assembler does not allow a section name to be exported or to use the same name for a section and a label. Example: dataSec: SECTION secLabel: DS.W 3 … secLabel: SECTION LDD secLabel … Tip: Change section name to a unique identifier.
Assembler Messages 12.3.27 A2318: Section not Declared Type: Error Description: The label specified in a SWITCH directive is not associated with a section. Example: dataSec: SECTION label1: DS.B 1 … codeSec: SECTION … SWITCH daatSec … Tip: Specify the name of a previously defined section in the SWITCH instruction. Example: dataSec: SECTION label1: DS.
Assembler Messages Message Codes 12.3.28 A2320: Value too Small Type: Error Description: The absolute expression specified in a directive is too small. This message can be generated if: • The expression specified in an ALIGN, DCB, or DS directive is smaller than 1. • The expression specified in a PLEN directive is smaller than 10. A header is generated on the top of each page from the listing file. This header contains at least six lines. So a page length smaller than 10 lines is not feasible.
Assembler Messages 12.3.29 A2321: Value too Big Type: Error Description: The absolute expression specified in a directive is too big. This message can be generated in the following cases: • The expression specified in an ALIGN directive is bigger than 32,767. • The expression specified in a DS or DCB directive is bigger than 4096. • The expression specified in a PLEN directive is bigger than 10,000. • The expression specified in a LLEN directive is bigger than 132.
Assembler Messages Message Codes 12.3.30 A2323: Label is Ignored Type: Warning Description: A label is specified in front of a directive that does not accept a label. The macro assembler ignores such labels. These labels cannot be referenced anywhere in the application. Labels will be ignored in front of these directives: ELSE, ENDIF, END, ENDM, INCLUDE, CLIST, ALIST, FAIL, LIST, MEXIT, NOLIST, NOL, OFFSET, ORG, NOPAGE, PAGE, LLEN, PLEN, SPC, TABS, TITLE, TTL.
Assembler Messages 12.3.31 A2324: Illegal Base (2, 8, 10, 16) Type: Error Description: An invalid base number follows a BASE directive. Valid base numbers are 2, 8, 1, or 16. The expression specified in a BASE directive must be an absolute expression and must match one of the values listed here. Example: BASE 67 … dataSec: SECTION label: DS.B 8 … BASE label Tip: Specify a valid value in the BASE directive.
Assembler Messages Message Codes 12.3.32 A2325: Comma or Line End Expected Type: Error Description: An incorrect syntax has been detected in a DC, FCB, FDB, XDEF, PUBLIC, GLOBAL, XREF, or EXTERNAL directive. This error message is generated when the values listed in one of the directives are not terminated by an end of line character or when they are not separated by a comma (,) character. Example: XDEF XREF aa1 aa2 aa3 aa4 bb1, bb2, bb3, bb4 … dataSec: SECTION dataLab1: DC.
Assembler Messages 12.3.33 A2326: Label is Redefined Type: Error Description: A label redefinition has been detected. This message is issued when: • The label specified in front of a DC, DS, DCB, or FCC directive is already defined. • One of the label names listed in an XREF directive is already defined. • The label specified in front of an EQU directive is already defined. • The label specified in front of a SET directive is already defined and is not associated with another SET directive.
Assembler Messages Message Codes 12.3.34 A2327: ON or OFF Expected Type: Error Description: The syntax for an MLIST or CLIST directive is not correct. These directives expect a unique operand, which take the value ON or OFF. Example: CodeSec: SECTION … CLIST … Tip: Specify either ON or OFF after the MLIST or CLIST directive. Example: CodeSec: SECTION … CLIST ON … 12.3.
Assembler Messages 12.3.36 A2329: FAIL Found Type: Error Description: The FAIL directive followed by a number smaller than 500 has been detected in the source file. This is the normal behavior for the FAIL directive. The FAIL directive is intended for use with conditional assembly to detect a user-defined error or warning condition.
Assembler Messages Message Codes 12.3.37 A2330: String is not Allowed Type: Error Description: A string has been specified as the initial value in a DCB directive. The initial value for a constant block can be any byte, word, or long absolute expression as well as a simple relocatable expression. Example: CstSec: SECTION label: DCB.B 10, “aaaaa” … Tip: Specify the ASCII code associated with the characters in the string as the initial value. Example: CstSec: SECTION label: DCB.
Assembler Messages 12.3.38 A2332: FAIL Found Type: Warning Description: The FAIL directive followed by a number bigger than 500 has been detected in the source file. This is the normal behavior for the FAIL directive. The FAIL directive is intended for use with conditional assembly to detect a user-defined error or warning condition.
Assembler Messages Message Codes 12.3.39 A2333: Forward Reference not Allowed Type: Error Description: A forward reference has been detected in an EQU instruction. This is not allowed. Example: CstSec: label: equLab: ... label2: … Tip: SECTION DCB.B 10, $61 EQU label2 DC.W $6754 Move the EQU after the definition of the label it refers to. Example: CstSec: label: ... label2: … equLab: SECTION DCB.B 10, $61 DC.
Assembler Messages 12.3.40 A2334:Only Labels Defined in the Current Assembly Unit Can Be Referenced in an EQU Expression Type: Error Description: One of the symbols specified in an EQU expression is an external symbol, which was previously specified in an XREF directive. This is not allowed due to a limitation in the ELF file format. Example: XREF label CstSec: SECTION lab: DC.B 6 ... equLabel: EQU label+6 ...
Assembler Messages Message Codes 12.3.41 A2335: Exported Absolute SET Label is not Supported Type: Error Description: A label specified in front of a SET directive was specified previously in an XDEF directive. This is not allowed. Example: XDEF setLabel CstSec: SECTION lab: DC.B 6 ... setLabel: SET $77AA ... Tip: SET labels can be defined in a special file which can be included in each assembly file where the labels are referenced. Example: File const.inc ... setLabel: SET $77AA ... File Test.
Assembler Messages 12.3.42 A2336: Value too Big Type: Warning Description: The absolute expression specified as the initialization value for a block, defined using DCB, is too big. This message is generated when the initial value specified in a DCB.B directive cannot be coded on a byte. In this case, the value used to initialize the constant block will be truncated to a byte value. Example: constSec: SECTION … label1: DCB.
Assembler Messages Message Codes 12.3.43 A2338: Type: Error Description: The FAIL directive followed by a string has been detected in the source file. This is the normal behavior for the FAIL directive. The FAIL directive is intended for use with conditional assembly to detect a user-defined error or warning condition.
Assembler Messages 12.3.44 A2341: Relocatable Section not Allowed: Absolute File is Currently Directly Generated Type: Error Description: A relocatable section has been detected while the assembler tries to generate an absolute file. This is not allowed. Example: DataSec: SECTION data1: DS.W 1 ORG $800 entry: LDX #data1 Tips: • When generating an absolute file, the application should be encoded in a single assembly unit and should not contain a relocatable symbol.
Assembler Messages Message Codes 12.3.45 A12001: Illegal Addressing Mode Type: Error Description: An illegal addressing mode has been detected in an instruction. This can be generated when an incorrect encoding is used for an addressing mode. Example: LDD [D X] LDD [D, X ANDCC $FA Tip: Use a valid notation for the addressing mode encoding.
Assembler Messages 12.3.46 A12002: Complex Relocatable Expression not Supported Type: Error Description: A complex relocatable expression has been detected. The expression is detected when it contains: • An operation between labels located in two different sections • A multiplication, division, or modulo operation between two labels • The addition of two labels located in the same section Example: DataSec1: SECTION DataLbl1: DS.B 10 DataSec2: SECTION DataLbl2: DS.
Assembler Messages Message Codes 12.3.47 A12003: Value is Truncated to One Byte Type: Warning Description: A word operand is specified in an assembly instruction expecting a byte operand. This warning may be generated in the following cases: • A symbol located in a section, which is accessed using the extended addressing mode, is specified as an operand in an instruction expecting a direct operand.
Assembler Messages 12.3.48 A12005: Value Must Be Between 1 and 8 Type: Error Description: The expression specified in a pre-increment, post-increment, pre-decrement, or post-decrement addressing mode is out of the range [1...8]. Example: STX Tip: 10, SP+ According to the HC12 addressing mode notation, the increment or decrement factor must be bigger than 0 and smaller than 9. 12.3.
Assembler Messages Message Codes 12.3.50 A12008: Relative Branch with Illegal Target Type: Error Description: The offset specified in a PC relative addressing mode is a complex relocatable expression. Example: DataSec: SECTION Data: DS.
Assembler Messages 12.3.51 A12009: Illegal Expression Type: Error Description: An illegal expression is specified in a PC relative addressing mode. The illegal expression may be generated in two cases: • A complex expression is specified when a PC relative expression is expected. • A left or right parenthesis is missing in the expression. Example: CodeSec1: SECTION Entry1: NOP CodeSec2: SECTION Entry2: NOP BRA #200 Tip: Change the expression to a valid expression.
Assembler Messages Message Codes 12.3.52 A12010: Register Expected Type: Error Description: A register mnemonic is missing in a post-increment, post-decrement, pre-increment, or pre-decrement addressing mode. Example: LDD Tip: 1, -ssp Specify a register mnemonic at the specified position.
Assembler Messages 12.3.53 A12011: Size Specification Expected Type: Error Description: An invalid size specification character is detected after a symbol name in an expression. Valid size specification characters are: .B for direct addressing mode .W for extended addressing mode Example: DataSec: SECTION ... label3 EQU label1.H +5 Insert a valid size specification character. DataSec: SECTION ... label3 EQU label1.
Assembler Messages Message Codes 12.3.54 A12102: Page Value Expected Type: Error Description: A page number is missing in a CALL instruction. Example: DataSec: SECTION data: DS.L 2 FarCodeSec: SECTION FarFunction: LDD #45 STD data CodeSec: SECTION … CALL FarFunction Tip: Add the missing page operand to the CALL instruction. Example: CALL DataSec: SECTION data: DS.
Assembler Messages 12.3.55 A12103: Operand not Allowed Type: Error Description: The operand specified in an assembly instruction is not valid for this instruction. Example: DataSec: SECTION data DS.B 20 … CodeSec: SECTION LEAX #data Tip: Check the CPU12 Reference Manual, Motorola document order number CPU12RM/AD, and CPU12 Reference Guide, document order number CPU12RG/D, and ensure that the source code contains only valid instructions and addressing mode combinations.
Assembler Messages Message Codes 12.3.56 A12104: Immediate Value Expected Type: Error Description: The immediate addressing mode is expected at that position. Usually, this error message is generated when the mask specified in a BRCLR or BRSET instruction is not preceded by the immediate character (#). Example: maskValue: EQU $40 BSCT var: DS.
Assembler Messages 12.3.57 A12105: Immediate Address Mode not Allowed Type: Error Description: The immediate addressing mode is not allowed at that position. Usually, this message is generated when the first operand specified in a BCLR, BSET, BRCLR, or BRSET instruction is preceded by the immediate character (#). Example: maskValue: EQU $40 BSCT var: DS.B 1 CodeSec: SECTION entry: LDD #4567 BRCLR #var, #maskValue, endCode … endCode: END Tip: Remove the unexpected (#) character.
Assembler Messages Message Codes 12.3.58 A12107: Illegal Size Specification for HC12 Instruction Type: Error Description: A size operator follows an HC12 instruction. Size operators are coded as a period character followed by a single character. Example: CodeSec: SECTION … ADDD.W #$0076 Tip: Remove the size specification following the HC12 instruction.
Assembler Messages 12.3.59 A12109: Illegal Character at the End of Line Type: Error Description: An invalid character or sequence of characters is detected at the end of an instruction. This message can be generated when: • A comment specified after the instruction does not start with a comment character (;). • An additional operand is specified in the instruction. Example: DataSec: SECTION var: DS.
Assembler Messages Message Codes 12.3.60 A12110: No Operand Expected Type: Error Description: An operand has been detected after an instruction that does not expect an operand. Example: CodeSec: SECTION PSHX toto Tip: Remove the unexpected operand or put a semi-colon (;) in front of it to redefine it as a comment.
Assembler Messages 12.3.61 A12201: Lexical Error in First or Second Field Type: Error Description: An incorrect assembly line is detected. This message may be generated when: • An assembly instruction or directive starts on column 1. • An assembly label on column 1 is not delimited by a colon character. • An invalid identifier has been detected in the assembly line label or instruction. Characters allowed as the first character in an identifier are: A...Z, a...z, _, .
Assembler Messages Message Codes 12.3.62 A12202: Not an HC12 Instruction or Directive Type: Error Description: The identifier detected in an assembly line instruction is not an assembly directive, a valid HC12 instruction, or a user-defined macro. Example: CodeSec: SECTION … LDHX #$5510 Tip: Change the identifier to an assembly directive, an HC12 instruction, or the name of a user-defined macro. Example: CodeSec: SECTION … LDX #$5510 12.3.
Assembler Messages 12.3.64 A12401: Value Out of Range –128...127 Type: Error Description: The offset between the current PC and the label specified as the PC relative address is not in the range of a signed byte (smaller than –128 or bigger than 127). An 8-bit signed PC relative offset is expected in the following instructions: • Branch instructions: BCC, BCS, BEQ, BGE, BGT, BHI, BHS, BLE, BLO, BLS, BLT, BMI, BNE, BPL, BRA, BRN, BSR, BVC, BVS.
Assembler Messages Message Codes Example for BRCLR instruction: DataSec: SECTION var1: DS.W 100 CodeSec: SECTION … LDX #var1 BRCLR 3, X, #$05, label dummyBl: DCB.B 200, $A7 label STD var2 Tip: If a BRSET or BRCLR has been used, replace the BRCLR instruction with this code sequence: LDAB ANDB LBEQ Example: DataSec: var1: var2: CodeSec: SECTION DS.W 1 DS.W 2 SECTION … LDX #var1 LDAB 3, X ANDB #$05 LBEQ label dummyBl: DCB.
Assembler Messages 12.3.65 A12402: Value Out of Range –32,768...32,767 Type: Error Description: The offset between the current PC and label specified as the PC relative address is not in the range of a signed word (smaller than –32,768 or bigger than 32,767). A 16-bit signed PC relative offset is expected in these instructions: • Long-branch instructions: LBCC, LBCS, LBEQ, LBGE, LBGT, LBHI, LBHS, LBLE, LBLO, LBLS, LBLT, LBMI, LBNE, LBPL, LBRA, LBRN, LBVC, LBVS.
Assembler Messages Message Codes 12.3.66 A12403: Value Out of Range –256...255 Type: Error Description: The offset between the current PC and label specified as the PC relative address is not in the range of a signed 9-bit value (smaller than –256 or bigger than 255).
Assembler Messages • For increment and branch: IFCC Condition IBNE D, label ADDD #1 LBNE label IBNE A, label INCA LBNE label IBNE B, label INCB LBNE label IBNE X, label INX LBNE label IBNE Y, label INY LBNE label IBNE S, label INS LBNE label • For test and branch: IFCC Example: TBNE D, label CPD #1 LBNE label TBNE A, label TSTA LBNE label TBNE B, label TSTB LBNE label TBNE X, label CPX #1 LBNE label TBNE Y, label CPY #1 LBNE label TBNE S, label CPS #1 LBNE label DataSec: var1: va
Assembler Messages Message Codes 12.3.67 A12405: PAGE with Initialized RAM not Supported Type: Error Description: The PAGE operator has been specified in a DC directive. This restriction applies only to the MCUez file format. Example: adrEntry: DC.W entry codeSec: SECTION entry: NOP NOP cstSec: SECTION pgEntry DC.B PAGE(entry) Tip: The complete address from the entry label can be loaded using a DC.L directive.
Assembler Messages 12.3.68 A12408: Code Size Per Section Is Limited to 32 Kbytes Type: Error Description: One of the code or data sections defined in the application is bigger than 32 K. This is a limitation in the assembly version. Example: cstSec: SECTION noptable: DCB.L 4000, $A7 DCB.L 4000, $A7 DCB.L 4000, $A7 DCB.L 500, $A7 Tip: Split the section into sections less than 32 K. The order in which the sections are allocated can be specified in the linker PRM (parameter) file.
Assembler Messages Message Codes 12.3.69 A12409: In PC Relative Addressing Mode, References to Object Located in Another Section or File Only Allowed for IDX2 Addressing Mode Type: Error Description: A reference to an external symbol or a symbol defined in another section is detected in a 9-bit or 5-bit indexed PC relative addressing mode. This is not allowed. Example: dataSec: data: cstSec: label: codeSec1: entry: SECTION DS.W 1 SECTION DC.
Assembler Messages 12.3.70 A12411:Restriction: Label Specified in a DBNE, DBEQ, IBNE, IBEQ, TBNE, or TBEQ Instruction Should Be Defined in the Same Section They Are Used Type: Error Description: An external symbol or a symbol defined in another section has been detected in a DBNE, DBEQ, IBNE, IBEQ, TBNE, or TBEQ instruction. This is not allowed in a relocatable section. Example: dataSec: data: codeSec0: label: codeSec1: entry: SECTION DS.
User’s Manual — MCUez HC12 Assembler Appendix A. MASM Compatibility A.1 Content A.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 A.3 Comment Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 A.4 Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 A.5 Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MASM Compatibility • Binary constants are a sequence of binary digits (0–1) followed by b or B Example: 512d 512D 200h 200H 1000o 1000O 1000q 1000Q 1000000000b 1000000000B ; ; ; ; ; ; ; ; ; ; decimal representation decimal representation hexadecimal representation hexadecimal representation octal representation octal representation octal representation octal representation binary representation binary representation A.
MASM Compatibility A.6 Directives Table A-2 lists directives supported by MCUez for compatibility with MASM. Table A-2.
MASM Compatibility User’s Manual 314 MCUez HC12 Assembler MASM Compatibility MOTOROLA
User’s Manual — MCUez HC12 Assembler Appendix B. MCUasm Compatibility B.1 Contents B.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 B.3 Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 B.4 Set Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 B.5 Obsolete Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MCUasm Compatibility B.4 Set Directive When MCUasm compatibility mode is activated, relocatable expressions are allowed in a SET directive. Example: label: SET * If MCUasm compatibility mode is not activated, the SET label refers to absolute expressions. B.5 Obsolete Directives Table B-1 lists directives that are not recognized if MCUasm compatibility mode is activated. Table B-1.
User’s Manual — MCUez HC12 Assembler Index Symbols - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 *. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 .abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 .c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index B BASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148, 162, 167 C CLIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163, 168 CODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Code Section . . . . . . . . . . . . . . . .
Index DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161, 173 ELSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164, 174 ELSEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162, 175 ENDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index RMB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313, 316 SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111, 161, 197 SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146, 161, 199 SPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163, 200 TABS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index Error Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 EVEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162, 178 Expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Absolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155, 156 Complex Relocatable . . . . . . . . . . . . . . .
Index I IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164, 182 IFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164, 183 IFDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164, 183 IFEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164, 183 IFGE . . . . . . . . . . . . . . . .
Index M MACRO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163, 189 Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 -Mb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 MCUTOOLS.INI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Memory Model . . . . . . . . . . . . . . . .
Index Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Relational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152, 155 Shift. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150, 154, 158, 312 Sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150, 154, 157 Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index SHORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Simple Relocatable Expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155, 157 Source File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 source line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 SPC . . . . . . . . . . . . . . . . . . . . . . . . .
Index W -W2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 -WmsgFbm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 -WmsgFim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 -WmsgNe . . . . . . . . . . . . . . . .
Need to know more? That’s ez, too. Technical support for MCUez development tools is available through your regional Motorola office or by contacting: Motorola, Inc. 6501 William Cannon Drive West MD:OE17 Austin, Texas 78735 Phone (800) 521-6274 Fax (602) 437-1858 CRC@CRC.email.sps.mot.com Motorola reserves the right to make changes without further notice to any products herein.