TeST operand for zero
NAME
TST -- Test operand for zero
SYNOPSIS
TST <ea>
Size = (Byte, Word, Long)
FUNCTION
Operand is compared with zero. Flags are set according to the result.
FORMAT
-----------------------------------------------------------------
|15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|-------|-----------|-----------|
| 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | SIZE | MODE | REGISTER |
----------------------------------------=========================
<ea>
SIZE
00->one Byte operation
01->one Word operation
10->one Long operation
REGISTER
<ea> is destination, if size is 16 or 32 bits then all addressing
modes are allowed. If size is 8 bits, allowed addressing modes are:
--------------------------------- -------------------------------
|Addressing Mode|Mode| Register | |Addressing Mode|Mode|Register|
|-------------------------------| |-----------------------------|
| Dn |000 |N° reg. Dn| | Abs.W |111 | 000 |
|-------------------------------| |-----------------------------|
| An | - | - | | Abs.L |111 | 001 |
|-------------------------------| |-----------------------------|
| (An) |010 |N° reg. An| | (d16,PC) |111 | 010 |
|-------------------------------| |-----------------------------|
| (An)+ |011 |N° reg. An| | (d8,PC,Xi) |111 | 011 |
|-------------------------------| |-----------------------------|
| -(An) |100 |N° reg. 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|
---------------------------------
RESULT
X - Not affected.
N - Set if the result is negative. Cleared otherwise.
Z - Set if the result is zero. Cleared otherwise.
V - Always cleared.
C - Always cleared.
SEE ALSO
BTST BFTST
HTML Conversion by AG2HTML.pl V2.941126c, perl $RCSfile: tst.HTML,v $$Revision: 1.1 $$Date: 1999/09/14 21:14:13 $
Patch level: 36
& witbrock@cs.cmu.edu