Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
71
Добавлен:
14.04.2015
Размер:
2.03 Mб
Скачать

Keil Software — A51/AX51/A251 Macro Assembler and Utilities

71

 

 

instructions in your program into machine code and stores the resulting code in an object file.

Assembly instructions have the following general format:

label: mnemonic operand , operand , operand ; comment

 

 

where

 

 

 

label

is a symbol name that is assigned the address at which the

 

 

instruction is located.

 

mnemonic

is the ASCII text string that symbolically represents a

 

3

 

machine language instruction.

operand

is an argument that is required by the specified mnemonic.

comment

is an optional description or explanation of the instruction.

 

 

 

A comment may contain any text you wish. Comments are

 

 

ignored by the assembler.

 

The “Instruction Sets” of the x51 microcontrollers are listed on page 40 by mnemonic and by machine language opcode. Refer to this section for more information about assembler instructions.

Comments

Comments are lines of text that you may include in your program to identify and explain the program. Comments are ignored by the Ax51 assembler and are not required in order to generate working programs.

You can include comments anywhere in your assembler program. Comments must be preceded with a semicolon character (;). A comment can appear on a line by itself or can appear at the end of an instruction. For example:

;This is a comment

NOP

;This is also a comment

When the assembler recognizes the semicolon character on a line, it ignores subsequent text on that line. Anything that appears on a line to the right of a semicolon will be ignored by the Ax51 assembler. Comments have no impact on object file generation or the code contained therein.

Shaded directives and options are available only in AX51 and A251.

Соседние файлы в папке HLP