1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +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:
uz 2011-12-27 22:31:36 +00:00
parent d956320687
commit d0555c400e
2 changed files with 12 additions and 1 deletions

View File

@ -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;
}

View File

@ -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 */