Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service
   Home P&E Customer Support FAQs - Frequently Asked Questions FAQ ID # 51
FAQ ID # 51
 
Question
The CASM12 assembler gives me the following error: "Error : Must use HC12 or HCS12 directive before this instruction". What does this mean?
 
Answer
Some CPU instructions needs to be assembled by CASM12Z differently depending upon whether the code is targeted for the HCS12 or HC12 architecture. Also, the cycle counts in the listing file are different for each architecture. So the assembler requires that before certain instructions are assembled, usually at the top of the main assembly file, the architecture is specified. This is done by using either the $HC12 or $HCS12 directive. Here is a very simple application targeting the HCS12:

$HCS12      ; Set architecture to HCS12

     org $2000

righton ds 1

     movb #$02,righton

 
Related Downloads
CASM12Z Help Files - CASM12Z Help Files

 
Architectures Categories Products
HC(S)12(X) Assembler KIT912B32_USB, PKG12Z_USB, CASM12Z, WINIDE12Z, KIT9S12DP256B-USB, KIT9S12DP256B-MULTI, KIT9S12A256B-MULTI, KIT9S12A256B-USB
 
Please rate this FAQ to help us improve our support
0 means "not helpful"
10 means "very helpful"
0 1 2 3 4 5 6 7 8 9 10

© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement