beautypg.com

7 symbol defining pseudo-instruction (.set) – Epson S5U1C62000A User Manual

Page 89

background image

S5U1C62000A MANUAL

EPSON

77

(S1C60/62 FAMILY ASSEMBLER PACKAGE)

CHAPTER 5: ASSEMBLER

5.7.7 Symbol Defining Pseudo-Instruction (.set)

Instruction format

.set

[,]

:

Symbols for value reference
• The 1st character is limited to a–z, A–Z, ? and _.
• The 2nd and the subsequent character can use a–z, A–Z, 0–9, ? and _.
• Uppercase and lowercase are discriminated.
• One or more spaces, or tabs are necessary between the instruction and the symbol.

:

Value specification
• Only decimal, binary, and hexadecimal numbers can be described.
• The values that can grammatically be specified are from 0 to 65,535 (0xffff).
• One or more spaces, tabs, or a comma (,) are necessary between the instruction and the value.

Sample description:

.set

DATA1 0x20

.set

DATA2 0xf2

Function

Defines a symbol for a constant value.

Precaution

When the defined symbol is used as an operand, the defined value is referred as is. Therefore, if the
value exceeds the valid range of the operand, an error will result.

Example:

.set DATA1 0xf0

ld

x,DATA1

... OK

ld

y,DATA1

... OK

ld

a,DATA1

... Error