AnsweredAssumed Answered

Can you help me with an HC08 assembly language macro issue?

Question asked by Roger DiPaolo on May 8, 2015
Latest reply on Jun 11, 2015 by Roger DiPaolo

In trying to make a legacy HC08 assembly code base more understandable and maintainable I am implementing macros where there used to be none.


This macro does not create a build error:


BCLR_RedAlarmReset_BIT_IS2_3:          MACRO

                                                                 BCLR 3,INT_STAT2



Where INT_STAT2 is defined as:


INT_STAT2:  DS.B 1             ;Internal status flag group #2


Yet, this macro does cause a build error:


TurnOnAnnunciator1:               MACRO

                                                 BSET 4,PORTA



Where PORTA is defined as:


PORTA:      EQU $0000          ;Port A Data Register




So I can see the obvious differences, but nothing in any documentation I can find tells me why the first example works, and the second one does not.


If you can help with this, I want to thank you *very much* in advance, it is *greatly* appreciated!!!!  (and if you're near Burlington, Mass I'll take you out for lunch!!)