I am developing an application using MC68HC908GZ60 and CodeWarrior 6.3.1 in pure relocatable assembly. I have two tables to read. One has 128 of 16-bit entries, the other has 256 of 8-bit entries. I want to locate them on a $00 address boundary (ex: $2100, $2200) and read entries using index register with either
mov x+,target_addr
or
ldhx table_addr
lda <8-bit ADC input>
tax
lda ,x
'ALIGN 256' directive does not align at all and this mistake is clearly seen in
Project.map as table start addresses are $214C $1E39.
Why compiler is ignoring my ALIGN directive? What should I do to really ALIGN
my tables?
code snippets:
SINETABLE SECTION
ALIGN $100
sinetable: dc.w 2146, 2244, 2341, 2438, 2533, 2628, 2721, 2813
dc.w 2903, 2990, 3076, 3159, 3239, 3316, 3391, 3462
...........
EXPTABLE SECTION
ALIGN 256
exptable: dc.b 0, 0, 0, 0, 0, 0, 0, 1
dc.b 1, 1, 1, 1, 1, 1, 1, 1
............
from Project.map :
- PROCEDURES:
sinetable 1E39 10 16 2 MOTOR_Code
VAR00001 1E49 10 16 0 MOTOR_Code
VAR00002 1E59 10 16 0 MOTOR_Code
......
exptable 214C 8 8 1 EXPTABLE
VAR00001 2154 8 8 0 EXPTABLE