Comments

Comments are useful for documenting the source program. The assembler recognizes the semicolon (;) as a comment delimiter character. Any character or sequence of characters preceded by a semicolon is considered a comment. Comments can occupy an entire line, or can be placed at the end of a source statement.

Examples:

; This comment occupies an entire line
LDAC 1000 ; This is a trailing comment

 

Numeric Constants

Numeric constants can be used in source statements. If there is no postfix, the assembler assumes the number is decimal.

number

can be one of the following:

  • bin_numB
  • dec_num (or dec_numD)
  • oct_numO (or oct_numQ)
  • hex_numH

Lowercase equivalences are allowed: b, d, o, q, h

bin_num

is a binary number consisting of the digits '0'-'1' and ending with a 'B' or 'b'.

Examples:

11000101B
1011B
1110110b

dec_num

is a decimal number consisting of the digits '0'-'9', optionally followed by 'D' or 'd'.

Examples:

364
7534D
435d

oct_num

is an octal number consisting of the digits '0'-'7' and ending with an 'O', 'o', 'Q' or 'q'.

Examples:

77O
542o
2324q
34241Q

hex_num

is a hexadecimal number consisting of '0'-'9' and 'a'-'f' or 'A'-'F' ending with a 'H', or 'h'.

Examples:

84H
ABDEh
f12aH

Assembler Directives

The assembly process can be controlled by assembler directives. The assembler interprets the assembler directives instead of translating them into machine instructions. The assembler supports the following directives:

Directive

Description

ORG <address>

Assemble the subsequent source statements starting at the specified address, <address>.

Examples:

ORG 1123H ; Start assembling at address 4387
ORG 567o ; Start assembling at address 375

DB <number>

Store the specified 1-byte constant <number> in memory.

Examples:

DB 11 ; Store the 8-bit constant 11 in memory
DB 333o ; Store the 8-bit constant 219 in memory

DW <number>

Store the specified 2-byte constant <number> in memory. The assembler initializes the memory with the least significant byte first.

Examples:

DW 23785 ; Store the 16-bit constant 23785 in memory
DW af43h ; Store the 16-bit constant 44867 in memory

Assembler Labels

The assembler also supports jump to lables of the form label_name: (notice the : after the label name). The labels are not case censetive.

Example:

JMP MyLabel

....

MyLabel: ....

Assembling a Program

  1. At the main window, enter the assembly program in the text box.
  2. Enter the starting memory location where the program will be stored in the Memory Location text field.
  3. Click the Assemble button. A dialog box will open displaying the results of the assembly process.

Viewing the Last Assembly Results

At the main window, click on the View Results button. A dialog box will open displaying the last assembly results.