6F3B0253

7. Instructions

Logical operations

FUN

Name

Expression

Function

Steps

Speed

Page

No.

 

 

 

 

 

(s)

 

048

AND

[ A AND B

C ]

Finds logical AND of A and B,

4

5.7

156

 

 

 

 

and stores it in C.

 

 

 

 

 

 

 

050

OR

[ A OR B

C ]

Finds logical OR of A and B,

4

5.7

157

 

 

 

 

and stores it in C.

 

 

 

 

 

 

 

052

Exclusive OR

[ A EOR B

C ]

Finds logical exclusive OR of A

4

5.7

158

 

 

 

 

and B, and stores it in C.

 

 

 

 

 

 

 

064

Bit test

[ A TEST B ]

 

Turns ON output if logical AND

3

5.0

163

 

 

 

 

of A and B is not 0.

 

 

 

 

 

 

 

Shift operations

FUN

Name

 

 

 

Expression

Function

Steps

Speed

Page

No.

 

 

 

 

 

 

 

 

 

 

 

 

(s)

 

068

1 bit shift right

[ SHR1 A ]

 

 

Shifts data of A 1 bit to the right

2

6.8

164

 

 

 

 

 

 

 

 

 

 

 

(LSB direction). The carry flag

 

 

 

 

 

 

 

 

 

 

 

changes according to the result.

 

 

 

069

1 bit shift left

[ SHL1 A ]

 

 

Shifts data of A 1 bit to the left

2

6.8

165

 

 

 

 

 

 

 

 

 

 

 

(MSB direction). The carry flag

 

 

 

 

 

 

 

 

 

 

 

changes according to the result.

 

 

 

070

n bit shift right

[ A SHR n

B ]

Shifts data of A n bits to the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

right (LSB direction) and stores

4

10.2

166

 

 

 

 

 

 

 

 

 

 

 

the result in B. The carry flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

changes according to the result.

 

 

 

071

n bit shift left

[ A SHL n

B ]

Shifts data of A n bits to the left

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(MSB direction) and stores the

4

10.2

167

 

 

 

 

 

 

 

 

 

 

 

result in B. The carry flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

changes according to the result.

 

 

 

074

Shift register

D

 

SR

 

 

Q

 

When shift input (S) comes ON,

 

 

 

 

 

 

 

 

 

 

 

S

 

(n)

 

 

 

 

shifts the data of specified shift

 

 

 

 

 

E

 

A

 

 

 

 

register 1 bit to the left, and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

stores data input (D) state into

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A. This operation is enabled

3

65.9 -

168

 

 

 

 

 

 

 

 

 

 

 

while enable input (E) is ON.

76.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The carry flag changes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

according to the result.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Shift register: n devices starting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

with device A.

 

 

 

075

Bi-directional

D

 

DSR

 

Q

 

When shift input (S) comes ON,

 

 

 

 

shift register

S

 

(n)

 

 

 

shifts the data of specified shift

 

 

 

 

 

E

 

A

 

 

 

 

 

register 1 bit to the left or to the

 

 

 

 

 

L

 

 

 

 

 

right depending on direction

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

input (L). This operation is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

enabled while enable input (E) is

3

69.0 -

170

 

 

 

 

 

 

 

 

 

 

 

ON. The carry flag changes

79.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

according to the result.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Shift register: n devices starting

 

 

 

 

 

 

 

 

 

 

 

 

 

 

with device A.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Direction: Left when L is ON,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

right when L is OFF

 

 

 

Basic Hardware and Function 109

Page 111
Image 111
Toshiba 6F3B0253 user manual Logical operations, Shift operations