CHecK register against upper and lower bounds

NAME
	CHK2 -- Check register against upper and lower bounds	(68020+)

SYNOPSIS
	CHK2	<ea>,Rn

	Size = (Byte, Word, Long)

FUNCTION
	<ea> indicates memory area of two bounds: in 1st memory position,
	lower bound, in 2nd memory position, upper bound. Those two values
	are adjacent in memory.
	For signed comparisons, the lowest arithmetic value, expressed as a
	two complement integer, have to be the lower bound.

	If Rn is a data register Dn and if size of operation is 8 or 16 bits,
	only the 8 or 16 bits of low weight of Dn and bounds are taken in
	count.
	In opposite, if Rn is an address register An, it must be extension
	of bounds sign and 32 bits of An are taken care.

	If Rn is located out of 2 bounds, a CHK instruction, vector number 6,
	occurs. 

FORMAT
	                                                  <ea>
	----------------------------------------=========================
	|15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
	|---|---|---|---|---|-------|---|---|---|-----------|-----------|
	| 0 | 0 | 0 | 0 | 0 | SIZE  | 0 | 1 | 1 |   MODE    | REGISTER  |
	|---|-----------|---|-------|---|---|---|-----------|-----------|
	|D/A| REGISTER  | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
	-----------------------------------------------------------------

REGISTER
	Register specifies the register Rn which contains the value to test.
	If D/A = 0: Rn = Dn
	If D/A = 1: Rn = An
	<ea> specifies bounds, addressing modes allowed are:
	--------------------------------- -------------------------------
	|Addressing Mode|Mode| Register | |Addressing Mode|Mode|Register|
	|-------------------------------| |-----------------------------|
	|      Dn       | -  |     -    | |    Abs.W      |111 |  000   |
	|-------------------------------| |-----------------------------|
	|      An       | -  |     -    | |    Abs.L      |111 |  001   |
	|-------------------------------| |-----------------------------|
	|     (An)      |010 |N° reg. An| |   (d16,PC)    |111 |  010   |
	|-------------------------------| |-----------------------------|
	|     (An)+     | -  |     -    | |   (d8,PC,Xi)  |111 |  011   |
	|-------------------------------| |-----------------------------|
	|    -(An)      | -  |     -    | |   (bd,PC,Xi)  |111 |  011   |
	|-------------------------------| |-----------------------------|
	|    (d16,An)   |101 |N° reg. An| |([bd,PC,Xi],od)|111 |  011   |
	|-------------------------------| |-----------------------------|
	|   (d8,An,Xi)  |110 |N° reg. An| |([bd,PC],Xi,od)|111 |  011   |
	|-------------------------------| |-----------------------------|
	|   (bd,An,Xi)  |110 |N° reg. An| |    #data      | -  |   -    |
	|-------------------------------| -------------------------------
	|([bd,An,Xi]od) |110 |N° reg. An|
	|-------------------------------|
	|([bd,An],Xi,od)|110 |N° reg. An|
	---------------------------------

SIZE
	00->one Byte operation
	01->one Word operation
	10->one Long operation

RESULT
	X - Not affected
	N - Undefined.
	Z - Set if Rn is equal to one of the two bounds. Cleared otherwise.
	V - Undefined.
	C - Set if Rn is out of bounds. Cleared otherwise.

SEE ALSO
	CMP  CMPI CMPA
	CHK

HTML Conversion by AG2HTML.pl V2.941126c, perl $RCSfile: chk2.HTML,v $$Revision: 1.1 $$Date: 1999/09/14 21:14:07 $ Patch level: 36 & witbrock@cs.cmu.edu