Atari Logo
Atari Computer

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

Assembler

Previous Next TOC

NAME ROL, ROR -- Rotate left and rotate right
SYNOPSIS
ROdDx,Dy
ROd#<data>,Dy
ROd<ea>
where d is direction, L or R
Size = (Byte, Word, Long)
FUNCTION Rotate the bits of the operand in the specified direction. The rotation count may be specified in two different ways:
  1. Immediate - the rotation count is specified in the instruction
  2. Register - the rotation count is contained in a data register specified in the instruction
For a register, the size may be byte, word, or long, but for a memory location, the size must be a word. The rotation count is also restricted to one for a memory location.
.-------->--------.
ROL:||
C<------ OPERAND <---'
<---
ROR:,-------<-------.
||
`--> OPERAND ----->C
--->
FORMAT In the case of the rotating of a register:
1514131211109876543210
1110NUMBER/REGISTERdrSIZEi/r11REGISTER

In the case of the rotating of a memory area:
1514131211109876543210
1110011dr11MODEREGISTER
 <ea>

NUMBER/REGISTER Specifies number of rotating or number of register which contents the number of rotating.
If i/r = 0, number of rotating is specified in the instruction as immediate data
If i/r = 1, it's specified in the data register.
If dr = 0, right rotating
If dr = 1, left rotating
SIZE
00->one Byte operation
01->one Word operation
10->one Long operation
REGISTER For a register rotating:
Indicates the number of data register on which rotating is applied.

For a memory rotating:
<ea> indicates operand which should be rotated.

Only addressing modes relatives to memory are allowed:
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 is negative. Cleared otherwise.
Z-Set if the result is zero. Cleared otherwise.
V-Always cleared
C-Set according to the last bit shifted out of the operand.


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