Keil Logo

Assembly Statements

Assembly program source files are made up of statements that may include controls, assembler control statements, or 8051 MCU instructions (mnemonics). For example:

$TITLE(Demo Program #1)
                    CSEG    AT    0000h
                    JMP     $

This example program consists of four statements. $TITLE is a directive, CSEG and END are control statements, and JMP is an 8051 MCU instruction.

Each line of an assembly program can contain only one directive, control statement, or MCU instruction. Statements must be contained in exactly one line. Multi–line statements are not allowed.

Statements in x51 assembly programs are not column sensitive. Directives, control statements, or MCU instructions may start in any column. Indentation used in the examples in this manual is done for program clarity and is neither required nor expected by the assembler. The only exception is that arguments and instruction operands must be separated from directives, control statements, or MCU instructions by at least one space.

All x51 assembly programs must include the END control statement. This control statement signals to the assembler that this is the end of the assembly program. Any MCU instructions, directives, or control statements found after the END control statements are ignored. The shortest valid assembly program contains only an END control statement.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.