|  | 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]
 
 
 
 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.
 |