Atari Logo
Atari Computer

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

Assembler

Previous Next TOC

NAME CAS2 -- Compare and swap (two-operand) (68020+)
SYNOPSIS
CAS2Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)
Size = (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 1, which is in memory to specified address by (Rn1), is compared to data register Dc1. If there's equality (Z=1), destination operand 2, which is in memory to specified address by (Rn2), is compared to data register Dc2.

If there's equality (Z=1), destination operand 1 can be updated, i.e. new operand Du1 (Data Update) is moved in destination (Rn1).

And also, destination operand 2 can be updated, i.e. new operand Du2 (Data Update) is moved in destination (Rn2).

If there's no equality (Z=0), reference registers Dc1 and Dc2 have to be updated. So there's move from destination operand (Rn1) in Dc1, and from (Rn2) in Dc2.

FORMAT
1514131211109876543210
00001SIZE011111100
D/A1Rn1 REG.000Du1 REG.000Dc1 REG.
D/A2Rn2 REG.000Du2 REG.000Dc2 REG.
SIZE
10->;one Word operation
11->;one Long operation
REGISTER
D/A1 = 0:Rn1=Dn
D/A1 = 1:Rn1=An
D/A2 = 0:Rn2=Dn
D/A2 = 1:Rn2=An
Du1, Du2 registers: indicates number of data register, which contains the new value to update in destination operand.

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

Rn1, Rn2 registers: indicates number of destination registers.

RESULT
X-not affected
N-Set following to comparisons results.
Z-Set if the result of comparisons 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