Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
CasmHC12_Pro - Incorrect encoding of CLRW
Steven P. Jan 12, 2017 at 11:50 AM (11:50 hours)
Staff: Kevin A. P.

  • I would like to confirm/make aware that there is an issue in the CasmHC12_Pro assembler when encoding the CLRW instruction.

    If the CLRW instruction is used as an EXT (extended) addressing mode:

    CLRW [label]

    It will be encoded as (IDX1, indexed addressing mode):

    $18 $69 $[label] (2 bytes)

    Where it should be encoded as:

    $18 $79 $[label] (2 bytes)

    This issue causes erratic behavior at run time. There are a few solutions to work around this issue however:

    LDX/LDY [label]
    CLRW 0,{X/Y}


    CLR [label]
    CLR [label]+1


    MOVW #0,[label]

    And I am sure many other solutions.




    Comments

    • This is using CasmHC12_Pro - Version 1.03.

Add comment


   Want to comment? Please login or create a new PEMicro account.







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