Atari Logo
Atari Computer

Hauptseite -
Welches System? -
Hardware -
Software -
Emulatoren -
Internet
MausNet
Programmieren
Verweise
Über

Assembler

Previous Next TOC

NAME CAS -- Compare and swap (68020+)
SYNOPSIS
CASDc,Du,<ea>
Size = (Byte, Word, Long)
FUNCTION This instruction is a read-modify-write instruction and should NEVER be used on Amiga because of conflicts with customs chips. Destination operand, which is in memory at address specified by <ea>, is compared to data register Dc (Data Compare). This register is used as reference in the principle of this instruction.
If there's equality (Z=1), destination operand can be updated, i.e. the new operand Du (Data Update) is moved in destination.
If there's no equality (Z=0), it's the reference register Dc which must be updated. So there's a move from destination operand to Dc.
FORMAT
 <ea>
1514131211109876543210
00001SIZE011MODEREGISTER
0000000Du REGISTER000Dc REGISTER
SIZE
01->one Byte operation
10->one Word operation
11->one Long operation
REGISTER Du register: indicates number of data register, which contains the new value to update in destination operand.

Dc register: indicates number of data register, which contains the reference value to compare to destination operand.

<ea> is always destination, addressing modes are the following:
Addressing ModeModeRegister
Dn--
An--
(An)010No reg. An
(An)+011No reg. An
-(An)100No reg. An
(d16,An)101No reg. An
(d8,An,Xi)110No reg. An
(bd,An,Xi)110No reg. An
([bd,An,Xi]od)110No reg. An
([bd,An],Xi,od)110No reg. An
Addressing ModeModeRegister
Abs.W111000
Abs.L111001
(d16,PC)--
(d8,PC,Xi)--
(bd,PC,Xi)--
([bd,PC,Xi],od)--
([bd,PC],Xi,od)--
#data--

RESULT
X-not affected
N-Set if the result of comparison is negative. Cleared otherwise.
Z-Set if the result of comparison is zero. Cleared otherwise.
V-Set if overflow. Cleared otherwise.
C-Set if carry. Cleared otherwise.


Best viewed with any browser English version not yet available.

Änderungen und Irrtümer vorbehalten. Letzte Änderung:
14 September 2001.
Home - Mail an den Webmaster - Impressum