Motorola HC12 User Manual
Need to know more? that’s ez, too

MCUez HC12 Assembler User's Manual
MCUEZASM12/D
Rev. 1
Easy development software
from the company that
knows MCU hardware best
How to reach us:
USA/EUROPE/Locations Not Listed: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217, 1–800–441–2447 or 1-303-675-2140.
Customer Focus Center: 1–800–521–6274
JAPAN: Motorola Japan Ltd.; SPD, Strategic Planning Office, 141, 4–32–1, Nishi–Gotanda, Shinagawa–ku, Tokyo, Japan, 03–5487–8488
ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd., Silicon Harbour Centre, 2 Dal King Street, Tai Po Industrial Estate, Tai Po, New Territories,
Hong Kong, 852–26668334
Mfax
TM
, Motorola Fax Back System: [email protected]; http://sps.motorola.com/mfax/; TOUCHTONE, 1-602–244–8609;
US & Canada ONLY, 1–800–774–1848
HOME PAGE: http://motorola.com/sps/
Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee
regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any prod-
uct or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters which
may be provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All
operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Motorola does not convey
any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems
intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the
Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unin-
tended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless
against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death as-
sociated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the
part. Motorola and
are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
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
[email protected]
Mfax is a trademark of Motorola, Inc.
Document Outline
- List of Sections
- Table of Contents
- List of Figures
- List of Tables
- Section 1. General Information
- Section 2. Graphical User Interface
- Section 3. Environment Variables
- Section 4. Files
- Section 5. Assembler Options
- Section 6. Sections
- Section 7. Assembler Syntax
- 7.1 Contents
- 7.2 Introduction
- 7.3 Comment Line
- 7.4 Source Line
- 7.4.1 Label Field
- 7.4.2 Operation Field
- 7.4.3 Operand Fields
- 7.4.3.1 Inherent
- 7.4.3.2 Immediate
- 7.4.3.3 Direct
- 7.4.3.4 Extended
- 7.4.3.5 Relative
- 7.4.3.6 Indexed, 5-Bit Offset
- 7.4.3.7 Indexed, 9-Bit Offset
- 7.4.3.8 Indexed, 16-Bit Offset
- 7.4.3.9 Indexed, Indirect 16-Bit Offset
- 7.4.3.10 Indexed, Pre-Decrement
- 7.4.3.11 Indexed, Pre-Increment
- 7.4.3.12 Indexed, Post-Decrement
- 7.4.3.13 Indexed, Post-Increment
- 7.4.3.14 Indexed, Accumulator Offset
- 7.4.3.15 Indexed-Indirect, D Accumulator Offset
- 7.4.3.16 Indexed PC versus Indexed PC Relative Addressing Mode
- 7.4.4 Comment Field
- 7.5 Symbols
- 7.6 Constants
- 7.7 Operators
- 7.7.1 Addition and Subtraction Operators (Binary)
- 7.7.2 Multiplication, Division, and Modulo Operators (Binary)
- 7.7.3 Sign Operators (Unary)
- 7.7.4 Shift Operators (Binary)
- 7.7.5 Bitwise Operators (Binary)
- 7.7.6 Bitwise Operators (Unary)
- 7.7.7 Logical Operators (Unary)
- 7.7.8 Relational Operators (Binary)
- 7.7.9 Memory PAGE Operator (Unary)
- 7.7.10 Force Operator (Unary)
- 7.8 Expressions
- 7.9 Translation Limits
- Section 8. Assembler Directives
- 8.1 Contents
- 8.2 Introduction
- 8.3 ABSENTRY — Application Entry Point
- 8.4 ALIGN — Align Location Counter
- 8.5 BASE — Set Number Base
- 8.6 CLIST — List Conditional Assembly
- 8.7 DC — Define Constant
- 8.8 DCB — Define Constant Block
- 8.9 DS — Define Space
- 8.10 ELSE — Conditional Assembly
- 8.11 END — End Assembly
- 8.12 ENDIF — End Conditional Assembly
- 8.13 ENDM — End Macro Definition
- 8.14 EQU — Equate Symbol Value
- 8.15 EVEN — Force Word Alignment
- 8.16 FAIL — Generate Error Message
- 8.17 IF — Conditional Assembly
- 8.18 IFCC — Conditional Assembly
- 8.19 INCLUDE — Include Text from Another File
- 8.20 LIST — Enable Listing
- 8.21 LLEN — Set Line Length
- 8.22 LONGEVEN — Forcing Longword Alignment
- 8.23 MACRO — Begin Macro Definition
- 8.24 MEXIT — Terminate Macro Expansion
- 8.25 MLIST — List Macro Expansions
- 8.26 NOLIST — Disable Listing
- 8.27 NOPAGE — Disable Paging
- 8.28 ORG — Set Location Counter
- 8.29 OFFSET — Create Absolute Symbols
- 8.30 PAGE — Insert Page Break
- 8.31 PLEN — Set Page Length
- 8.32 SECTION — Declare Relocatable Section
- 8.33 SET — Set Symbol Value
- 8.34 SPC — Insert Blank Lines
- 8.35 TABS — Set Tab Length
- 8.36 TITLE — Provide Listing Title
- 8.37 XDEF — External Symbol Definition
- 8.38 XREF — External Symbol Reference
- Section 9. Macros
- Section 10. Assembler Listing File
- Section 11. Operating Procedures
- Section 12. Assembler Messages
- 12.1 Contents
- 12.2 Introduction
- 12.3 Message Codes
- 12.3.1 A1000: Conditional Directive not Closed
- 12.3.2 A1001: Conditional Else not Allowed Here
- 12.3.3 A1051: Zero Division in Expression
- 12.3.4 A1052: Right Parenthesis Expected
- 12.3.5 A1053: Left Parenthesis Expected
- 12.3.6 A1054: References on Non-Absolute Objects Are not Allowed When Options -FA1 or -FA2 Are En...
- 12.3.7 A1101: Illegal Label: Label is Reserved
- 12.3.8 A1103: Illegal Redefinition of Label
- 12.3.9 A1104: Undeclared User-Defined Symbol
- 12.3.10 A1201: Label
Referenced in Directive ABSENTRY is not Defined in Code Segment - 12.3.11 A2301: Label is Missing
- 12.3.12 A2302: Macro Name is Missing
- 12.3.13 A2303: ENDM is Illegal
- 12.3.14 A2304: Macro Definition Within Definition
- 12.3.15 A2305: Illegal Redefinition of Instruction or Directive Name
- 12.3.16 A2306: Macro not Closed at End of Source
- 12.3.17 A2307: Macro Redefinition
- 12.3.18 A2308: Filename Expected
- 12.3.19 A2309: File not Found
- 12.3.20 A2310: Illegal Size Character
- 12.3.21 A2311: Symbol Name Expected
- 12.3.22 A2312: String Expected
- 12.3.23 A2313: Nesting of Include Files Exceeds 50
- 12.3.24 A2314: Expression Must Be Absolute
- 12.3.25 A2316: Section Name Required
- 12.3.26 A2317: Illegal Redefinition of Section Name
- 12.3.27 A2318: Section not Declared
- 12.3.28 A2320: Value too Small
- 12.3.29 A2321: Value too Big
- 12.3.30 A2323: Label is Ignored
- 12.3.31 A2324: Illegal Base (2, 8, 10, 16)
- 12.3.32 A2325: Comma or Line End Expected
- 12.3.33 A2326: Label is Redefined
- 12.3.34 A2327: ON or OFF Expected
- 12.3.35 A2328: Value is Truncated
- 12.3.36 A2329: FAIL Found
- 12.3.37 A2330: String is not Allowed
- 12.3.38 A2332: FAIL Found
- 12.3.39 A2333: Forward Reference not Allowed
- 12.3.40 A2334: Only Labels Defined in the Current Assembly Unit Can Be Referenced in an EQU Expre...
- 12.3.41 A2335: Exported Absolute SET Label is not Supported
- 12.3.42 A2336: Value too Big
- 12.3.43 A2338:
- 12.3.44 A2341: Relocatable Section not Allowed: Absolute File is Currently Directly Generated
- 12.3.45 A12001: Illegal Addressing Mode
- 12.3.46 A12002: Complex Relocatable Expression not Supported
- 12.3.47 A12003: Value is Truncated to One Byte
- 12.3.48 A12005: Value Must Be Between 1 and 8
- 12.3.49 A12007: Comma Expected
- 12.3.50 A12008: Relative Branch with Illegal Target
- 12.3.51 A12009: Illegal Expression
- 12.3.52 A12010: Register Expected
- 12.3.53 A12011: Size Specification Expected
- 12.3.54 A12102: Page Value Expected
- 12.3.55 A12103: Operand not Allowed
- 12.3.56 A12104: Immediate Value Expected
- 12.3.57 A12105: Immediate Address Mode not Allowed
- 12.3.58 A12107: Illegal Size Specification for HC12 Instruction
- 12.3.59 A12109: Illegal Character at the End of Line
- 12.3.60 A12110: No Operand Expected
- 12.3.61 A12201: Lexical Error in First or Second Field
- 12.3.62 A12202: Not an HC12 Instruction or Directive
- 12.3.63 A12203: Reserved Identifiers not Allowed as Instruction or Directive
- 12.3.64 A12401: Value Out of Range –128...127
- 12.3.65 A12402: Value Out of Range –32,768...32,767
- 12.3.66 A12403: Value Out of Range –256...255
- 12.3.67 A12405: PAGE with Initialized RAM not Supported
- 12.3.68 A12408: Code Size Per Section Is Limited to 32 Kbytes
- 12.3.69 A12409: In PC Relative Addressing Mode, References to Object Located in Another Section o...
- 12.3.70 A12411: Restriction: Label Specified in a DBNE, DBEQ, IBNE, IBEQ, TBNE, or TBEQ Instructi...
- Appendix A. MASM Compatibility
- Appendix B. MCUasm Compatibility
- Index