CHAPTER 4: INSTRUCTION SET

Signed 16-bit PC relative addressing

The addressing mode of the following branch instructions, which have an 8-bit relative address as the operand, change to the signed 16-bit PC relative addressing with the E flag set to "1". Consequently, it is possible to extend the branch range to the next address -32768 to +32767. (In this mode these instructions can branch the entire 64K program memory.)

Instructions that operate in the signed 16-bit PC relative addressing mode with the E flag

JR

sign8

JRC

sign8

JRNC sign8

JRZ sign8

JRNZ sign8

CALR

sign8

 

 

 

 

 

 

Examples:

 

 

 

 

 

 

LDB

%EXT,0x64

 

 

 

 

 

 

JR

0x29

 

...Works as "JR

0x6429"

 

 

LDB

%EXT,0x3A

 

 

 

 

 

 

JR

0x88

 

...Works as "JR∗0x3A88" (∗= C, NC, Z, or NZ)

 

LDB

%EXT,0xF8

 

 

 

 

 

 

CALR

0x62

 

...Works as "CALR 0xF862"

 

 

4.2 Instruction List

4.2.1 Function classification

Table 4.2.1.1 lists the function classifications of the instructions.Table 4.2.1.1 Instruction function classifications

Function classification

Mnemonic

Operation

Function classification

Mnemonic

Operation

Arithmetic

ADD

Addition

Rotate / shift

RL

Rotate to left with carry

 

ADC

Addition with carry

 

RR

Rotate to right with carry

 

SUB

Subtraction

 

SLL

Logical shift to left

 

SBC

Subtraction with carry

 

SRL

Logical shift to right

 

CMP

Comparison

Stack control

PUSH

Push

 

INC

Increment (adds 1)

 

POP

Pop

 

DEC

Decrement (subtracts 1)

Branch

JR

Relative jump

Logic

AND

Logical product

 

JP

Indirect jump

 

OR

Logical sum

 

CALZ

Absolute call

 

XOR

Exclusive OR

 

CALR

Rrelative call

 

BIT

Bit test

 

RET

Return

 

CLR

Bit clear

 

RETS

Return and skip

 

SET

Bit set

 

RETD

Return and data set

 

TST

Bit test

 

RETI

Interrupt return

Transfer

LD

Load (4-bit data)

 

INT

Software interrupt

 

LDB

Load (8-bit data)

System control

NOP

No operation

 

EX

Exchange (4-bit data)

 

HALT

Shift to HALT status

 

 

 

 

SLP

Shift to SLEEP status

S1C63000 CORE CPU MANUAL

EPSON

37