Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docs/assembler/inline/asm.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
description: "Learn more about: `__asm`"
title: "__asm"
ms.date: "10/09/2018"
description: "Learn more about: `__asm`"
ms.date: 10/09/2018
ms.topic: reference
f1_keywords: ["__asm", "_asm", "__asm_cpp"]
helpviewer_keywords: ["__asm keyword [C++], vs. asm blocks", "__asm keyword [C++]"]
ms.assetid: 77ff3bc9-a492-4b5e-85e1-fa4e414e79cd
ms.topic: reference
---
# `__asm`

Expand All @@ -28,7 +27,7 @@ The **`__asm`** keyword invokes the inline assembler and can appear wherever a C

## Remarks

If used without braces, the **`__asm`** keyword means that the rest of the line is an assembly-language statement. If used with braces, it means that each line between the braces is an assembly-language statement. For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`**.
If used without braces, the **`__asm`** keyword means that the rest of the line is an assembly-language statement. If used with braces, it means that each line between the braces is an assembly-language statement. For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`** unless compiler option [`/Za` (Disable language extensions)](../../build/reference/za-ze-disable-language-extensions.md) is specified.

Since the **`__asm`** keyword is a statement separator, you can put assembly instructions on the same line.

Expand All @@ -42,8 +41,6 @@ didn't cause native code to be generated when compiled with **/clr**; the compil

`__asm int 3` now results in native code generation for the function. If you want a function to cause a break point in your code and if you want that function compiled to MSIL, use [__debugbreak](../../intrinsics/debugbreak.md).

For compatibility with previous versions, **`_asm`** is a synonym for **`__asm`** unless compiler option [/Za \(Disable language extensions)](../../build/reference/za-ze-disable-language-extensions.md) is specified.

## Example

The following code fragment is a simple **`__asm`** block enclosed in braces:
Expand Down