Motorola CPU32 Reference Manual page 107

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

CHK
Check Register Against Bounds
CHK
Operation:
Assembler
Syntax:
Attributes:
If On < 0 or On > Source then TRAP
CHK (ea), On
Size
=
(Word, Long)
Description:
Compares the value in the data register specified by the instruction to zero and to the
upper bound (effective address operand). The upper bound is a twos complement integer. If the
register value is less than zero or greater than the upper bound, a CHK instruction exception,
vector number 6, occurs.
Condition Codes:
x
N
Z
v
c
u
u
u
X Not affected.
N Set if On
<
0; cleared if On> effective address operand. Undefined otherwise.
Z Undefined.
V Undefined.
C Undefined.
Instruction Format:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
EFFECTIVr ADDRESS
0
1
0
0
REGISTER
SIZE
0
MODE
REGISTER
Instruction Fields:
Register field - Specifies the data register that contains the value to be checked.
Size field - Specifies the size of the operation.
11 - Word operation.
10 - Long operation.
o
Effective Address field - Specifies the upper bound operand. Only data addressing modes are
allowed as shown:
MOTOROLA
4-54
INSTRUCTION SET
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents