Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service
   Home P&E Customer Support FAQs - Frequently Asked Questions FAQ ID # 51
FAQ ID # 51
The CASM12 assembler gives me the following error: "Error : Must use HC12 or HCS12 directive before this instruction". What does this mean?
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
Architectures Categories Products
HC(S)12(X) Assembler KIT9S12DP256B-MULTI, PKG12Z_USB, CASM12Z, WINIDE12Z
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

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