EasyManuals Logo

Holtek HT48R05A-1 User Manual

Default Icon
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #74 background imageLoading...
Page #74 background image
Comment
Comments are the descriptions of codes. They are used for documentation only and are ignored
by the Cross Assembler. Any text following a semicolon is considered a comment.
Assembly Directives
Directives give direction to the Cross Assembler, specifying the manner in which the Cross Assem
-
bler generates object code at assembly time. Directives can be further classified according to their
behavior as described below.
Conditional Assembly Directives
The conditional block has the following form:
IF
statements
[ELSE
statements]
ENDIF
Syntax
IF expression
IFE expression
·
Description
The directives IF and IFE test the expression following them.
The IF directive grants assembly if the value of the expression is true, i.e. non-zero.
The IFE directive grants assembly if the value of the expression is false, i.e. zero.
· Example
IF debugcase
ACC1 equ 5
extern username: byte
ENDIF
In this example, the value of the variable ACC1 is set to 5 and the username is declared as an
external variable if the symbol debugcase is evaluated as true, i.e. nonzero.
Syntax
IFDEF name
IFNDEF name
·
Description
The directives IFDEF and IFNDEF test whether or not the given name has been defined. The
IFDEF directive grants assembly only if the name is a label, a variable or a symbol. The IFNDEF di
-
rective grants assembly only if the name has not yet been defined. The conditional assembly direc
-
tives support a nesting structure, with a maximum nesting level of 7.
·
Example
IFDEF buf_flag
buffer DB 20 dup(?)
ENDIF
In this example, the buffer is allocated only if the buf_flag has been previously defined.
Chapter 4 Assembly Language and Cross Assembler
67

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Holtek HT48R05A-1 and is the answer not in the manual?

Holtek HT48R05A-1 Specifications

General IconGeneral
BrandHoltek
ModelHT48R05A-1
CategoryI/O Systems
LanguageEnglish