6 register names, 7 numerical notations – Epson S5U1C63000A User Manual

Page 71

Advertising
background image

CHAPTER 4: ASSEMBLER

S5U1C63000A MANUAL

EPSON

57

(S1C63 FAMILY ASSEMBLER PACKAGE)

4.5.6 Register Names

The CPU register names may be written in either uppercase or lowercase letters.

Table 4.5.6.1 Notations of register names

Register

Notation

A

Data register A

%a, %A, a or A

B

Data register B

%b, %B, b or B

BA

BA-register pair

%ba, %BA, ba or BA

X

Index register X

%x, %X, x or X

XH

Upper 8 bits of X-register

%xh, %XH, xh or XH

XL

Lower 8 bits of X-register

%xl, %XL, xl or XL

Y

Index register Y

%y, %Y, y or Y

YH

Upper 8 bits of Y-register

%yh, %YH, yh or YH

YL

Lower 8 bits of Y-register

%yl, %YL, yl or YL

F

Flag register F

%f, %F, f or F

EXT

Extension register EXT

%ext, %EXT, ext or EXT

SP1

Stack pointer SP1

%sp1, %SP1, sp1 or SP1

SP2

Stack pointer SP2

%sp2, %SP2, sp2 or SP2

Note: "%" can be omitted. These symbols are reserved words, therefore they cannot be used as user-

defined symbol names.

4.5.7 Numerical Notations

This Assembler supports three kinds of numerical notations: decimal, hexadecimal, and binary.

Decimal notations of values

Notations represented with 0–9 only will be regarded as decimal numbers. To specify a negative
value, put a minus sign (-) before the value.

Examples:

1 255 -3

Characters other than 0–9 and the sign (-) cannot be used.

Hexadecimal notations of values

To specify a hexadecimal number, place "0x" before the value.

Examples:

0x1a 0xff00

"0x" cannot be followed by characters other than 0–9, a–f, and A–F.

Binary notations of values

To specify a binary number, place "0b" before the value.

Examples:

0b1001 0b1001100

"0b" cannot be followed by characters other than 0 or 1.

Specified ranges of values

The size (specified range) of immediate data varies with each instruction.
The specifiable ranges of different immediate data are given below.

Table 4.5.7.1 Types of immediate data and their specifiable ranges

Symbol

Type

Decimal

Hexadecimal

Binary

imm2

2-bit immediate data

0–3

0x0–0x3

0b0–0b11

imm4

4-bit immediate data

0–15

0x0–0xf

0b0–0b1111

imm6

Software vectored interrupt address

0–64

0x0–0x3f

0b0–0b111111

imm8

8-bit immediate data

0–255

0x0–0xff

0b0–0b11111111

n4

4-bit n-ary specified data

1–16

0x1–0x10

0b0–0b10000

sign8

Signed 8-bit immediate data

-128–127

0x0–0xff

0b0–0b11111111

add6

6-bit address

0–64

0x0–0x3f

0b0–0b111111

Advertising