Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Aligning code
Posted by: Gwile Jul,12.2005-10:55 

Do not forget that aligning code on
certain address boundaries depends
mostly on the OS!!!

In fact (AFAIK) all Atari OS align your
TEXT, DATA and BSS segments and even
M[X]ALLOCs to addresses that are (at
least) multiple of 4.

So CNOP 0,4 (or EVEN.L that should be
equivalent on "selected assemblers") is
usable for aligning your code or screen
memory to "word" or "long" boundaries.

But for better alignment of code on 030
and 060 (think of cache lines) or screen
memory, you need to do it manually to
guarantee alignement will be correct
whatever the address the system
relocates your code or screen memory to!

(With MiNT I think the start addresses
are at least multiple of 4096 (because
of 4kB paging) but don't count on it
or you will rule out all other OSes!)

So perhaps that's why cnop 0,16 does
not work as expected! ;P







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Aligning code Peter Jul,08.2005-09:34
  Re: Aligning code stghost Jul,08.2005-10:32
    Re: Aligning code Peter Jul,08.2005-10:36
      Re: Aligning code earx Jul,08.2005-10:48
    Re: Aligning code deez Jul,08.2005-10:47
      Re: Aligning code Gwile Jul,12.2005-10:55
  Re: Aligning code GT Turbo Jul,08.2005-10:32
    Re: Aligning code Peter Jul,08.2005-10:35
      Re: Aligning code GT Turbo Jul,12.2005-11:55


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson