Keywords: sdccman

Subsections

- 3.11.1.1 Old __asm ... __endasm; Format
- 3.11.1.2 New __asm__ (''inline_assembler_code'') Format

## 3.11.1 Inline Assembler Code Formats

SDCC supports two formats for inline assembler code definition:

### 3.11.1.1 Old __asm ... __endasm; Format

Most of inline assembler code examples in this manual use the old inline assembler code format, but the new format could be used equivalently.

Example:

> __asm
> ; This is a comment
> label:
> nop
> __endasm;

### 3.11.1.2 New __asm__ (''inline_assembler_code'') Format

The __asm__ inline assembler code format was introduced in SDCC version 3.2.0.

Example:

> __asm__ (”; This is a comment\nlabel:\n\tnop”);