Chapter 5 Instruction Specifications

6.Control instructions

Control Classification

numberItem

 

Instruction symbol

 

 

 

R7F4

R7F3

R7F2

R7F1

R7F0

Process

Steps

 

 

Ladder symbol

 

Instruction

Process descriptions

I/O types used

 

 

 

 

 

time

 

Remarks

 

 

name

 

 

 

 

 

(s)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DER

ERR

SD

V

C

MICRO-EH

 

 

1

END

 

Normal

Indicates the end of a

None

z

z

z

z

z

714

1

 

 

 

 

scan end

normal scan.

 

 

 

 

 

 

 

 

 

2

CEND(s)

 

Scan

Re-executes normal scan

s: X, Y, R, M

z

z

z

z

z

5

2

*5

 

 

 

conditional

from the beginning of the

 

 

 

 

 

 

 

2

 

 

 

 

end

normal scan when s=1,

 

 

 

 

 

 

707

 

*6

 

 

 

 

while the next instruction is

 

 

 

 

 

 

 

 

 

 

 

executed when s=0.

 

 

 

 

 

 

32

 

 

3

JMP n

 

Unconditio-

Jumps to LBL n of the

n: Constant(0-

z

1]

z

z

z

 

 

 

 

 

 

nal jump

same No. n.

255)

 

 

 

 

 

 

 

 

4

CJMP n (s)

 

Conditional

When s=1, jumps to the

n: Constant(0-

z

1]

z

z

z

3

3

*5

 

 

 

jump

LBL n of the same No.;

255)

 

 

 

 

 

 

 

 

 

 

 

 

when s=0, executes the next

s: X, Y, R, M

 

 

 

 

 

32

 

*6

 

 

 

 

instruction.

 

 

 

 

 

 

 

 

 

5

LBL n

 

Label

Indicates the jump

n: Constant(0-

z

z

z

z

z

0.5

1

 

 

 

 

 

destination of JMP or

255)

 

 

 

 

 

 

 

 

 

 

 

 

CJMP of the same No.

 

 

 

 

 

 

 

 

 

6

FOR n (s)

 

FOR

When s=0, jumps to the

n: Constant(0-49)

z

1]

z

z

z

33

3

 

 

 

 

 

location after the NEXT n

s: WY, WR, WM

 

 

 

 

 

 

 

 

 

 

 

 

of the same No.; when s is

 

 

 

 

 

 

 

 

 

 

 

 

 

not 0, executes the next

 

 

 

 

 

 

 

 

 

 

 

 

 

instruction.

 

 

 

 

 

 

 

 

 

7

NEXT n

 

NEXT

Subtracts 1 from the s value

n: Constant(0-49)

z

1]

z

z

z

38

2

 

 

 

 

 

of the FOR n of the same

 

 

 

 

 

 

 

 

 

 

 

 

 

No. and jumps to FOR n.

 

 

 

 

 

 

 

 

 

8

CAL n

 

Call

Executes the SB n

n: Constant(0-99)

z

1]

z

z

z

24

2

 

 

 

 

subroutine

subroutine of the same No.

 

 

 

 

 

 

 

 

 

 

 

 

 

n.

 

 

 

 

 

 

 

 

 

9

SB n

 

Start

Indicates the start of No. n

n: Constant(0-99)

z

1]

z

z

z

0.5

1

 

 

 

 

subroutine

subroutine.

 

 

 

 

 

 

 

 

 

10

RTS

 

RETURN

Returns from subroutine.

None

z

z

z

z

z

25

1

 

 

 

 

SUBROUTIN

 

 

 

 

 

 

 

 

 

 

11

INT n

 

Start

Indicates the start of No. n

n: Constant(0-2,

z

z

z

z

z

0.5

1

 

 

 

 

interrupt

interrupt scan.

16-19, 20-27)

 

 

 

 

 

 

 

 

 

 

 

scan

 

 

 

 

 

 

 

 

 

 

12

RTI

 

RETURN

Returns from interrupt

None

z

z

z

z

z

0.5

1

 

 

 

 

INTERRUPT

scan.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7.Transfer instructions

Classification

Item number

 

Instruction symbol

 

 

 

R7F4

R7F3

R7F2

R7F1

R7F0

Process

Steps

 

Ladder symbol

Instruction

Process descriptions

I/O types used

time

Remarks

name

(s)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DER

ERR

SD

V

C

MICRO-EH

 

 

inst.

1

TRNS 0

 

General

Data sending and receiving

d: WY10

z

z

z

z

80

3

 

 

 

 

purpose

(optional)

s: WR, WM

 

 

 

 

 

 

 

 

Transfer

 

 

 

port

 

t: R, M

 

 

 

 

 

 

 

 

2

RECV 0

 

communica

Data receiving and sending

d: WX0

z

z

z

z

80

3

 

 

 

 

-tion

(optional)

s: WR, WM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

command

 

t: R, M

 

 

 

 

 

 

 

 

8.FUN instructions

Classification

Item number

 

Instruction symbol

 

 

 

R7F4

R7F3

R7F2

R7F1

R7F0

Process

Steps

 

Ladder symbol

Instruction

Process descriptions

I/O types used

time

Remarks

name

(s)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DER

ERR

SD

V

C

MICRO-EH

 

 

instructions

1

FUN 5 (s)

 

General

Port type switching from

s: WR,WM

z

z

z

z

114

3

 

 

 

 

purpose

dedicated port to general

 

 

 

 

 

 

 

 

 

 

 

 

port

purpose port

 

 

 

 

 

 

 

 

 

 

 

 

switching

 

 

 

 

 

 

 

 

 

 

2

FUN 80 (s)

 

I/O refresh

Refreshes all external I/O

s: WR,WM

z

z

z

z

432

3

 

FUN

 

 

 

(ALREF (s))

 

(all points)

ranges.

 

 

 

 

 

 

 

 

 

 

3

FUN 81 (s)

 

I/O refresh

Refreshes only the input

s: WR,WM

z

z

z

z

244

3

 

 

 

(IOREF (s))

 

(I/O /link

range, output range or link

 

 

 

 

 

 

 

 

 

 

 

 

 

designation

range.

 

 

 

 

 

 

 

 

 

 

 

 

 

)

 

 

 

 

 

 

 

 

 

 

5-11

Page 61
Image 61
Hitachi NJI-350B manual FUN instructions