dhedberg wrote:Hmm, does this really work? The aligning will take place during assembly, but when the resulting executable is loaded the Atari TOS can put it anywhere. The OS only guarantees that it starts at an even address. As far as I understand it, alignment on anything but word addresses requires relocating the code/data manually during runtime.
Yes it works, i tested it first, but this is better:
Code: Select all
MACRO ALIGHN_16
ifne (*-BSS)&1 ;make even
ds.b 1
endc
ifne (*-BSS)&2 ;make long
ds.w 1
endc
ifne (*-BSS)&4 ;make alighn_8
ds.l 1
endc
ifne (*-BSS)&8 ;make alighn_16
ds.l 2
endc
ENDM
It is true during debugging it is not aligned to a 16 bound
addres.
but is IS aligned relative to the
label. ( in this case BSS)
When started from a little program i already made that exacutes a program on a fixed alignment
this works.
Thanks everyone for thinking with me.
for who is interested:
the 68060 has a cache that works with 4longs (called a line) at the time, so this is aligned to 16.