WORLD Amigo. PART IV
(C) 1999>> RRA>> / AF / SG
(Continued in rooms 5-7)
-------------------------------------------------- -------------
EOR, EORI - logical XOR
Syntax: EOR <ea>, Dn
EORI # , <ea>
Size:. B,. W,. L
Description: EOR - produces exclusive OR operation on
data registers and operand in <ea>.
EORI - logical exclusive OR operation on
operand <ea>, and the immediate
data.
Addressing the forbidden: An
Flags: X - does not change
V, C = 0
N, Z - change
-------------------------------------------------- -------------
EORI to CCR - Boolean XOR with the flags register
Syntax: EORI # , CCR
Size:. B
Description: A logical EXCLUSIVE OR of the flags register
and immediate data.
Flags: command performed on them.
-------------------------------------------------- -------------
EXG - exchange the contents of the registers
Operation: Rx <-> Ry
Syntax: EXG Dx, Dy
EXG Ax, Ay
EXG Dx, Ay
Size:. L
Description: Swaps the contents of two 32-bit registers
Flags: do not change
-------------------------------------------------- -------------
EXT, EXTB - sign extend
Syntax: EXT.W Dn
EXT.L Dn
EXTB.L Dn (only on older processors)
Size:. W,. L
Description: Extends the data register mark.
For example: extend byte to word
was: 00100100 # 24
was: 0000000000100100 # 0024
was: 10110100 # B4
was: 1111111110110100 # FFB4
EXT.W - extends the byte to word
EXT.L - extends the word to long word
EXTB.L - extends the byte to long word
Flags: X - does not change
N, Z - change
V, C = 0
-------------------------------------------------- -------------
ILLEGAL - cause the exclusion of "non-existent command
Operation: SSP-2, (SSP) = displacement vector (*)
SSP-4, (SSP) = PC
SSP-2, (SSP) = SR
(*) - M68000 on this line is not made
Syntax: ILLEGAL
Description: Causes the exclusion of "non-existent command
(Vector 4).
Flags: do not change
-------------------------------------------------- -------------
JMP - the transition to address
Operation: PC = <ea>
Syntax: JMP <ea>
Description: Program execution continues at <ea>
For example: JMP 4 (A1) - prog dzhampnetsya
address
A1 +4.
Addressing the forbidden: Dn, An, (An )+,-( An)
Flags: do not change
-------------------------------------------------- -------------
JSR - subroutine call
Operation: SP-4, (SP) = PC, PC = <ea>
Syntax: JSR <ea>
Description: Pushes onto the stack address following the JSR
team, and
then the program continues to address
<Ea>.
Addressing the forbidden: Dn, An, (An )+,-( An)
Flags: do not change
-------------------------------------------------- -------------
LEA - load effective address
Operation: An = <ea>
Syntax: LEA <ea>, An
Size:. L
Description: The work of this team newcomers are often
confused with MOVEA
or do not understand. I will try to explain:
Unlike the team MOVEA, the team loaded LEA
pressed in address register is not what's on
the address given in the <ea>, and myself that
address.
For example:
MOVEA.L $ 8 (A2, D3.W * 2), A0
A0 is a long word, which is located at
at (A2 + D3.W * 2 +8)
LEA $ 8 (A2, D3.W * 2), A0
A0 = A2 + D3.W * 2 +8
I hope you understand what is at stake.
Incidentally the same applies to the JMP
instruction and
JSR description above.
Addressing the forbidden: Dn, An, (An )+,-( An)
Flags: do not change
-------------------------------------------------- -------------
LINK - to create a stack frame
Operation: SP-4, (SP) = An, An = SP, SP + disp
Syntax: LINK An, #
Size:. W,. L (. L only on older processors)
Description: Pushes the contents of an address register for
stack, and then loads the contents of SP in this
result Giustra. And in the end adds to the SP
shift
(Size of stack frame, which should be
negative, unless of course you're not a pervert).
As a result of this operation, you have formed
memory area, which is usually stored locally
bles. The specified address register will be
indicate the end of the frame. This stack frame
killed by a team of UNLK.
Flags: do not change
-------------------------------------------------- -------------
LSL, LSR - Logical shift
Syntax: LSd Dx, Dy
LSd # , Dy
LSd <ea>
Where d - the shift direction
Size:. B,. W,. L
Description: A logical shift DST in a certain direction.
Flags C, X take the last bit advanced.
Counter the shift can be specified in two ways:
1) from 1 to 8
2) in the data register
The team works with memory (LSd <ea>) produ
leads to a shift 1 bit operand size only. W
<Ea> can not be addressing: Dn, An
LSL: multiplication by 2 in the degree of SRC
C, X <operand <0
LSR: unsigned division by 2 degrees SRC
Operand 0> C, X
Flags: C, X - the last bit extended
N, Z - vary depending on the result
V = 0
-------------------------------------------------- -------------
MOVE, MOVEA, MOVE to CCR, MOVE from CCR, MOVE from SR, MOVEQ -
Team Shipping
Operation: DST = SRC
The syntax of the size
MOVE <ea>, <ea>. B,. W,. L
MOVEA <ea>, An. W,. L
MOVE CCR, <ea>. W
MOVE <ea>, CCR. W
MOVE SR, <ea>. W
MOVEQ # , Dn. L
Description: MOVE it in Africa MOVE, as if it were not called
on different platforms: MOV, LD, SW, LW, etc.
etc.
Without this team can not live neither percent,
therefore explains the Sho chain TAKE I think it
is not necessary.
Simply list the characteristics of each team,
although
and without it everything is clear.
MOVE <ea>, <ea>, MOVE <ea>, CCR, MOVE CCR, <ea>,
MOVE SR, <ea> - DST can not be register
addresses on the SRC are no restrictions.
MOVEA <ea>, An - Transmittal to the address
register.
MOVEQ # , Dn - sending in registration data
bytes (that is a number from 0 to # FF) extended
sign to 32 bits.
Flags: MOVE, MOVEQ
X - does not change
N, Z - change
C, V = 0
MOVEA, MOVE from CCR, MOVE from SR does not
affect the
flags.
MOVE to CCR record number in them.
-------------------------------------------------- -------------
MOVE16 - sending 16-byte block (M68040, M68060)
Syntax: MOVE16 (Ax) +, (Ay) +
MOVE16 (xxx). L, (An)
MOVE16 (xxx). L, (An) +
MOVE16 (An), (xxx). L
MOVE16 (An) +, (xxx). L
Size: 16 bytes
Description: Works as a team just throws MOVE
once the 16-byte block. The address must be a
multiple of
16.
Flags: unaffected.
-------------------------------------------------- -------------
MOVEM - sending multiple registers
Syntax: MOVEM <list of registers>, <ea>
MOVEM <ea>, <list of registers>
Size:. W,. L
Description: Write / Read to / from <ea> a number of
registers.
Most often, this command is used when needed
save some registers on the stack during
call any procedure.
For example: MOVEM.L D0-D5, D7/A0-A2, - (A7)
will retain
on the stack registers D0, D1, D2, D3, D4, D5,
D7, A0, A1, A2.
When using predekrementnoy addressing
registers are written to the specified address
minus
Size operatsii.Pri transfer the next register
e decremented again. In short, as
if you were shoved onto the stack register for
the register.
The order of read / write - A7-A0, D7-D0.
If you use other ways of addressing
the opposite is true. Procedure - D0-D7, A0-A7
Flags: do not change
-------------------------------------------------- -------------
MOVEP - peripheral data transfer
Syntax: MOVEP Dx, d16 (Ay)
MOVEP d16 (Ay), Dx
Size:. W,. L
Operation: The transfer is carried out in memory so that each
dy byte register is written by an even Adre
su.
For example: in case number # FF2375E3
recording on an even memory address will be:
# FFxx23xx75xxE3
when writing to an odd address:
# XxFFxx23xx75xxE3
When reading from memory is the inverse
operation.
Flags: unaffected.
-------------------------------------------------- -------------
MULS / MULU - the multiplication of signed / unsigned
Syntax: MULS / MULU.W <ea>, Dn 32 = 16 * 16
other teams only senior processors
MULS / MULU.L <ea>, Dl 32 = 32 * 32
MULS / MULU.L <ea>, Dh: Dl 64 = 32 * 32
Size:. W,. L
Description: The multiplication of two signed numbers (MULS)
and without knowledge ka (MULU). Bit result and
the original
data you can find out in paragraph syntax.
Prohibition of addressing: An
Flags: X - does not change
N, Z - change
V, C = 0
-------------------------------------------------- -------------
NBCD - change the sign of BCD-based flag X.
Operation: DST = 0-DST10-X
Syntax: NBCD <ea>
Size:. B
Description: subtracts the operand of <ea> X and the flag of
zero.
The operation takes place with the Packaging
BCD-number
Prohibition of addressing: An
Flags: C, X - change
N, V - indefinitely
Z - 0, if the result is not 0, otherwise
changes (!). For a correct determination
this flag, before surgery, it should be
install.
-------------------------------------------------- -------------
NEG - sign change
Operation: DST = 0-DST
Syntax: NEG <ea>
Size:. B,. W,. L
Description: subtracts the operand of <ea> from scratch, thus
changing
sign of the operand.
Prohibition of addressing: An
Flags: change everything as the subtraction.
-------------------------------------------------- ------------
NEGX - change the sign in view of the flag X.
Operation: DST = 0-DST-X
Syntax: NEGX <ea>
Size:. B,. W,. L
Description: subtracts the operand of <ea> X and the flag of
zero.
Prohibition of addressing: An
Flags: C, X - change
N, V - indefinitely
Z - 0, if the result is not 0, otherwise
changes (!). For a correct determination
this flag, before surgery, it should be
install.
-------------------------------------------------- -------------
NOP - the coolest assembly instructions.
With this command you can write your
the first, and perhaps the last program,
just remember to put at the end of RTS. This
team is doing everything you want, so
preferably after the team left RTS lyricist -
what you on this principle the need to bend.
All requests will be considered by the processor.
An example of this naiC00Lneyshey program:
NOP
RTS
or like this:
NOP
NOP
NOP
NOP
NOP
RTS
and you are on a new, more progressive level programming!
-------------------------------------------------- -------------
NOT - inversion
Syntax: NOT <ea>
Size:. B,. W,. L
Description: inverts the operand of the <ea>. For those who
do not UWC reel as an inversion, primerchik:
was: 00101101
became: 11010010
Prohibition of addressing: An
Flags: X - does not change
N, Z - change
V, C = 0
-------------------------------------------------- -------------
OR, ORI - logical OR
Syntax: OR <ea>, Dn
OR Dn, <ea>
ORI # , <ea>
Size:. B,. W,. L
Description: OR - produces OR operation on register
data and operand in <ea>.
ORI - Logical OR operation on the operand in
<Ea>, and direct data.
Addressing the forbidden: An
Flags: X - does not change
V, C = 0
N, Z - change
-------------------------------------------------- -------------
ORI to CCR - logical OR of flags register
Syntax: ORI # , CCR
Size:. B
Description: The logical OR of the flags register, and
directly governmental data.
Flags: command performed on them.
-------------------------------------------------- -------------
PACK - packed BCD-number (SENIOR percent).
Syntax: PACK - (Ax), - (Ay), #
PACK Dx, Dy, #
Description: If you are using the data registers, the 16-bit
parameter # added to the register
Dx, which contains nepakovannoe BCD-number.
Bits 11.08 and 3-0 results are combined and shown
syatsya in bits 7-0 of register Dy. The
remaining bits
register is not changed.
DST 00000000 | aaaa | bbbb |
^ ^
SRC + # 0000 | aaaa | 0000 | bbbb |
If you are using predekrementnaya addressing,
then
This operation is performed on the word
extracted from the
memory, and the result is also stored in memory.
It should be noted that the word is read (two
nepakovannyh BCD-numbers), and writes a single
byte
(Bagged BCD-number).
Flags: do not change
-------------------------------------------------- -------------
PEA - kick on the stack effective address
Operation: SP-4, (SP) = <ea>
Syntax: PEA <ea>
Size:. L
Description: As the team name appears on the team LEA
easy to guess that this team is working with
address, but not so that it is.
So, this command computes the effective address
operand, and throws it onto the stack.
For example: PEA $ 1234 (A5), the stack will be
the number
equal A5 +1234, and not what is in this
memory cell.
Prohibition of addressing: Dn, An, (An )+,-( An). Addressing
a registration rum PC can be used.
Flags: do not change
-------------------------------------------------- -------------
(To be completed)