Keil Logo

Operands and Expressions

Assembler programs for the C16x/ST10 processor family consist of lines of C16x/ST10 mnemonic instructions. A line can contain only one machine instruction. The general form of all instruction lines is as follows:

[label:] mnemonic[Expr.][,Expr.][,Expr.] [; comment] <eol>:

For example:

start:   MOV  DPP2,#PAG D_GROUP   ; initialize DPP0
         MOV  DPP3,#3             ; load System Page
         MOV  R0,R15

Labels, which are optional, serve two purposes.

  • Hold the C16x/ST10 instruction, to which you can jump by using the symbolic label name for the destination address. The same also applies for subroutine calls.
  • Simplify software testing by permitting symbolic debugging. Addresses can be specified by using the symbolic name.

The assembler mnemonic determines the operands' number and required type. Some instructions do not require operands, however, some require one, two, or three operands. Different ways operands can be classified are listed below.

  • Special assembler symbols, such as register names.
  • Program symbols, such as labels, section names, group names, and external names.
  • Direct and indirect addresses.
  • Constants.

Comments can be inserted into the source program. A comment is introduced with a leading semicolon (;). The remainder of the line following the semicolon is ignored, as shown below:

START:  CALLS SEG (FARPROC), FARPROC  ; comment after instruction
                                      ; a pure comment line.

Comments can be used liberally for documenting programs and do not affect the object code.

  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.