Chapter 5 Instruction Specifications

Conversion Classification

number

Ladder symbol

Item

 

18 BCD(d, s)

19 BIN(d, s)

20 DECO(d, s, n)

21 ENCO(d, s, n)

Instruction symbol

Instruction

name

Binary →

BCD conversion

BCD →

Binary conversion

Decode

Encode

Process descriptions

I/O types used

Converts the value of s into

[Word]

BCD and stores it in I/O

d: WY, WR, WM

number d. If the value of s

s: WX, WY, WR,

is an error, DER (R 7F4) =

WM, TC,

1 is set.

Constant

Converts the value of s into

[Double word]

binary and stores it in I/O

d: DY, DR, DM

number d. If the value of s

s: DX, DY, DR,

is an error, DER (R 7F4) =

DM, Constant

1 is set.

 

Decodes the value indicated

d: R, M

by the least significant n

s: WX, WY, WR,

bits of s, and sets the bit

WM, TC,

that corresponds to the

Constant

decoding result of the bit

n: Constant(1-8)

row starting from I/O

 

number d, to 1.

 

Encodes the bit location in

d: WY, WR, WM

which 1 is set within the bit

s: R, M

row, which starts with I/O

n: Constant(1-8)

number s and lasts for the

 

amount of nth power of 2,

 

and stores it in I/O number

 

d. If multiple bits that

 

contain 1 exist, the one

 

with the upper bit locations

 

will be encoded.

 

R7F4

R7F3

R7F2

R7F1

R7F0

DER

ERR

SD

V

C

z

z

z

z

z

z

z

z

z

z

z

z

z

z

z

 

 

 

 

 

Process

time (s)

MICRO-EH

79

89

49

75

105

128

Steps

Remarks

 

3Upper case: W Lower

4case: DW

3Upper case: W Lower

4case: DW

4 *3

4 *3

*3: Processing time when n=1.

 

Classification

numberItem

 

Instruction symbol

 

 

 

DERR7F4

ERRR7F3

R7F2SD

R7F1V

R7F0C

MICRO-EH

Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Process

 

 

 

 

 

Ladder symbol

 

Instruction

Process descriptions

I/O types used

 

 

 

 

 

time

 

Remarks

 

 

 

 

name

 

 

 

 

 

(s)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

instruction

22

BCU(d, s)

 

Bit count

Among the contents of s

[Word]

z

z

z

z

z

33

3

Upper

 

 

 

 

 

set to 1 in I/O number d.

WM, TC,

 

 

 

 

 

 

 

case: W

 

 

 

 

 

 

(word, double-word), stores

d: WY, WR, WM

 

 

 

 

 

 

 

 

 

 

 

 

 

the number of bits that are

s: WX, WY, WR,

 

 

 

 

 

 

 

 

 

Application

 

 

 

 

 

Constant

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s: DX, DY, DR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[Double word]

 

 

 

 

 

42

4

Lower

 

 

 

 

 

 

 

d: WY, WR, WM

 

 

 

 

 

 

 

case: DW

 

 

 

 

 

 

 

DM, Constant

 

 

 

 

 

 

 

 

 

 

23

SWAP(d)

 

Swap

Swaps the upper 8 bits and

d: WY, WR, WM

z

z

z

z

z

25

2

 

 

 

 

 

 

 

the lower 8 bits of the value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(word) for I/O number d.

 

 

 

 

 

 

 

 

 

 

 

24

UNIT(d, s, n)

 

Unit

Stores the lower 4 bit

d: WY, WR, WM

z

z

z

z

100

4

*4

 

 

 

 

 

 

values of the n words

s: WR, WM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

starting with s in the lower

n: Constant(0-4)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 bits each of d (word).

 

 

 

 

 

 

 

 

 

 

 

25

DIST(d, s, n)

 

Distribute

Extracts the value of s

d: WR, WM

z

z

z

z

87

4

*4

 

 

 

 

 

 

(word) in 4 bit units from

s: WX, WY, WR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

the least significant bits,

WM, TC,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

and sets them in the lower 4

Constant

 

 

 

 

 

 

 

 

 

 

 

 

 

 

bits of each word starting

n: Constant(0-4)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

with I/O number d (word).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The upper bits are set to 0.

 

 

 

 

 

 

 

 

 

 

*4:

 

Processing time when n = 1

 

 

 

 

 

 

 

 

 

 

 

5-10

Page 60
Image 60
Hitachi NJI-350B manual Processing time when n=1, Bcd →, Wm, Tc