Skip to content

Commit c254f92

Browse files
author
Colin Robertson
committed
Alternative text update for CC76148
1 parent 65b7045 commit c254f92

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

docs/assembler/masm/align-masm.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
---
22
title: "ALIGN (MASM)"
3-
ms.date: "08/30/2018"
3+
ms.date: "01/02/2019"
44
f1_keywords: ["align"]
55
helpviewer_keywords: ["ALIGN directive"]
66
ms.assetid: 1c386b23-439f-4ec3-a6de-74427b25e47f
77
---
88
# ALIGN (MASM)
99

10-
Aligns the next variable or instruction on a byte that is a multiple of *number*.
10+
The **ALIGN** directive aligns the next data element or instruction on an address that is a multiple of its parameter. The parameter must be a power of 2 (for example, 1, 2, 4, and so on) that is less than or equal to the segment alignment.
1111

1212
## Syntax
1313

1414
> ALIGN [[*number*]]
1515
16+
## Remarks
17+
18+
The **ALIGN** directive allows you to specify the beginning offset of a data element or an instruction. Aligned data can improve performance, at the expense of wasted space between data elements. Large performance improvements can be seen when data accesses are on boundaries that fit within cache lines. Accesses on natural boundaries for native types means less time spent in internal hardware realignment microcode.
19+
20+
The need for aligned instructions is rare on modern processors that use a flat addressing model, but may be required for jump targets in older code for other addressing models.
21+
22+
When data is aligned, the skipped space is padded with zeroes. When instructions are aligned, the skipped space is filled with appropriately-sized NOP instructions.
23+
1624
## See also
1725

26+
[EVEN](even.md)<br/>
1827
[Directives Reference](../../assembler/masm/directives-reference.md)<br/>

0 commit comments

Comments
 (0)