Solved! Go to Solution.
Hi Ralph,
Ralph wrote:
. . . So a little note in the RM would have been good that this is not a good programming style.
Ralph wrote:
. . . So a little note in the RM would have been good that this is not a good programming style.
I now see to what you were referring -
There are at least two instances, within the Reference Manual HCS08RMv1 (on page 137 and page 150), where programming samples are given that do not work for CW relocatable assembler, because of the "unknown" offset between the two different segments. The samples would work as intended for absolute assembly (using ORG directives), and maybe for assemblers other than CW.
However, because of the now implicit assumption of the use of CW, the code samples given are probably inappropriate. The use of indexed addressing could easily have been demonstrated using sample code that did not need to calculate the offset value at compile/link time.
Regards,
Mac