mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
New function AlignCount.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5329 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
d956320687
commit
d0555c400e
@ -178,3 +178,11 @@ unsigned long AlignAddr (unsigned long Addr, unsigned long Alignment)
|
||||
|
||||
|
||||
|
||||
unsigned long AlignCount (unsigned long Addr, unsigned long Alignment)
|
||||
/* Calculate how many bytes must be inserted to align Addr to Alignment */
|
||||
{
|
||||
return AlignAddr (Addr, Alignment) - Addr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -55,7 +55,10 @@ unsigned long LeastCommonMultiple (unsigned long Left, unsigned long Right);
|
||||
*/
|
||||
|
||||
unsigned long AlignAddr (unsigned long Addr, unsigned long Alignment);
|
||||
/* Align an address to the given alignment */
|
||||
/* Align an address to the given alignment */
|
||||
|
||||
unsigned long AlignCount (unsigned long Addr, unsigned long Alignment);
|
||||
/* Calculate how many bytes must be inserted to align Addr to Alignment */
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user